{"openapi":"3.1.0","info":{"title":"Amika API — v0beta1","version":"0beta1"},"components":{"schemas":{"AgentSessionSendResponse":{"type":"object","properties":{"session_id":{"type":"string"},"sandbox_id":{"type":"string"},"agent":{"type":"string","enum":["claude","codex"]},"response":{"type":"string"},"is_error":{"type":"boolean","description":"True when the turn failed. The failure is still a 200: `response` carries the agent CLI's own message (e.g. \"Not logged in · Please run /login\")."},"is_new_session":{"type":"boolean"},"created_sandbox":{"type":"boolean"},"usage":{"$ref":"#/components/schemas/AgentSessionUsage"}},"required":["session_id","sandbox_id","agent","response","is_error","is_new_session","created_sandbox"]},"AgentSessionUsage":{"type":"object","properties":{"cost_usd":{"type":"number"},"input_tokens":{"type":"integer","minimum":0},"output_tokens":{"type":"integer","minimum":0},"cache_read_tokens":{"type":"integer","minimum":0},"cache_creation_tokens":{"type":"integer","minimum":0},"duration_ms":{"type":"integer","minimum":0},"num_turns":{"type":"integer","minimum":0}}},"AgentSessionSendRequest":{"type":"object","properties":{"message":{"type":"string","minLength":1},"agent":{"type":"string","enum":["claude","codex"]},"session_id":{"type":"string","minLength":1},"sandbox_id":{"type":"string","minLength":1},"new_session":{"type":"boolean"},"model":{"type":"string","nullable":true,"enum":["fable","opus","sonnet","haiku","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","gpt-5.5","gpt-5.2",null]},"effort":{"type":"string","nullable":true,"enum":["low","medium","high","xhigh","max",null]},"repo_url":{"type":"string","minLength":1},"branch":{"type":"string","minLength":1},"new_branch_name":{"type":"string","minLength":1}},"required":["message"]},"AgentSessionStreamFrame":{"anyOf":[{"type":"object","properties":{"phase":{"type":"string","enum":["creating_sandbox","sandbox_ready"]},"sandbox_id":{"type":"string"}},"required":["phase"]},{"type":"object","properties":{"text":{"type":"string"}},"required":["text"]},{"$ref":"#/components/schemas/AgentSessionSendResponse"},{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}]},"ListAgentSessionsResponse":{"type":"object","properties":{"sessions":{"type":"array","items":{"$ref":"#/components/schemas/AgentSessionSummary"}},"total":{"type":"integer","minimum":0}},"required":["sessions","total"]},"AgentSessionSummary":{"type":"object","properties":{"session_id":{"type":"string"},"sandbox_id":{"type":"string"},"sandbox_name":{"type":"string","nullable":true},"agent":{"type":"string"},"status":{"type":"string"},"preview":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"effort":{"type":"string","nullable":true},"started_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"ended_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"nullable":true}]},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["session_id","sandbox_id","sandbox_name","agent","status","preview","model","effort","started_at","ended_at","created_at","updated_at"]},"AgentSessionDetail":{"allOf":[{"$ref":"#/components/schemas/AgentSessionSummary"},{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/AgentSessionMessage"}}},"required":["messages"]}]},"AgentSessionMessage":{"type":"object","properties":{"role":{"type":"string"},"content":{"type":"string"},"timestamp":{"type":"string"},"is_error":{"type":"boolean"}},"required":["role","content","timestamp"]},"AgentSessionEventFrame":{"type":"object","properties":{"seq":{"type":"integer","minimum":0},"id":{"type":"string"},"kind":{"type":"string"},"payload":{"type":"object","additionalProperties":{"nullable":true}},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["seq","id","kind","payload","created_at"]},"ListApiKeysResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeySummary"}},"pageInfo":{"type":"object","properties":{"after":{"type":"string","nullable":true},"hasNextPage":{"type":"boolean"}},"required":["after","hasNextPage"]}},"required":["data","pageInfo"]},"ApiKeySummary":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"scope":{"type":"string","enum":["organization","user"],"description":"Whether the key is scoped to the caller's organization or to the individual user who owns it.","example":"organization"},"obfuscatedValue":{"type":"string"},"lastUsedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","scope","obfuscatedValue","lastUsedAt","createdAt","updatedAt"]},"ApiKeyWithValue":{"allOf":[{"$ref":"#/components/schemas/ApiKeySummary"},{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]}]},"CreateApiKeyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Human-readable name for the API key."},"scope":{"type":"string","enum":["organization","user"],"default":"organization","description":"Scope of the key to create. Defaults to `organization`; pass `user` to mint a key owned by the calling user.","example":"organization"}},"required":["name"]},"ListDockerRegistriesResponse":{"type":"array","items":{"$ref":"#/components/schemas/DockerRegistry"}},"DockerRegistry":{"type":"object","properties":{"id":{"type":"string"},"org_id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"daytona_registry_id":{"type":"string"},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"username":{"type":"string","nullable":true},"registry_type":{"type":"string","nullable":true}},"required":["id","org_id","name","url","daytona_registry_id","created_at","updated_at"]},"CreateDockerRegistryRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"url":{"type":"string","minLength":1},"username":{"type":"string","minLength":1},"password":{"type":"string","minLength":1},"project":{"type":"string"}},"required":["name","url","username","password"]},"GitUserSettingsResponse":{"anyOf":[{"type":"object","properties":{"configured":{"type":"boolean","enum":[true]},"name":{"type":"string"},"email":{"type":"string"},"suggestion":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["name","email"]}},"required":["configured","name","email","suggestion"]},{"type":"object","properties":{"configured":{"type":"boolean","enum":[false]},"suggestion":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["name","email"]}},"required":["configured","suggestion"]}]},"GitUserSettingsRow":{"type":"object","properties":{"id":{"type":"string"},"org_id":{"type":"string"},"user_id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","org_id","user_id","name","email","created_at","updated_at"]},"UpsertGitUserSettingsRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","minLength":1}},"required":["name","email"]},"Host":{"type":"object","properties":{"id":{"type":"string","pattern":"^host_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"hostname":{"type":"string"},"url":{"type":"string","nullable":true},"org_id":{"type":"string"},"sizes":{"type":"object","additionalProperties":{"type":"object","properties":{"vcpus":{"type":"integer","minimum":1},"memoryGib":{"type":"number","minimum":0,"exclusiveMinimum":true},"diskGib":{"type":"integer","minimum":1},"diskGrowOnly":{"type":"boolean"}},"required":["vcpus","memoryGib","diskGib","diskGrowOnly"],"additionalProperties":false}},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","hostname","url","org_id","sizes","created_at","updated_at"]},"CreateHostRequest":{"type":"object","properties":{"hostname":{"type":"string"},"url":{"type":"string","nullable":true,"format":"uri"},"secret":{"type":"string","pattern":"^[\\x21-\\x7e]{32,}$"},"sizes":{"type":"object","additionalProperties":{"type":"object","properties":{"vcpus":{"type":"integer","minimum":1},"memoryGib":{"type":"number","minimum":0,"exclusiveMinimum":true},"diskGib":{"type":"integer","minimum":1},"diskGrowOnly":{"type":"boolean"}},"required":["vcpus","memoryGib","diskGib","diskGrowOnly"],"additionalProperties":false}}},"required":["hostname","secret"]},"ReplaceHostRequest":{"type":"object","properties":{"hostname":{"type":"string"},"url":{"type":"string","nullable":true,"format":"uri"},"secret":{"type":"string","pattern":"^[\\x21-\\x7e]{32,}$"},"sizes":{"type":"object","additionalProperties":{"type":"object","properties":{"vcpus":{"type":"integer","minimum":1},"memoryGib":{"type":"number","minimum":0,"exclusiveMinimum":true},"diskGib":{"type":"integer","minimum":1},"diskGrowOnly":{"type":"boolean"}},"required":["vcpus","memoryGib","diskGib","diskGrowOnly"],"additionalProperties":false}}},"required":["hostname"]},"RevealHostSecretResponse":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"ListIntegrationCredentialsResponse":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"connected":{"type":"boolean"}},"required":["provider","connected"]}},"ListRepositoriesResponse":{"type":"array","items":{"$ref":"#/components/schemas/Repository"}},"Repository":{"type":"object","properties":{"id":{"type":"string"},"org_id":{"type":"string"},"user_id":{"type":"string","nullable":true},"repo_url":{"type":"string"},"setup_script":{"type":"string","nullable":true},"start_script":{"type":"string","nullable":true},"sandbox_preset":{"type":"string","nullable":true},"sandbox_size":{"type":"string","nullable":true},"default_snapshot":{"type":"string","nullable":true},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","org_id","user_id","repo_url","setup_script","start_script","sandbox_preset","sandbox_size","default_snapshot","created_at","updated_at"],"additionalProperties":{"nullable":true}},"CreateRepositoryRequest":{"type":"object","properties":{"repo_url":{"type":"string","minLength":1},"setup_script":{"type":"string"},"start_script":{"type":"string"},"sandbox_preset":{"type":"string","nullable":true},"sandbox_size":{"type":"string","nullable":true},"default_snapshot":{"type":"string","nullable":true}},"required":["repo_url"]},"RepoIntegrationsResponse":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"repository_id":{"type":"string"},"org_id":{"type":"string"},"name":{"type":"string"},"mcp_server_type":{"type":"string"},"mcp_server_url":{"type":"string"},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","repository_id","org_id","name","mcp_server_type","mcp_server_url","created_at","updated_at"]}},"UpsertIntegrationsRequest":{"type":"object","properties":{"integrations":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1},"mcp_server_type":{"type":"string","enum":["http"]},"mcp_server_url":{"type":"string","format":"uri"}},"required":["name","mcp_server_type","mcp_server_url"]},{"type":"object","properties":{"name":{"type":"string","enum":["playwright"]},"mcp_server_type":{"type":"string","enum":["stdio"]},"mcp_server_url":{"type":"string","default":""}},"required":["name","mcp_server_type"]}]}}},"required":["integrations"]},"WorkflowResponse":{"type":"object","properties":{"workflow":{"type":"object","nullable":true,"properties":{"default_agent":{"type":"string","nullable":true},"start_step":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"body":{"type":"string"},"on_success":{"type":"string","nullable":true},"on_failure":{"type":"string","nullable":true}},"required":["name","body","on_success","on_failure"]}},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["default_agent","start_step","steps","created_at","updated_at"]}},"required":["workflow"]},"UpsertWorkflowRequest":{"type":"object","properties":{"default_agent":{"type":"string","nullable":true,"enum":["claude","codex",null]},"start_step":{"type":"string","pattern":"^[a-zA-Z0-9_][a-zA-Z0-9_-]{0,63}$"},"steps":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9_][a-zA-Z0-9_-]{0,63}$"},"body":{"type":"string","minLength":1},"on_success":{"type":"string","nullable":true,"pattern":"^[a-zA-Z0-9_][a-zA-Z0-9_-]{0,63}$"},"on_failure":{"type":"string","nullable":true,"pattern":"^[a-zA-Z0-9_][a-zA-Z0-9_-]{0,63}$"}},"required":["name","body"]},"minItems":1}},"required":["start_step","steps"]},"ListSandboxBindingsResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SandboxBinding"}}},"required":["items"]},"SandboxBinding":{"type":"object","properties":{"id":{"type":"string"},"sandbox_id":{"type":"string"},"target_namespace":{"type":"string"},"target_kind":{"type":"string"},"target_id":{"type":"string"},"target_url":{"type":"string","format":"uri"},"relationship":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"system_metadata":{"type":"object","additionalProperties":{"nullable":true}},"created_by_kind":{"type":"string","enum":["user","system"]},"created_by_id":{"type":"string"},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","sandbox_id","target_namespace","target_kind","target_id","target_url","relationship","metadata","system_metadata","created_by_kind","created_by_id","created_at","updated_at"]},"ListSandboxServicesResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SandboxService"}}},"required":["items"]},"SandboxService":{"type":"object","properties":{"id":{"type":"string","nullable":true},"sandbox_id":{"type":"string"},"name":{"type":"string"},"port":{"type":"integer"},"url_scheme":{"type":"string","nullable":true,"enum":["http","https",null]},"protocol":{"type":"string"},"url":{"type":"string","nullable":true},"host_port":{"type":"integer","nullable":true},"source":{"type":"string","enum":["table","legacy"]},"kind":{"type":"string","enum":["system","user"]},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"nullable":true}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"nullable":true}]}},"required":["id","sandbox_id","name","port","url_scheme","protocol","url","host_port","source","kind","created_at","updated_at"]},"ListSandboxSnapshotsResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SandboxSnapshot"}}},"required":["items"]},"SandboxSnapshot":{"type":"object","properties":{"id":{"type":"string"},"snapshot":{"type":"string"},"provider":{"type":"string"},"host_id":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"source_sandbox_id":{"type":"string","nullable":true},"source_sandbox_name":{"type":"string","nullable":true},"repository_id":{"type":"string","nullable":true},"repository_url":{"type":"string","nullable":true},"base_snapshot":{"type":"string","nullable":true},"sandbox_preset":{"type":"string","nullable":true},"sandbox_size":{"type":"string","nullable":true},"capture_mode":{"type":"string","nullable":true},"state":{"type":"string"},"error_message":{"type":"string","nullable":true},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"daytona":{"$ref":"#/components/schemas/ExperimentalDaytonaSnapshot"}},"required":["id","snapshot","provider","host_id","description","source_sandbox_id","source_sandbox_name","repository_id","repository_url","base_snapshot","sandbox_preset","sandbox_size","capture_mode","state","error_message","created_at","updated_at","daytona"]},"ExperimentalDaytonaSnapshot":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"state":{"type":"string"},"imageName":{"type":"string"},"cpu":{"type":"number"},"memory":{"type":"number"},"disk":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["name"],"additionalProperties":{"nullable":true}},"CreateSandboxSnapshotRequest":{"type":"object","properties":{"sandbox_id":{"type":"string","minLength":1,"description":"Source sandbox, by id."},"sandbox_name":{"type":"string","minLength":1,"description":"Source sandbox, by name."},"sandbox_ref":{"type":"string","minLength":1,"description":"Source sandbox, by id or name; rejected if both match."},"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["scrub_and_delete","full"],"default":"scrub_and_delete","description":"scrub_and_delete (default): remove Amika-injected secrets (credential files + injected env vars) from the sandbox, capture the snapshot from the clean filesystem, then delete the source sandbox. full: capture everything as-is — including secrets — and keep the sandbox running."}},"required":["name"]},"SandboxScrubPreviewResponse":{"type":"object","properties":{"files":{"type":"array","items":{"type":"string"}},"restored_files":{"type":"array","items":{"type":"string"}},"env_vars":{"type":"array","items":{"type":"string"}}},"required":["files","restored_files","env_vars"]},"SandboxSlackMetadataResponse":{"type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"object","properties":{"conversation_id":{"type":"string","nullable":true},"team_id":{"type":"string"},"team_name":{"type":"string","nullable":true},"team_icon_url":{"type":"string","nullable":true},"channel_id":{"type":"string"},"channel_name":{"type":"string","nullable":true},"thread_id":{"type":"string"},"preview":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"agent_name":{"type":"string","nullable":true,"enum":["claude","codex",null]}},"required":["conversation_id","team_id","team_name","team_icon_url","channel_id","channel_name","thread_id","preview","status","agent_name"]}}},"required":["metadata"]},"CreateSandboxBindingResponse":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"CreateSandboxBindingRequest":{"anyOf":[{"type":"object","properties":{"target_url":{"type":"string","format":"uri"}},"required":["target_url"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"object","properties":{"kind":{"type":"string","enum":["github_branch"]},"repository":{"type":"object","properties":{"owner":{"type":"string","minLength":1,"maxLength":255},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["owner","name"],"additionalProperties":false},"branch":{"type":"string","minLength":1,"maxLength":1024}},"required":["kind","repository","branch"],"additionalProperties":false},"rebind":{"type":"boolean","default":false}},"required":["target"],"additionalProperties":false}]},"ListSandboxesResponse":{"type":"array","items":{"$ref":"#/components/schemas/Sandbox"}},"Sandbox":{"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string","nullable":true},"org_id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string","nullable":true},"provider_sandbox_id":{"type":"string","nullable":true},"amika_opencode_web":{"type":"string","nullable":true},"repo_name":{"type":"string","nullable":true},"repo_provider":{"type":"string","nullable":true},"repo_id":{"type":"string","nullable":true},"repo_url":{"type":"string","nullable":true},"branch":{"type":"string","nullable":true},"commit_hash":{"type":"string","nullable":true},"snapshot":{"type":"string","nullable":true},"snapshot_name":{"type":"string","nullable":true},"sandbox_preset":{"type":"string","nullable":true},"sandbox_size":{"type":"string","nullable":true},"sandbox_size_config":{"type":"object","nullable":true,"properties":{"name":{"type":"string","nullable":true},"vcpus":{"type":"number"},"memoryGib":{"type":"number"},"diskGib":{"type":"number"},"diskGrowOnly":{"type":"boolean"}},"required":["name","vcpus","memoryGib","diskGib","diskGrowOnly"]},"github_auth_mode":{"type":"string","nullable":true,"enum":["pat","app_token",null]},"github_credential_provisioned":{"type":"boolean","nullable":true},"error_message":{"type":"string","nullable":true},"current_session_id":{"type":"string","nullable":true},"services":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"hostPort":{"type":"integer"},"containerPort":{"type":"integer"},"protocol":{"type":"string"},"kind":{"type":"string","enum":["system","user"]}},"required":["name","url","hostPort","containerPort","protocol"]}},"state":{"type":"string"},"status":{"type":"string","enum":["creating","starting","running","stopping","stopped","suspending","suspended","snapshotting","failed","unknown"]},"setup_status":{"type":"string","nullable":true,"enum":["ok","setup-running","git-failed","setup-failed","sys-setup-failed",null]},"urls_expire_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"nullable":true}]},"secret_names":{"type":"array","items":{"type":"string"}},"mounted_secrets":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"scope":{"type":"string","enum":["user","org"]},"managed":{"type":"boolean"},"credential_type":{"type":"string","nullable":true,"enum":["api_key","oauth",null]},"provider":{"type":"string","nullable":true}},"required":["name","scope","managed","credential_type","provider"]}},"resolved_agent_credentials":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string"},"outcome":{"type":"string","enum":["resolved"]},"name":{"type":"string"},"type":{"type":"string","enum":["oauth","api_key"]},"source":{"type":"string"}},"required":["kind","outcome","name","type","source"]},{"type":"object","properties":{"kind":{"type":"string"},"outcome":{"type":"string","enum":["skipped"]},"reason":{"type":"string","enum":["request:none","no_user_credential"]}},"required":["kind","outcome","reason"]}]}},"agent_credentials":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"name":{"type":"string","nullable":true},"scope":{"type":"string","nullable":true,"enum":["user","org",null]},"credential_type":{"type":"string","nullable":true,"enum":["api_key","oauth",null]},"inject_target":{"type":"string","nullable":true}},"required":["kind","name","scope","credential_type","inject_target"]}},"created_by":{"type":"object","nullable":true,"properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true}},"required":["name","email"]},"agent_cwd":{"type":"string","nullable":true},"ssh_key_status":{"type":"string","enum":["ready","no-key","stale-keys","unknown"]},"origin":{"type":"string","nullable":true},"host_id":{"type":"string","nullable":true},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","user_id","org_id","name","provider","provider_sandbox_id","amika_opencode_web","repo_name","repo_provider","repo_id","repo_url","branch","commit_hash","snapshot","current_session_id","services","created_at","updated_at"],"additionalProperties":{"nullable":true}},"CreateSandboxRequest":{"type":"object","properties":{"name":{"type":"string"},"repo_url":{"type":"string","minLength":1},"git_url":{"type":"string","minLength":1},"github_url":{"type":"string","minLength":1},"branch":{"type":"string","minLength":1},"new_branch_name":{"type":"string","minLength":1},"provider":{"type":"string","enum":["daytona","e2b","freestyle","vercel","smol","amika-hostd"]},"host_id":{"type":"string","minLength":1},"resources":{"type":"object","properties":{"vcpus":{"type":"integer","minimum":1,"maximum":16},"memoryGib":{"type":"number","minimum":0.0625},"diskGib":{"type":"integer","minimum":1}},"required":["vcpus","memoryGib","diskGib"],"additionalProperties":false,"description":"With `host_id`, the rig's resources, in place of a named `size`: 1 to 16 vCPUs, at least 64 MiB of memory in whole MiB, and a disk of at least 1 GiB. Requires `host_id`, and cannot be combined with `size`."},"auto_stop_interval":{"type":"number","minimum":0,"maximum":10080},"auto_delete_interval":{"type":"number","minimum":-1,"maximum":10080},"amika_opencode_web":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true}]},"env_vars":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"secret_env_vars":{"type":"object","additionalProperties":{"type":"string","minLength":1},"default":{}},"disabled_repo_env_var_names":{"type":"array","items":{"type":"string","pattern":"^[A-Z_][A-Z0-9_]*$"},"default":[]},"setup_script_text":{"type":"string"},"skip_setup_script":{"type":"boolean","default":false},"agent_credentials":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["claude","codex"]},"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["oauth","api_key"]},"none":{"type":"boolean","enum":[true]}},"required":["kind"]},"default":[]},"preset":{"type":"string","enum":["coder","coder-plus-docker"]},"size":{"type":"string","minLength":1,"description":"Providerless sandbox size (for example `a0.m`). Legacy names such as `m` and `medium` are also accepted. The provider is inferred from `provider` or the server default; when omitted, the size defaults to that provider's medium tier. With `host_id`, names one of the host's own sizes instead; a host rig with neither `size` nor `resources` gets 4 vCPUs, 8 GiB of memory and a 20 GiB disk."},"snapshot":{"type":"string","nullable":true,"minLength":1},"integration_ids":{"type":"array","items":{"type":"string"}},"initial_prompt":{"type":"string"},"agent":{"type":"string","enum":["claude","codex"]},"workflow":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"github_auth_mode":{"type":"string","enum":["pat","app_token"]}},"required":["name"]},"GetSandboxResponse":{"allOf":[{"$ref":"#/components/schemas/Sandbox"},{"type":"object","properties":{"hostname":{"type":"string"}},"required":["hostname"],"additionalProperties":{"nullable":true}}]},"OkStatus":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]},"DirectWebSocketSshSessionResponse":{"type":"object","properties":{"session_id":{"type":"string","minLength":1},"transport":{"type":"string","enum":["direct_ws"]},"connect_url":{"type":"string","format":"uri"},"connect_credential":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"sandbox_id":{"type":"string","minLength":1},"ssh_user":{"type":"string","enum":["amika"]},"host_public_key":{"type":"string","pattern":"^ssh-ed25519 [A-Za-z0-9+/]+={0,3}(?: [^\\r\\n]+)?$"}},"required":["session_id","transport","connect_url","connect_credential","sandbox_id","ssh_user","host_public_key"]},"TerminalTicketResponse":{"type":"object","properties":{"ticket":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"org_id":{"type":"string"}},"required":["ticket","org_id"]},"SandboxIntegrationsResponse":{"type":"array","items":{"type":"object","properties":{"sandbox_id":{"type":"string"},"name":{"type":"string"},"mcp_server_type":{"type":"string"},"mcp_server_url":{"type":"string"}},"required":["sandbox_id","name","mcp_server_type","mcp_server_url"]}},"SlackConversationResponse":{"type":"object","properties":{"conversation":{"type":"object","nullable":true,"properties":{"conversation_id":{"type":"string"},"team_id":{"type":"string"},"team_name":{"type":"string","nullable":true},"channel_id":{"type":"string"},"channel_name":{"type":"string","nullable":true},"thread_id":{"type":"string"},"status":{"type":"string","nullable":true},"agent_name":{"type":"string","nullable":true,"enum":["claude","codex",null]},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"author":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound"]},"contents":{"type":"string"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"is_error":{"type":"boolean"}},"required":["id","author","direction","contents","occurred_at","is_error"]}}},"required":["conversation_id","team_id","team_name","channel_id","channel_name","thread_id","status","agent_name","messages"]}},"required":["conversation"]},"AgentSessionsList":{"type":"object","properties":{"sessions":{"type":"array","items":{"$ref":"#/components/schemas/AgentSession"}},"total":{"type":"integer","minimum":0}},"required":["sessions","total"]},"AgentSession":{"type":"object","properties":{"id":{"type":"string"},"sandbox_id":{"type":"string"},"org_id":{"type":"string"},"agent_name":{"type":"string"},"status":{"type":"string"},"started_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"ended_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"nullable":true}]},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"preview":{"type":"string","nullable":true},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","sandbox_id","org_id","agent_name","status","started_at","ended_at","metadata","created_at","updated_at"]},"CreateSessionRequest":{"type":"object","properties":{"agent_name":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"nullable":true}}},"required":["agent_name"]},"UpdateSessionRequest":{"type":"object","properties":{"status":{"type":"string","enum":["active","completed","failed"]},"metadata":{"type":"object","additionalProperties":{"nullable":true}}}},"WorkflowEventsResponse":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"event_type":{"type":"string"},"id":{"type":"string"},"time":{"type":"string"},"step":{"type":"string"},"contents":{"nullable":true}},"required":["event_type","id","time"]}},"count":{"type":"integer"},"capped":{"type":"boolean"}},"required":["events","count","capped"]},"SandboxLifecycleEventsResponse":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/SandboxLifecycleEvent"}},"count":{"type":"integer"}},"required":["events","count"]},"SandboxLifecycleEvent":{"type":"object","properties":{"id":{"type":"string"},"run_kind":{"type":"string"},"step":{"type":"string"},"status":{"type":"string"},"detail":{"type":"string","nullable":true},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","run_kind","step","status","detail","created_at"]},"SandboxServiceInput":{"type":"object","properties":{"name":{"type":"string","description":"Service name: a single DNS label, unique per sandbox."},"port":{"type":"integer","minimum":1,"maximum":65535,"description":"Container port the service listens on."},"url_scheme":{"type":"string","enum":["http","https"],"description":"URL scheme the gateway serves the service over."}},"required":["name","port","url_scheme"]},"SandboxServiceToken":{"type":"object","properties":{"url":{"type":"string","description":"The service's address on the rig's host, ending in `/`. It carries no credential."},"header":{"type":"string","description":"The request header the token goes in, as `Bearer <token>`.","example":"X-Amika-Authorization"},"token":{"type":"string"},"expires_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["url","header","token","expires_at"]},"SshPublicKeySummary":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"public_key":{"type":"string"},"scope":{"type":"string","enum":["user"]}},"required":["id","name","public_key","scope"]},"UpsertSshPublicKeyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"public_key":{"type":"string","minLength":1,"maxLength":1024}},"required":["name","public_key"]},"ListSshPublicKeysResponse":{"type":"array","items":{"$ref":"#/components/schemas/SshPublicKeySummary"}},"ListSecretsResponse":{"type":"array","items":{"$ref":"#/components/schemas/SecretSummary"}},"SecretSummary":{"type":"object","properties":{"id":{"type":"string"},"org_id":{"type":"string"},"user_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"scope":{"type":"string","enum":["user","org"]},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","org_id","user_id","name","description","scope","created_at","updated_at"]},"CreateSecretRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"scope":{"type":"string","enum":["user","org"]},"description":{"type":"string","nullable":true}},"required":["name","value"]},"UpdateSecretRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"scope":{"type":"string","enum":["user","org"]},"description":{"type":"string","nullable":true}}},"ListCredentialsResponse":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["oauth","api_key"]},"scope":{"type":"string","enum":["user","org"]}},"required":["id","name","type","scope"]}},"CreateCredentialRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"type":{"type":"string","enum":["oauth","api_key"]},"scope":{"type":"string","enum":["user","org"]}},"required":["name","value","type"]},"RevealSecretResponse":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"CreateCodexCredentialRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"type":{"type":"string","enum":["oauth","api_key"]},"scope":{"type":"string","enum":["user","org"]}},"required":["name","value","type"]},"PiStatus":{"type":"object","properties":{"configured":{"type":"boolean"},"secretId":{"type":"string","nullable":true}},"required":["configured"]},"UpsertPiRequest":{"type":"object","properties":{"authJson":{"type":"string","minLength":1},"source":{"type":"object","properties":{"agent":{"type":"string","enum":["claude","codex"]},"secretId":{"type":"string","minLength":1}},"required":["agent","secretId"]}}},"ServiceDefinition":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"ports":{"type":"array","items":{"type":"object","properties":{"port":{"type":"integer"},"protocol":{"type":"string"},"url_scheme":{"type":"string","nullable":true}},"required":["port","protocol","url_scheme"]}},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","name","ports","created_at","updated_at"]},"SlackOrgSettings":{"type":"object","properties":{"org_id":{"type":"string"},"repository_id":{"type":"string","nullable":true},"agent_name":{"type":"string","nullable":true,"enum":["claude","codex",null]},"system_prompt":{"type":"string","nullable":true},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["org_id","repository_id","agent_name","system_prompt","created_at","updated_at"]},"SlackOrgSettingsUpsert":{"type":"object","properties":{"repository_id":{"type":"string","nullable":true,"minLength":1},"agent_name":{"type":"string","nullable":true,"enum":["claude","codex",null]},"system_prompt":{"type":"string","nullable":true}},"required":["repository_id","agent_name","system_prompt"]},"SlackChannelSettingsList":{"type":"object","properties":{"settings":{"type":"array","items":{"$ref":"#/components/schemas/SlackChannelSettings"}},"seen_channels":{"type":"array","items":{"$ref":"#/components/schemas/SlackSeenChannel"}}},"required":["settings","seen_channels"]},"SlackChannelSettings":{"type":"object","properties":{"org_id":{"type":"string"},"slack_team_id":{"type":"string"},"slack_channel_id":{"type":"string"},"repository_id":{"type":"string","nullable":true},"agent_name":{"type":"string","nullable":true,"enum":["claude","codex",null]},"system_prompt":{"type":"string","nullable":true},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["org_id","slack_team_id","slack_channel_id","repository_id","agent_name","system_prompt","created_at","updated_at"]},"SlackSeenChannel":{"type":"object","properties":{"slack_team_id":{"type":"string"},"slack_team_name":{"type":"string","nullable":true},"slack_channel_id":{"type":"string"},"slack_channel_name":{"type":"string","nullable":true},"last_seen_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["slack_team_id","slack_team_name","slack_channel_id","slack_channel_name","last_seen_at"]},"SlackChannelSettingsUpsert":{"type":"object","properties":{"slack_team_id":{"type":"string","minLength":1},"slack_channel_id":{"type":"string","minLength":1},"repository_id":{"type":"string","nullable":true,"minLength":1},"agent_name":{"type":"string","nullable":true,"enum":["claude","codex",null]},"system_prompt":{"type":"string","nullable":true}},"required":["slack_team_id","slack_channel_id"]},"SlackChannelSettingsDelete":{"type":"object","properties":{"slack_team_id":{"type":"string","minLength":1},"slack_channel_id":{"type":"string","minLength":1}},"required":["slack_team_id","slack_channel_id"]},"LinearOrgSettings":{"type":"object","properties":{"org_id":{"type":"string"},"repository_id":{"type":"string","nullable":true},"agent_name":{"type":"string","nullable":true,"enum":["claude","codex",null]},"system_prompt":{"type":"string","nullable":true},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["org_id","repository_id","agent_name","system_prompt","created_at","updated_at"]},"LinearOrgSettingsUpsert":{"type":"object","properties":{"repository_id":{"type":"string","nullable":true,"minLength":1},"agent_name":{"type":"string","nullable":true,"enum":["claude","codex",null]},"system_prompt":{"type":"string","nullable":true}},"required":["repository_id","agent_name","system_prompt"]},"UploadResponse":{"type":"object","properties":{"bucket":{"type":"string"},"path":{"type":"string"},"upload_url":{"type":"string"},"token":{"type":"string"},"expires_in":{"type":"integer"}},"required":["bucket","path","upload_url","token","expires_in"]},"CreateUploadRequest":{"type":"object","properties":{"filename":{"type":"string","minLength":1},"upsert":{"type":"boolean","default":false}},"required":["filename"]},"UploadBatchResponse":{"type":"object","properties":{"bucket":{"type":"string"},"objects":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"upload_url":{"type":"string"},"token":{"type":"string"}},"required":["path","upload_url","token"]}},"expires_in":{"type":"integer"}},"required":["bucket","objects","expires_in"]},"CreateUploadBatchRequest":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string","minLength":1},"upsert":{"type":"boolean","default":false}},"required":["filename"]},"minItems":1,"maxItems":100}},"required":["files"]},"ListDownloadsResponse":{"type":"object","properties":{"bucket":{"type":"string"},"prefix":{"type":"string"},"objects":{"type":"array","items":{"$ref":"#/components/schemas/DownloadObject"}},"expires_in":{"type":"integer"},"next_cursor":{"type":"string","nullable":true}},"required":["bucket","prefix","objects","expires_in","next_cursor"]},"DownloadObject":{"type":"object","properties":{"key":{"type":"string"},"size":{"type":"integer"},"last_modified":{"type":"string"},"download_url":{"type":"string"}},"required":["key","download_url"]},"DownloadResponse":{"type":"object","properties":{"bucket":{"type":"string"},"path":{"type":"string"},"download_url":{"type":"string"},"expires_in":{"type":"integer"}},"required":["bucket","path","download_url","expires_in"]},"CreateDownloadRequest":{"type":"object","properties":{"filename":{"type":"string","minLength":1},"download":{"type":"boolean","default":false}},"required":["filename"]}},"parameters":{}},"paths":{"/agent-sessions":{"post":{"tags":["AgentSessions"],"summary":"Send a message to a coding agent, creating a sandbox if needed","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionSendRequest"}}}},"responses":{"200":{"description":"Agent response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionSendResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"get":{"tags":["AgentSessions"],"summary":"List the org's agent-session chats","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":200},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Agent-session chats, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAgentSessionsResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/agent-sessions/stream":{"post":{"tags":["AgentSessions"],"summary":"Send a message to a coding agent, streaming the reply (SSE)","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionSendRequest"}}}},"responses":{"200":{"description":"A `text/event-stream` of the send. Frames are named by the SSE `event:` field: `status`, `delta`, terminal `done` (the full `AgentSessionSendResponse`), or `error`.","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/AgentSessionStreamFrame"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/agent-sessions/{id}":{"get":{"tags":["AgentSessions"],"summary":"Read an agent session","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Agent session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionDetail"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/agent-sessions/{id}/events":{"get":{"tags":["AgentSessions"],"summary":"Stream a session's events (SSE)","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","pattern":"^\\d+$"},"required":false,"name":"after_seq","in":"query"},{"schema":{"type":"string","pattern":"^\\d+$"},"required":false,"name":"max_ms","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false","yes","no"]},"required":false,"name":"follow","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_raw","in":"query"}],"responses":{"200":{"description":"A `text/event-stream` of the session's events. Each event frame's `id` is the event `seq` (a resume cursor); `event` is the kind. Control frames `done`/`timeout`/`heartbeat`/`error` are also sent.","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/AgentSessionEventFrame"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/api-keys":{"get":{"tags":["API keys"],"summary":"List API keys","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","enum":["organization","user"],"description":"Restrict the listing to a single scope. Omit to list both organization- and user-scoped keys merged together.","example":"organization"},"required":false,"description":"Restrict the listing to a single scope. Omit to list both organization- and user-scoped keys merged together.","name":"scope","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Pagination cursor returned by a previous list call.","example":"cursor-2"},"required":false,"description":"Pagination cursor returned by a previous list call.","name":"after","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Maximum number of API keys to return.","example":25},"required":false,"description":"Maximum number of API keys to return.","name":"limit","in":"query"}],"responses":{"200":{"description":"Page of API keys visible to the caller: organization-scoped keys for their org plus user-scoped keys they own, unless narrowed with `scope`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListApiKeysResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"post":{"tags":["API keys"],"summary":"Create an API key","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"responses":{"201":{"description":"Created API key, including its plaintext value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyWithValue"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/api-keys/{id}":{"delete":{"tags":["API keys"],"summary":"Delete an API key","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"WorkOS API key id.","example":"key_01H..."},"required":true,"description":"WorkOS API key id.","name":"id","in":"path"},{"schema":{"type":"string","enum":["organization","user"],"default":"organization","description":"Scope of the key to delete. Defaults to `organization`; pass `user` to revoke a user-scoped key.","example":"organization"},"required":false,"description":"Scope of the key to delete. Defaults to `organization`; pass `user` to revoke a user-scoped key.","name":"scope","in":"query"}],"responses":{"204":{"description":"API key deleted."},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/docker-registries":{"get":{"tags":["Docker registries"],"summary":"List the org's docker registries","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"200":{"description":"Array of docker registries owned by the caller's org.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDockerRegistriesResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"post":{"tags":["Docker registries"],"summary":"Register a docker registry","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDockerRegistryRequest"}}}},"responses":{"201":{"description":"Created docker registry row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DockerRegistry"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"502":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/docker-registries/{id}":{"delete":{"tags":["Docker registries"],"summary":"Delete a docker registry","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"502":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/git-user-settings":{"get":{"tags":["Git user settings"],"summary":"Read the caller's git user settings","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"200":{"description":"Configured git user settings, or a suggestion derived from the WorkOS profile when none are saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitUserSettingsResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"post":{"tags":["Git user settings"],"summary":"Create or update the caller's git user settings","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertGitUserSettingsRequest"}}}},"responses":{"201":{"description":"Updated row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitUserSettingsRow"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/hosts":{"get":{"tags":["Hosts"],"summary":"List the organization's hosts","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"200":{"description":"Hosts in the caller's organization.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Host"}}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"post":{"tags":["Hosts"],"summary":"Register an organization host","description":"Idempotent by hostname: registering a hostname the organization already has returns that host with 200 and leaves its stored secret and sizes unchanged. Use PUT to rotate the secret or replace the sizes.","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateHostRequest"}}}},"responses":{"200":{"description":"Host already registered. The secret value is never returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Host"}}}},"201":{"description":"Created host. The secret value is never returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Host"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/hosts/{id}":{"get":{"tags":["Hosts"],"summary":"Get an organization host","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","pattern":"^host_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Host metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Host"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"put":{"tags":["Hosts"],"summary":"Replace an organization host","description":"hostname is required. Omit secret to keep the stored credential; omit url to keep the stored URL, or send it as null to clear it; omit sizes to keep the stored sizes, or send {} to clear them.","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","pattern":"^host_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceHostRequest"}}}},"responses":{"200":{"description":"Updated host. The secret value is never returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Host"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"delete":{"tags":["Hosts"],"summary":"Delete an organization host and its stored secret","description":"Refused with 409 while any rig still runs on the host.","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","pattern":"^host_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Host deleted."},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/hosts/{id}/reveal":{"post":{"tags":["Hosts"],"summary":"Reveal an organization host's secret","description":"Only a signed-in user can reveal a host's secret; an API key or other service identity is refused with 403. A POST rather than a GET so the value is never cached or prefetched.","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","pattern":"^host_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The host's secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevealHostSecretResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/integrations/credentials":{"get":{"tags":["Integrations"],"summary":"List the caller's connected integrations","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"200":{"description":"Connected integration providers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListIntegrationCredentialsResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/integrations/{provider}/credentials":{"delete":{"tags":["Integrations"],"summary":"Disconnect an integration provider for the caller","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"provider","in":"path"}],"responses":{"204":{"description":"Disconnected."},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/repositories":{"get":{"tags":["Repositories"],"summary":"List the org's repositories","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"200":{"description":"Array of repositories.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRepositoriesResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"post":{"tags":["Repositories"],"summary":"Create or update a repository","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRepositoryRequest"}}}},"responses":{"201":{"description":"Created or upserted repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Repository"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/repositories/{id}":{"get":{"tags":["Repositories"],"summary":"Read a single repository","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Repository"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/repositories/{id}/image":{"delete":{"tags":["Repositories"],"summary":"Clear repository image config","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Cleared."},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/repositories/{id}/integrations":{"get":{"tags":["Repositories"],"summary":"List a repository's MCP integrations","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Integrations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoIntegrationsResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"put":{"tags":["Repositories"],"summary":"Replace a repository's MCP integrations","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertIntegrationsRequest"}}}},"responses":{"200":{"description":"Updated integrations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoIntegrationsResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/repositories/{id}/workflow":{"get":{"tags":["Repositories"],"summary":"Read a repository's workflow","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Workflow (or null when none configured).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"put":{"tags":["Repositories"],"summary":"Replace a repository's workflow","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertWorkflowRequest"}}}},"responses":{"200":{"description":"Updated workflow.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"delete":{"tags":["Repositories"],"summary":"Clear a repository's workflow","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Cleared."},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandbox-bindings":{"get":{"tags":["SandboxBindings"],"summary":"List sandbox bindings for the caller's organization","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"200":{"description":"Bindings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSandboxBindingsResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandbox-bindings/{id}":{"delete":{"tags":["SandboxBindings"],"summary":"Delete a sandbox binding","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandbox-services":{"get":{"tags":["SandboxServices"],"summary":"List live sandbox services for the caller's org","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"Only this sandbox's services, by sandbox id."},"required":false,"description":"Only this sandbox's services, by sandbox id.","name":"sandbox_id","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Only this sandbox's services, by sandbox name."},"required":false,"description":"Only this sandbox's services, by sandbox name.","name":"sandbox_name","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Only this sandbox's services, by id or name (rejected if both match)."},"required":false,"description":"Only this sandbox's services, by id or name (rejected if both match).","name":"sandbox_ref","in":"query"}],"responses":{"200":{"description":"Services.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSandboxServicesResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandbox-snapshots":{"get":{"tags":["SandboxSnapshots"],"summary":"List sandbox-captured snapshots for the caller's org","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","description":"If set, only return snapshots taken from sandboxes attached to this repository."},"required":false,"description":"If set, only return snapshots taken from sandboxes attached to this repository.","name":"repository_id","in":"query"},{"schema":{"type":"string","description":"If set, only return snapshots captured from this sandbox."},"required":false,"description":"If set, only return snapshots captured from this sandbox.","name":"source_sandbox_id","in":"query"}],"responses":{"200":{"description":"Snapshots.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSandboxSnapshotsResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"post":{"tags":["SandboxSnapshots"],"summary":"Start capturing a snapshot from a running sandbox","description":"Validates the request, records a snapshot in the `capturing` state, and runs the (slow) Daytona capture in the background. Returns 202 immediately; poll the listing for the row to reach `active`/`failed`.","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSandboxSnapshotRequest"}}}},"responses":{"202":{"description":"Snapshot capture started.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxSnapshot"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"502":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandbox-snapshots/scrub-preview":{"get":{"tags":["SandboxSnapshots"],"summary":"Preview which injected secrets a 'snapshot and delete' would remove","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"The sandbox whose injected secrets would be scrubbed."},"required":false,"description":"The sandbox whose injected secrets would be scrubbed.","name":"sandbox","in":"query"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret `sandbox`: name (default), id, or ref/name_or_id (matches either; rejects ambiguity)."},"required":false,"description":"How to interpret `sandbox`: name (default), id, or ref/name_or_id (matches either; rejects ambiguity).","name":"by","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Deprecated: use `sandbox` with `by=id` instead."},"required":false,"description":"Deprecated: use `sandbox` with `by=id` instead.","name":"sandbox_id","in":"query"}],"responses":{"200":{"description":"Secrets that would be scrubbed and files reset to a baseline (paths + names only).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxScrubPreviewResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"502":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandbox-snapshots/{ref}":{"get":{"tags":["SandboxSnapshots"],"summary":"Read a sandbox snapshot by name (default) or id","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"Snapshot reference: its fully-qualified name (default) or row id. Use the `by` query param to choose."},"required":true,"description":"Snapshot reference: its fully-qualified name (default) or row id. Use the `by` query param to choose.","name":"ref","in":"path"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret the reference: name (default), id, or ref/name_or_id (matches either; rejects ambiguity)."},"required":false,"description":"How to interpret the reference: name (default), id, or ref/name_or_id (matches either; rejects ambiguity).","name":"by","in":"query"}],"responses":{"200":{"description":"Snapshot.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxSnapshot"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"502":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"delete":{"tags":["SandboxSnapshots"],"summary":"Delete a sandbox snapshot by name (default) or id","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"Snapshot reference: its fully-qualified name (default) or row id. Use the `by` query param to choose."},"required":true,"description":"Snapshot reference: its fully-qualified name (default) or row id. Use the `by` query param to choose.","name":"ref","in":"path"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret the reference: name (default), id, or ref/name_or_id (matches either; rejects ambiguity)."},"required":false,"description":"How to interpret the reference: name (default), id, or ref/name_or_id (matches either; rejects ambiguity).","name":"by","in":"query"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"502":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rig-services":{"get":{"tags":["SandboxServices"],"summary":"List live sandbox services for the caller's org","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"Only this sandbox's services, by sandbox id."},"required":false,"description":"Only this sandbox's services, by sandbox id.","name":"sandbox_id","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Only this sandbox's services, by sandbox name."},"required":false,"description":"Only this sandbox's services, by sandbox name.","name":"sandbox_name","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Only this sandbox's services, by id or name (rejected if both match)."},"required":false,"description":"Only this sandbox's services, by id or name (rejected if both match).","name":"sandbox_ref","in":"query"}],"responses":{"200":{"description":"Services.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSandboxServicesResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rig-snapshots":{"get":{"tags":["SandboxSnapshots"],"summary":"List sandbox-captured snapshots for the caller's org","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","description":"If set, only return snapshots taken from sandboxes attached to this repository."},"required":false,"description":"If set, only return snapshots taken from sandboxes attached to this repository.","name":"repository_id","in":"query"},{"schema":{"type":"string","description":"If set, only return snapshots captured from this sandbox."},"required":false,"description":"If set, only return snapshots captured from this sandbox.","name":"source_sandbox_id","in":"query"}],"responses":{"200":{"description":"Snapshots.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSandboxSnapshotsResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"post":{"tags":["SandboxSnapshots"],"summary":"Start capturing a snapshot from a running sandbox","description":"Validates the request, records a snapshot in the `capturing` state, and runs the (slow) Daytona capture in the background. Returns 202 immediately; poll the listing for the row to reach `active`/`failed`.","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSandboxSnapshotRequest"}}}},"responses":{"202":{"description":"Snapshot capture started.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxSnapshot"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"502":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rig-snapshots/scrub-preview":{"get":{"tags":["SandboxSnapshots"],"summary":"Preview which injected secrets a 'snapshot and delete' would remove","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"The sandbox whose injected secrets would be scrubbed."},"required":false,"description":"The sandbox whose injected secrets would be scrubbed.","name":"sandbox","in":"query"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret `sandbox`: name (default), id, or ref/name_or_id (matches either; rejects ambiguity)."},"required":false,"description":"How to interpret `sandbox`: name (default), id, or ref/name_or_id (matches either; rejects ambiguity).","name":"by","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Deprecated: use `sandbox` with `by=id` instead."},"required":false,"description":"Deprecated: use `sandbox` with `by=id` instead.","name":"sandbox_id","in":"query"}],"responses":{"200":{"description":"Secrets that would be scrubbed and files reset to a baseline (paths + names only).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxScrubPreviewResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"502":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rig-snapshots/{ref}":{"get":{"tags":["SandboxSnapshots"],"summary":"Read a sandbox snapshot by name (default) or id","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"Snapshot reference: its fully-qualified name (default) or row id. Use the `by` query param to choose."},"required":true,"description":"Snapshot reference: its fully-qualified name (default) or row id. Use the `by` query param to choose.","name":"ref","in":"path"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret the reference: name (default), id, or ref/name_or_id (matches either; rejects ambiguity)."},"required":false,"description":"How to interpret the reference: name (default), id, or ref/name_or_id (matches either; rejects ambiguity).","name":"by","in":"query"}],"responses":{"200":{"description":"Snapshot.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxSnapshot"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"502":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"delete":{"tags":["SandboxSnapshots"],"summary":"Delete a sandbox snapshot by name (default) or id","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"Snapshot reference: its fully-qualified name (default) or row id. Use the `by` query param to choose."},"required":true,"description":"Snapshot reference: its fully-qualified name (default) or row id. Use the `by` query param to choose.","name":"ref","in":"path"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret the reference: name (default), id, or ref/name_or_id (matches either; rejects ambiguity)."},"required":false,"description":"How to interpret the reference: name (default), id, or ref/name_or_id (matches either; rejects ambiguity).","name":"by","in":"query"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"502":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandboxes:slackMetadata":{"get":{"tags":["Sandboxes"],"summary":"Slack metadata for the org's Slack-made sandboxes","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"200":{"description":"Map of sandbox id to Slack metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxSlackMetadataResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rigs:slackMetadata":{"get":{"tags":["Sandboxes"],"summary":"Slack metadata for the org's Slack-made sandboxes","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"200":{"description":"Map of sandbox id to Slack metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxSlackMetadataResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandboxes/{sandbox_ref}/bindings":{"post":{"tags":["SandboxBindings"],"summary":"Bind a sandbox to a GitHub branch or pull request","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"sandbox_ref","in":"path"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to resolve the parent sandbox: ref/name_or_id (default), name, or id."},"required":false,"description":"How to resolve the parent sandbox: ref/name_or_id (default), name, or id.","name":"sandbox_by","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSandboxBindingRequest"}}}},"responses":{"201":{"description":"Binding created or already present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSandboxBindingResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"get":{"tags":["SandboxBindings"],"summary":"List a sandbox's bindings","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"sandbox_ref","in":"path"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to resolve the parent sandbox: ref/name_or_id (default), name, or id."},"required":false,"description":"How to resolve the parent sandbox: ref/name_or_id (default), name, or id.","name":"sandbox_by","in":"query"}],"responses":{"200":{"description":"Bindings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSandboxBindingsResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandboxes":{"get":{"tags":["Sandboxes"],"summary":"List the org's sandboxes","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"If set, only return rigs on this one of the organization's own hosts."},"required":false,"description":"If set, only return rigs on this one of the organization's own hosts.","name":"host_id","in":"query"}],"responses":{"200":{"description":"Sandboxes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSandboxesResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"post":{"tags":["Sandboxes"],"summary":"Create a sandbox","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSandboxRequest"}}}},"responses":{"202":{"description":"Sandbox created (provisioning continues in the background).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandboxes/{id}":{"get":{"tags":["Sandboxes"],"summary":"Read a sandbox by id or name","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Sandbox with its guest DNS hostname.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSandboxResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"delete":{"tags":["Sandboxes"],"summary":"Delete a sandbox","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkStatus"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandboxes/{id}/start":{"post":{"tags":["Sandboxes"],"summary":"Start a sandbox","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"skip_start_script","in":"query"}],"responses":{"202":{"description":"Sandbox start scheduled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkStatus"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandboxes/{id}/stop":{"post":{"tags":["Sandboxes"],"summary":"Stop a sandbox","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"202":{"description":"Sandbox stop scheduled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkStatus"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandboxes/{id}/ssh-sessions":{"post":{"tags":["Sandboxes"],"summary":"Create a direct WebSocket SSH session","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"One no-relay SSH transport descriptor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectWebSocketSshSessionResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"503":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandboxes/{id}/terminal-tickets":{"post":{"tags":["Sandboxes"],"summary":"Mint a single-use web terminal ticket","description":"Returns a short-lived, single-use credential for one web terminal WebSocket upgrade. The upgrade cannot use the browser's session cookie, because browsers do not apply the same-origin policy to WebSockets.","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"One single-use terminal ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalTicketResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandboxes/{id}/integrations":{"get":{"tags":["Sandboxes"],"summary":"List a sandbox's integrations","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Integrations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxIntegrationsResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandboxes/{id}/slack-conversation":{"get":{"tags":["Sandboxes"],"summary":"Read the Slack conversation thread for a Slack-made sandbox","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Conversation thread, or `{ conversation: null }` when the sandbox was not made by Slack or has no conversation yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackConversationResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandboxes/{id}/sessions":{"get":{"tags":["Sandboxes"],"summary":"List a sandbox's agent sessions","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string"},"required":false,"name":"agent_name","in":"query"},{"schema":{"type":"string"},"required":false,"name":"exclude_source","in":"query"},{"schema":{"type":"string"},"required":false,"name":"source","in":"query"}],"responses":{"200":{"description":"Sessions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionsList"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"post":{"tags":["Sandboxes"],"summary":"Create a new agent session","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionRequest"}}}},"responses":{"201":{"description":"Session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionDetail"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandboxes/{id}/sessions/latest":{"get":{"tags":["Sandboxes"],"summary":"Read the latest agent session for a sandbox","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionDetail"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandboxes/{id}/sessions/{sessionId}":{"get":{"tags":["Sandboxes"],"summary":"Read an agent session","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionDetail"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"patch":{"tags":["Sandboxes"],"summary":"Update an agent session","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"sessionId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSessionRequest"}}}},"responses":{"200":{"description":"Updated session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionDetail"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandboxes/{id}/workflow/events":{"get":{"tags":["Sandboxes"],"summary":"Read workflow events from the sandbox event sink","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"since","in":"query"}],"responses":{"200":{"description":"Events list (empty when the file is missing).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowEventsResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandboxes/{id}/lifecycle-events":{"get":{"tags":["Sandboxes"],"summary":"Read the control-plane lifecycle event feed for a sandbox","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Lifecycle events, oldest first (empty when none).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxLifecycleEventsResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandboxes/{id}/services":{"get":{"tags":["Sandboxes"],"summary":"List a sandbox's live services","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match), name, or id."},"required":false,"description":"How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match), name, or id.","name":"sandbox_by","in":"query"}],"responses":{"200":{"description":"Services.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSandboxServicesResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"post":{"tags":["Sandboxes"],"summary":"Create a live service on a sandbox","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match), name, or id."},"required":false,"description":"How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match), name, or id.","name":"sandbox_by","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxServiceInput"}}}},"responses":{"201":{"description":"Service created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxService"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandboxes/{id}/services/{ref}":{"put":{"tags":["Sandboxes"],"summary":"Replace a live service on a sandbox","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Service reference: its name (default) or row id. Use `by` to choose."},"required":true,"description":"Service reference: its name (default) or row id. Use `by` to choose.","name":"ref","in":"path"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret the service `{ref}`: name (default), id, or ref/name_or_id (matches either; rejects ambiguity)."},"required":false,"description":"How to interpret the service `{ref}`: name (default), id, or ref/name_or_id (matches either; rejects ambiguity).","name":"by","in":"query"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match), name, or id."},"required":false,"description":"How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match), name, or id.","name":"sandbox_by","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxServiceInput"}}}},"responses":{"200":{"description":"Service replaced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxService"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"delete":{"tags":["Sandboxes"],"summary":"Delete a live service from a sandbox","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Service reference: its name (default) or row id. Use `by` to choose."},"required":true,"description":"Service reference: its name (default) or row id. Use `by` to choose.","name":"ref","in":"path"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret the service `{ref}`: name (default), id, or ref/name_or_id (matches either; rejects ambiguity)."},"required":false,"description":"How to interpret the service `{ref}`: name (default), id, or ref/name_or_id (matches either; rejects ambiguity).","name":"by","in":"query"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match), name, or id."},"required":false,"description":"How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match), name, or id.","name":"sandbox_by","in":"query"}],"responses":{"204":{"description":"Deleted."},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/sandboxes/{id}/services/{ref}/tokens":{"post":{"tags":["Sandboxes"],"summary":"Mint a token for a service of a rig on your own host","description":"For callers that are not browsers, such as `curl` or a script: send the token in the returned `header` as `Bearer <token>` to the returned `url`. Only for rigs on the organization's own hosts; never for `amikad`.","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Service reference: its name (default) or row id. Use `by` to choose."},"required":true,"description":"Service reference: its name (default) or row id. Use `by` to choose.","name":"ref","in":"path"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret the service `{ref}`: name (default), id, or ref/name_or_id (matches either; rejects ambiguity)."},"required":false,"description":"How to interpret the service `{ref}`: name (default), id, or ref/name_or_id (matches either; rejects ambiguity).","name":"by","in":"query"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match), name, or id."},"required":false,"description":"How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match), name, or id.","name":"sandbox_by","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":86400,"description":"How long the token lives, in seconds: 1 to 86400. Defaults to an hour."},"required":false,"description":"How long the token lives, in seconds: 1 to 86400. Defaults to an hour.","name":"ttl_seconds","in":"query"}],"responses":{"201":{"description":"Token minted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxServiceToken"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"503":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rigs":{"get":{"tags":["Sandboxes"],"summary":"List the org's sandboxes","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"If set, only return rigs on this one of the organization's own hosts."},"required":false,"description":"If set, only return rigs on this one of the organization's own hosts.","name":"host_id","in":"query"}],"responses":{"200":{"description":"Sandboxes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSandboxesResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"post":{"tags":["Sandboxes"],"summary":"Create a sandbox","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSandboxRequest"}}}},"responses":{"202":{"description":"Sandbox created (provisioning continues in the background).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rigs/{id}":{"get":{"tags":["Sandboxes"],"summary":"Read a sandbox by id or name","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Sandbox with its guest DNS hostname.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSandboxResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"delete":{"tags":["Sandboxes"],"summary":"Delete a sandbox","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkStatus"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rigs/{id}/start":{"post":{"tags":["Sandboxes"],"summary":"Start a sandbox","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"skip_start_script","in":"query"}],"responses":{"202":{"description":"Sandbox start scheduled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkStatus"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rigs/{id}/stop":{"post":{"tags":["Sandboxes"],"summary":"Stop a sandbox","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"202":{"description":"Sandbox stop scheduled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkStatus"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rigs/{id}/ssh-sessions":{"post":{"tags":["Sandboxes"],"summary":"Create a direct WebSocket SSH session","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"One no-relay SSH transport descriptor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectWebSocketSshSessionResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"503":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rigs/{id}/terminal-tickets":{"post":{"tags":["Sandboxes"],"summary":"Mint a single-use web terminal ticket","description":"Returns a short-lived, single-use credential for one web terminal WebSocket upgrade. The upgrade cannot use the browser's session cookie, because browsers do not apply the same-origin policy to WebSockets.","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"One single-use terminal ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalTicketResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rigs/{id}/integrations":{"get":{"tags":["Sandboxes"],"summary":"List a sandbox's integrations","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Integrations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxIntegrationsResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rigs/{id}/slack-conversation":{"get":{"tags":["Sandboxes"],"summary":"Read the Slack conversation thread for a Slack-made sandbox","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Conversation thread, or `{ conversation: null }` when the sandbox was not made by Slack or has no conversation yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackConversationResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rigs/{id}/sessions":{"get":{"tags":["Sandboxes"],"summary":"List a sandbox's agent sessions","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string"},"required":false,"name":"agent_name","in":"query"},{"schema":{"type":"string"},"required":false,"name":"exclude_source","in":"query"},{"schema":{"type":"string"},"required":false,"name":"source","in":"query"}],"responses":{"200":{"description":"Sessions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionsList"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"post":{"tags":["Sandboxes"],"summary":"Create a new agent session","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionRequest"}}}},"responses":{"201":{"description":"Session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionDetail"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rigs/{id}/sessions/latest":{"get":{"tags":["Sandboxes"],"summary":"Read the latest agent session for a sandbox","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionDetail"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rigs/{id}/sessions/{sessionId}":{"get":{"tags":["Sandboxes"],"summary":"Read an agent session","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionDetail"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"patch":{"tags":["Sandboxes"],"summary":"Update an agent session","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"sessionId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSessionRequest"}}}},"responses":{"200":{"description":"Updated session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionDetail"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rigs/{id}/workflow/events":{"get":{"tags":["Sandboxes"],"summary":"Read workflow events from the sandbox event sink","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"since","in":"query"}],"responses":{"200":{"description":"Events list (empty when the file is missing).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowEventsResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rigs/{id}/lifecycle-events":{"get":{"tags":["Sandboxes"],"summary":"Read the control-plane lifecycle event feed for a sandbox","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Lifecycle events, oldest first (empty when none).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxLifecycleEventsResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rigs/{id}/services":{"get":{"tags":["Sandboxes"],"summary":"List a sandbox's live services","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match), name, or id."},"required":false,"description":"How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match), name, or id.","name":"sandbox_by","in":"query"}],"responses":{"200":{"description":"Services.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSandboxServicesResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"post":{"tags":["Sandboxes"],"summary":"Create a live service on a sandbox","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match), name, or id."},"required":false,"description":"How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match), name, or id.","name":"sandbox_by","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxServiceInput"}}}},"responses":{"201":{"description":"Service created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxService"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rigs/{id}/services/{ref}":{"put":{"tags":["Sandboxes"],"summary":"Replace a live service on a sandbox","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Service reference: its name (default) or row id. Use `by` to choose."},"required":true,"description":"Service reference: its name (default) or row id. Use `by` to choose.","name":"ref","in":"path"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret the service `{ref}`: name (default), id, or ref/name_or_id (matches either; rejects ambiguity)."},"required":false,"description":"How to interpret the service `{ref}`: name (default), id, or ref/name_or_id (matches either; rejects ambiguity).","name":"by","in":"query"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match), name, or id."},"required":false,"description":"How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match), name, or id.","name":"sandbox_by","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxServiceInput"}}}},"responses":{"200":{"description":"Service replaced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxService"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"delete":{"tags":["Sandboxes"],"summary":"Delete a live service from a sandbox","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Service reference: its name (default) or row id. Use `by` to choose."},"required":true,"description":"Service reference: its name (default) or row id. Use `by` to choose.","name":"ref","in":"path"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret the service `{ref}`: name (default), id, or ref/name_or_id (matches either; rejects ambiguity)."},"required":false,"description":"How to interpret the service `{ref}`: name (default), id, or ref/name_or_id (matches either; rejects ambiguity).","name":"by","in":"query"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match), name, or id."},"required":false,"description":"How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match), name, or id.","name":"sandbox_by","in":"query"}],"responses":{"204":{"description":"Deleted."},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/rigs/{id}/services/{ref}/tokens":{"post":{"tags":["Sandboxes"],"summary":"Mint a token for a service of a rig on your own host","description":"For callers that are not browsers, such as `curl` or a script: send the token in the returned `header` as `Bearer <token>` to the returned `url`. Only for rigs on the organization's own hosts; never for `amikad`.","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Service reference: its name (default) or row id. Use `by` to choose."},"required":true,"description":"Service reference: its name (default) or row id. Use `by` to choose.","name":"ref","in":"path"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret the service `{ref}`: name (default), id, or ref/name_or_id (matches either; rejects ambiguity)."},"required":false,"description":"How to interpret the service `{ref}`: name (default), id, or ref/name_or_id (matches either; rejects ambiguity).","name":"by","in":"query"},{"schema":{"type":"string","enum":["name","id","ref","name_or_id"],"description":"How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match), name, or id."},"required":false,"description":"How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match), name, or id.","name":"sandbox_by","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":86400,"description":"How long the token lives, in seconds: 1 to 86400. Defaults to an hour."},"required":false,"description":"How long the token lives, in seconds: 1 to 86400. Defaults to an hour.","name":"ttl_seconds","in":"query"}],"responses":{"201":{"description":"Token minted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxServiceToken"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"503":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/secrets/ssh-public-keys":{"post":{"tags":["Secrets"],"summary":"Create or replace one user-owned SSH public key","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertSshPublicKeyRequest"}}}},"responses":{"201":{"description":"SSH public key metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SshPublicKeySummary"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"get":{"tags":["Secrets"],"summary":"List the caller's SSH public keys","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"200":{"description":"SSH public keys.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSshPublicKeysResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/secrets/ssh-public-keys/{id}":{"delete":{"tags":["Secrets"],"summary":"Delete one of the caller's SSH public keys","description":"Removes the key from the caller's set. This does not revoke access on sandboxes that are already provisioned: permitted keys are resolved at provision time, so the removal takes effect the next time a sandbox is provisioned, and it does not terminate sessions that are already open.","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"SSH public key deleted."},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/secrets":{"get":{"tags":["Secrets"],"summary":"List secrets visible to the caller","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"200":{"description":"Secrets visible to the caller (user-scope + org-scope).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSecretsResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"post":{"tags":["Secrets"],"summary":"Create a generic secret","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSecretRequest"}}}},"responses":{"201":{"description":"Created secret summary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretSummary"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/secrets/{id}":{"put":{"tags":["Secrets"],"summary":"Update a generic secret","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSecretRequest"}}}},"responses":{"200":{"description":"Updated secret summary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretSummary"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"delete":{"tags":["Secrets"],"summary":"Delete a generic secret","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/secrets/claude":{"get":{"tags":["Secrets"],"summary":"List Claude credentials","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"200":{"description":"Claude credential summaries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCredentialsResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"post":{"tags":["Secrets"],"summary":"Create a Claude credential","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCredentialRequest"}}}},"responses":{"201":{"description":"Created Claude credential.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretSummary"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/secrets/claude/{id}":{"delete":{"tags":["Secrets"],"summary":"Delete a Claude credential","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/secrets/claude/{id}/reveal":{"post":{"tags":["Secrets"],"summary":"Reveal a Claude credential value","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Credential value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevealSecretResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/secrets/codex":{"get":{"tags":["Secrets"],"summary":"List Codex credentials","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"200":{"description":"Codex credential summaries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCredentialsResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"post":{"tags":["Secrets"],"summary":"Create a Codex credential","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCodexCredentialRequest"}}}},"responses":{"201":{"description":"Created Codex credential.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretSummary"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/secrets/codex/{id}":{"delete":{"tags":["Secrets"],"summary":"Delete a Codex credential","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/secrets/codex/{id}/reveal":{"post":{"tags":["Secrets"],"summary":"Reveal a Codex credential value","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Credential value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevealSecretResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/secrets/pi":{"get":{"tags":["Secrets"],"summary":"Read Pi credential status","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"200":{"description":"Pi credential status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PiStatus"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"post":{"tags":["Secrets"],"summary":"Save the Pi credential","description":"Store the `~/.pi/agent/auth.json` contents to inject into every sandbox, replacing any credential already configured. Supply either a pasted blob (`authJson`) or one of the org's Claude/Codex API keys to convert into one (`source`); a converted credential is a snapshot, not a link, so rotating the key means converting again.","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertPiRequest"}}}},"responses":{"201":{"description":"Saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PiStatus"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"delete":{"tags":["Secrets"],"summary":"Delete the Pi credential","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/secrets/pi/reveal":{"post":{"tags":["Secrets"],"summary":"Reveal the Pi credential","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"200":{"description":"Credential.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevealSecretResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/secrets/{id}/reveal":{"post":{"tags":["Secrets"],"summary":"Reveal a generic secret value","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Secret value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevealSecretResponse"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/services":{"post":{"tags":["Services"],"summary":"Create a service definition for a repository","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"repo_url":{"type":"string","minLength":1}},"required":["repo_url"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"ports":{"type":"array","items":{"type":"object","properties":{"port":{"type":"integer","minimum":1,"maximum":65535},"protocol":{"type":"string","enum":["tcp","udp"],"default":"tcp"},"url_scheme":{"type":"string","nullable":true,"enum":["http","https",null]}},"required":["port"]}}},"required":["name","ports"]}]}}}},"responses":{"201":{"description":"Created service definition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceDefinition"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"409":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/services/{id}":{"put":{"tags":["Services"],"summary":"Update a service definition","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"ports":{"type":"array","items":{"type":"object","properties":{"port":{"type":"integer","minimum":1,"maximum":65535},"protocol":{"type":"string","enum":["tcp","udp"],"default":"tcp"},"url_scheme":{"type":"string","nullable":true,"enum":["http","https",null]}},"required":["port"]}}},"required":["name","ports"]}}}},"responses":{"200":{"description":"Updated service definition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceDefinition"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"delete":{"tags":["Services"],"summary":"Delete a service definition","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/slack/settings":{"get":{"tags":["Slack"],"summary":"Read the org's Slack settings","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"200":{"description":"Slack settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackOrgSettings"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"put":{"tags":["Slack"],"summary":"Upsert the org's Slack settings","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackOrgSettingsUpsert"}}}},"responses":{"200":{"description":"Updated settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackOrgSettings"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/slack/channel-settings":{"get":{"tags":["Slack"],"summary":"List per-channel Slack settings and recently seen channels","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"200":{"description":"Channel settings and the list of channels the bot has been mentioned in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackChannelSettingsList"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"put":{"tags":["Slack"],"summary":"Upsert per-channel Slack settings","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackChannelSettingsUpsert"}}}},"responses":{"200":{"description":"Updated channel settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackChannelSettings"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"delete":{"tags":["Slack"],"summary":"Delete per-channel Slack settings","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackChannelSettingsDelete"}}}},"responses":{"204":{"description":"Deleted (or no row existed)."},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/linear/settings":{"get":{"tags":["Linear"],"summary":"Read the org's Linear default repo + agent settings","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"200":{"description":"Linear settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinearOrgSettings"}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"put":{"tags":["Linear"],"summary":"Upsert the org's Linear default repo + agent settings","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinearOrgSettingsUpsert"}}}},"responses":{"200":{"description":"Updated settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinearOrgSettings"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/storage/uploads":{"post":{"tags":["Uploads"],"summary":"Create a one-time signed upload URL for the org's storage bucket","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUploadRequest"}}}},"responses":{"201":{"description":"Signed upload URL. PUT the file body to `upload_url` using the returned `token`; valid for `expires_in` seconds, single use.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"500":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"502":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/storage/uploads/batch":{"post":{"tags":["Uploads"],"summary":"Create one-time signed upload URLs for several objects in one call","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUploadBatchRequest"}}}},"responses":{"201":{"description":"One signed upload URL per requested file, in `objects`. PUT each file body to its `upload_url` using its `token`; all are valid for `expires_in` seconds, single use. The whole request fails if any single file cannot be signed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadBatchResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"500":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"502":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}},"/storage/downloads":{"get":{"tags":["Downloads"],"summary":"List the org's bucket as a batch of signed download URLs (one per object)","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"prefix","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":1000},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"A page of objects, each with a signed `download_url`. Object `key`s preserve the bucket's directory structure, so a client can recreate the tree by writing each object to its `key`. URLs are valid for `expires_in` seconds; follow `next_cursor` for the next page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDownloadsResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"500":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"502":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}},"post":{"tags":["Downloads"],"summary":"Create a signed download URL for an object in the org's bucket","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDownloadRequest"}}}},"responses":{"201":{"description":"Signed download URL. GET `download_url` directly to fetch the object; valid for `expires_in` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadResponse"}}}},"400":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"401":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"403":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"404":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"500":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}},"502":{"description":"Error","headers":{"x-trace-id":{"description":"Per-request trace id for correlating responses with logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error_code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string"}},"required":["type","error_code","message"]}}}}}}}}}