{"openapi":"3.0.0","info":{"title":"Polylane API","description":"The API for programmatically interacting with Polylane","version":"0.0.1","contact":{"name":"Boris Tane","email":"me@boristane.com","url":"https://boristane.com"},"license":{"name":"MIT"}},"servers":[{"url":"https://api.polylane.com","description":"Live environment"}],"paths":{"/v1/auth/verify_email":{"post":{"operationId":"auth.verifyEmail","security":[],"tags":["Authentication"],"summary":"Email verification","requestBody":{"required":true,"description":"A JSON object containing the verification code.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":6},"email":{"type":"string","format":"email"}},"required":["code","email"]}}}},"responses":{"200":{"description":"Successful request","headers":{"Set-Cookie":{"type":"string","description":"Authentication cookie"}},"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"token":{"type":"string"},"landing":{"type":"object","properties":{"kind":{"type":"string","enum":["existing","created","joined","verify_email","verify_to_join","workspace_full","invite_at_capacity","none"],"description":"Where the signed-in user should land next.","example":"created"},"workspaceId":{"type":"string","description":"Id of the workspace to enter. Set when kind is created or joined.","example":"ws_abc123"},"workspaceSlug":{"type":"string","description":"The workspace to enter. Set when kind is created or joined.","example":"acme"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"description":"The workspace the user is trying to join. Set when kind is verify_to_join, workspace_full, or invite_at_capacity."},"seats":{"type":"object","properties":{"memberCount":{"type":"number"},"limit":{"type":"number"},"plan":{"type":"string"}},"required":["memberCount","limit","plan"],"description":"Seat usage of the workspace that has no room left. Set when kind is workspace_full."},"memberships":{"type":"array","items":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["workspaceId","name","slug"]},"description":"The workspaces the user already belongs to, for terminal workspace selection. Set when kind is existing."},"verification":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"],"description":"The address the verification code was emailed to. Set when kind is verify_email or verify_to_join; verify with auth.verifyEmail, resend with auth.resendVerificationCode."}},"required":["kind"],"description":"Where the verified user should land: the workspace created or joined for them, or the onboarding screen that moves them forward."}},"required":["token","landing"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"429":{"description":"Slow down","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Slow down"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/auth/signup":{"post":{"operationId":"auth.signup","security":[],"tags":["Authentication"],"summary":"Email sign up","requestBody":{"required":true,"description":"Email and password.","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","minLength":1,"format":"email"},"password":{"type":"string","minLength":8,"pattern":"^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]{8,}$"},"turnstileToken":{"type":"string"},"attribution":{"type":"string","maxLength":4096,"description":"JSON signup attribution: acquisition source, campaign, landing page and content. Invalid fields are discarded."},"ref":{"type":"string","description":"Attribution ref captured at first touch, e.g. github.pr-comment. Invalid values are discarded, never rejected."},"run":{"type":"string","maxLength":64,"description":"Pre-auth onboarding run identifier minted by the installer. Invalid values are discarded, never rejected."},"inviteToken":{"type":"string","maxLength":128,"description":"Workspace invite token from an invite link. Unknown or revoked tokens are ignored, never rejected."}},"required":["email","password"]}}}},"responses":{"200":{"description":"Successful request","headers":{"Set-Cookie":{"type":"string","description":"Authentication cookie"}},"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"},"token":{"type":"string"}},"required":["user"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"429":{"description":"Slow down","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Slow down"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/auth/landing":{"post":{"operationId":"auth.landing","tags":["Authentication"],"summary":"Resolve where the signed-in user lands","responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"kind":{"type":"string","enum":["existing","created","joined","verify_email","verify_to_join","workspace_full","invite_at_capacity","none"],"description":"Where the signed-in user should land next.","example":"created"},"workspaceId":{"type":"string","description":"Id of the workspace to enter. Set when kind is created or joined.","example":"ws_abc123"},"workspaceSlug":{"type":"string","description":"The workspace to enter. Set when kind is created or joined.","example":"acme"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"description":"The workspace the user is trying to join. Set when kind is verify_to_join, workspace_full, or invite_at_capacity."},"seats":{"type":"object","properties":{"memberCount":{"type":"number"},"limit":{"type":"number"},"plan":{"type":"string"}},"required":["memberCount","limit","plan"],"description":"Seat usage of the workspace that has no room left. Set when kind is workspace_full."},"memberships":{"type":"array","items":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["workspaceId","name","slug"]},"description":"The workspaces the user already belongs to, for terminal workspace selection. Set when kind is existing."},"verification":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"],"description":"The address the verification code was emailed to. Set when kind is verify_email or verify_to_join; verify with auth.verifyEmail, resend with auth.resendVerificationCode."}},"required":["kind"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/auth/logout":{"post":{"operationId":"auth.logout","security":[{"BearerAuth":[]},{"CookieAuth":[]}],"tags":["Authentication"],"summary":"Log out","responses":{"200":{"description":"Successful request","headers":{"Set-Cookie":{"type":"string","description":"Authentication cookie"}},"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]}},"required":["message","success","error","result"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/auth/whoami":{"get":{"operationId":"auth.whoami","tags":["Authentication"],"summary":"Get current user","responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/User"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/auth/me":{"delete":{"operationId":"auth.del","tags":["Authentication"],"summary":"Delete current user","x-polylane-banned-from":["private","autofix","fix_run"],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","description":"ID of the user","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"_object":{"type":"string","enum":["user"]}},"required":["id","_object"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"auth.patch","tags":["Authentication"],"summary":"Update the fields of the current user","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"forename":{"type":"string","example":"John"},"surname":{"type":"string","nullable":true,"example":"Doe"},"email":{"type":"string","nullable":true,"format":"email"},"username":{"type":"string","nullable":true,"example":"johndoe"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/User"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/auth/generate_password_reset":{"post":{"operationId":"auth.generatePasswordResetCode","security":[],"tags":["Authentication"],"summary":"Generate password reset code","requestBody":{"required":true,"description":"A JSON object containing the email.","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"]}}}},"responses":{"202":{"description":"Request accepted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Request accepted"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"429":{"description":"Slow down","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Slow down"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/auth/reset_password":{"post":{"operationId":"auth.resetPassword","security":[],"tags":["Authentication"],"summary":"Password reset","requestBody":{"required":true,"description":"A JSON object containing the reset code.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":6},"email":{"type":"string","format":"email"},"password":{"type":"string","minLength":8,"pattern":"^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]{8,}$"}},"required":["code","email","password"]}}}},"responses":{"202":{"description":"Request accepted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Request accepted"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{}}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"429":{"description":"Slow down","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Slow down"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/auth/notifications":{"get":{"operationId":"auth.notification_settings.get","tags":["Authentication"],"summary":"Get the user notification settings","responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Notification Settings"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"put":{"operationId":"auth.notification_settings.put","tags":["Authentication"],"summary":"Set the user notification settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notification Settings"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Notification Settings"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/auth/instructions":{"get":{"operationId":"auth.instructions.get","tags":["Authentication"],"summary":"Get the agent instructions of the current user","responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/User Instructions"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"put":{"operationId":"auth.instructions.put","tags":["Authentication"],"summary":"Set the agent instructions of the current user","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User Instructions"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/User Instructions"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/api_keys/{workspaceId}/{id}":{"get":{"operationId":"api_keys.get","tags":["API Keys"],"summary":"Get an API key","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^(?:polylane|nominal)_[0-9a-z]{64}$","description":"ID of the api_key","example":"polylane_hciswovf778y8r43gby4n332ey4u1oa9tjsnnxrmdncd7oaotb7vy7tpi97hyg2u"},"required":true,"description":"ID of the api_key","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Api Key"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"api_keys.del","tags":["API Keys"],"summary":"Delete an API key","x-polylane-banned-from":["private","autofix","fix_run"],"parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^(?:polylane|nominal)_[0-9a-z]{64}$","description":"ID of the api_key","example":"polylane_hciswovf778y8r43gby4n332ey4u1oa9tjsnnxrmdncd7oaotb7vy7tpi97hyg2u"},"required":true,"description":"ID of the api_key","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"id":{"type":"string","pattern":"^(?:polylane|nominal)_[0-9a-z]{64}$","description":"ID of the api_key","example":"polylane_hciswovf778y8r43gby4n332ey4u1oa9tjsnnxrmdncd7oaotb7vy7tpi97hyg2u"},"_object":{"type":"string","enum":["api_key"]}},"required":["workspaceId","id","_object"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/api_keys/{workspaceId}":{"get":{"operationId":"api_keys.list","tags":["API Keys"],"summary":"List API keys","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","enum":["id","ownerId","name","lastActive","created","updated"],"default":"created"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"ownerId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"name","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Api Key"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/api_keys":{"post":{"operationId":"api_keys.post","tags":["API Keys"],"summary":"Create a new API key","requestBody":{"required":true,"description":"The API key to create","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"name":{"type":"string","minLength":4,"maxLength":256,"description":"Name of the API key"},"scopes":{"type":"array","items":{"type":"string","enum":["workspaces:read","workspaces:write","workspaces:delete","workspace_members:read","workspace_members:write","workspace_members:delete","billing:read","billing:write","subscriptions:read","subscriptions:write","subscriptions:purchase","threads:read","threads:write","threads:delete","repositories:read","repositories:write","repositories:delete","ratings:write","messages:read","messages:write","messages:delete","integrations:read","integrations:write","integrations:delete","cloud_accounts:read","cloud_accounts:write","cloud_accounts:delete","memories:read","memories:write","memories:delete","cloud_infra:read","cloud_infra:write","cloud_infra:delete","analytics:read","analytics:export","audit_logs:read","audit_logs:export","api_keys:read","api_keys:write","api_keys:delete","telemetry_tokens:read","telemetry_tokens:write","telemetry_tokens:delete","autofixes:read","autofixes:write","autofixes:delete","teams:read","teams:write","teams:delete","labels:read","labels:write","labels:delete","oauth_clients:read","oauth_clients:write","oauth_clients:delete","agent_tools:read","agent_tools:write","issues:read","issues:write","issues:delete","pages:read","pages:delete","deliverables:read","deliverables:write"],"description":"Permission scope label","example":"workspaces:read"},"minItems":1}},"required":["workspaceId","name","scopes"],"additionalProperties":false}}}},"responses":{"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^(?:polylane|nominal)_[0-9a-z]{64}$","description":"ID of the api_key","example":"polylane_hciswovf778y8r43gby4n332ey4u1oa9tjsnnxrmdncd7oaotb7vy7tpi97hyg2u"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"ownerId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"name":{"type":"string","minLength":4,"maxLength":256,"description":"Name of the API key"},"scopes":{"type":"array","items":{"type":"string","enum":["workspaces:read","workspaces:write","workspaces:delete","workspace_members:read","workspace_members:write","workspace_members:delete","billing:read","billing:write","subscriptions:read","subscriptions:write","subscriptions:purchase","threads:read","threads:write","threads:delete","repositories:read","repositories:write","repositories:delete","ratings:write","messages:read","messages:write","messages:delete","integrations:read","integrations:write","integrations:delete","cloud_accounts:read","cloud_accounts:write","cloud_accounts:delete","memories:read","memories:write","memories:delete","cloud_infra:read","cloud_infra:write","cloud_infra:delete","analytics:read","analytics:export","audit_logs:read","audit_logs:export","api_keys:read","api_keys:write","api_keys:delete","telemetry_tokens:read","telemetry_tokens:write","telemetry_tokens:delete","autofixes:read","autofixes:write","autofixes:delete","teams:read","teams:write","teams:delete","labels:read","labels:write","labels:delete","oauth_clients:read","oauth_clients:write","oauth_clients:delete","agent_tools:read","agent_tools:write","issues:read","issues:write","issues:delete","pages:read","pages:delete","deliverables:read","deliverables:write"],"description":"Permission scope label","example":"workspaces:read"}},"lastActive":{"type":"string","nullable":true,"format":"date-time"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["api_key"]},"token":{"type":"string","pattern":"^sk_[0-9a-z]{64}$","description":"ID of the api_key_token","example":"sk_twz7duqh2vntphgam51681qxfgu5j21uvc31fi4g63kgu8ofbh1khzobzi3wwzdk"}},"required":["id","workspaceId","ownerId","name","scopes","lastActive","created","updated","_object","token"],"additionalProperties":false}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/telemetry_tokens/{workspaceId}/{id}":{"get":{"operationId":"telemetry_tokens.get","tags":["Telemetry Tokens"],"summary":"Get a telemetry token","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^tt_id_[0-9a-z]{64}$","description":"ID of the telemetry_token","example":"tt_id_hciswovf778y8r43gby4n332ey4u1oa9tjsnnxrmdncd7oaotb7vy7tpi97hyg2u"},"required":true,"description":"ID of the telemetry_token","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Telemetry Token"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"telemetry_tokens.del","tags":["Telemetry Tokens"],"summary":"Delete a telemetry token","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^tt_id_[0-9a-z]{64}$","description":"ID of the telemetry_token","example":"tt_id_hciswovf778y8r43gby4n332ey4u1oa9tjsnnxrmdncd7oaotb7vy7tpi97hyg2u"},"required":true,"description":"ID of the telemetry_token","name":"id","in":"path"},{"schema":{"type":"string","enum":["true","false"],"default":"false","description":"Force deletion of a managed token (e.g. one created by an integration)."},"required":false,"description":"Force deletion of a managed token (e.g. one created by an integration).","name":"force","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"id":{"type":"string","pattern":"^tt_id_[0-9a-z]{64}$","description":"ID of the telemetry_token","example":"tt_id_hciswovf778y8r43gby4n332ey4u1oa9tjsnnxrmdncd7oaotb7vy7tpi97hyg2u"},"_object":{"type":"string","enum":["telemetry_token"]}},"required":["workspaceId","id","_object"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"put":{"operationId":"telemetry_tokens.put","tags":["Telemetry Tokens"],"summary":"Update a telemetry token","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^tt_id_[0-9a-z]{64}$","description":"ID of the telemetry_token","example":"tt_id_hciswovf778y8r43gby4n332ey4u1oa9tjsnnxrmdncd7oaotb7vy7tpi97hyg2u"},"required":true,"description":"ID of the telemetry_token","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The telemetry token properties to update","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":4,"maxLength":256,"description":"Name of the telemetry token"}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Telemetry Token"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"telemetry_tokens.patch","tags":["Telemetry Tokens"],"summary":"Update a telemetry token","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^tt_id_[0-9a-z]{64}$","description":"ID of the telemetry_token","example":"tt_id_hciswovf778y8r43gby4n332ey4u1oa9tjsnnxrmdncd7oaotb7vy7tpi97hyg2u"},"required":true,"description":"ID of the telemetry_token","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The telemetry token properties to update","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":4,"maxLength":256,"description":"Name of the telemetry token"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Telemetry Token"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/telemetry_tokens/{workspaceId}":{"get":{"operationId":"telemetry_tokens.list","tags":["Telemetry Tokens"],"summary":"List telemetry tokens","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","enum":["id","ownerId","token","name","source","sourceResourceId","provider","lastActive","created","updated"],"default":"created"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"ownerId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"token","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"name","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"source","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"sourceResourceId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"provider","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Telemetry Token"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/telemetry_tokens":{"post":{"operationId":"telemetry_tokens.post","tags":["Telemetry Tokens"],"summary":"Create a new telemetry token","requestBody":{"required":true,"description":"The telemetry token to create","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"name":{"type":"string","minLength":4,"maxLength":256,"description":"Name of the telemetry token"}},"required":["workspaceId","name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^tt_id_[0-9a-z]{64}$","description":"ID of the telemetry_token","example":"tt_id_hciswovf778y8r43gby4n332ey4u1oa9tjsnnxrmdncd7oaotb7vy7tpi97hyg2u"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"token":{"type":"string","pattern":"^tt_id_[0-9a-z]{64}$","description":"ID of the telemetry_token","example":"tt_id_hciswovf778y8r43gby4n332ey4u1oa9tjsnnxrmdncd7oaotb7vy7tpi97hyg2u"},"ownerId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"name":{"type":"string","minLength":4,"maxLength":256,"description":"Name of the telemetry token"},"source":{"type":"string","nullable":true,"enum":["integration","cloud_account",null],"description":"Source that created this token","example":"integration"},"sourceResourceId":{"type":"string","nullable":true,"description":"ID of the resource that created this token","example":"integration_abc123"},"provider":{"type":"string","nullable":true,"enum":["github","slack","datadog","honeycomb","axiom","betterstack","openstatus","sentry","mcp","vercel","grafana","logfire","langsmith","braintrust","newrelic",null],"description":"Integration provider that created this token","example":"sentry"},"lastActive":{"type":"string","nullable":true,"format":"date-time"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["telemetry_token"]}},"required":["id","workspaceId","token","ownerId","name","source","sourceResourceId","provider","lastActive","created","updated","_object"],"additionalProperties":false}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/workspaces/{id}":{"get":{"operationId":"workspaces.get","tags":["Workspaces"],"summary":"Get a workspace","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Workspace"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"put":{"operationId":"workspaces.put","tags":["Workspaces"],"summary":"Update a workspace","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The workspace properties to update","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":128,"example":"Acme Inc"},"description":{"type":"string","maxLength":2000},"slug":{"type":"string","minLength":4,"maxLength":1024,"pattern":"^[a-z0-9_]+(?:-[a-z0-9_]+)*$","example":"acme-inc"},"ownerId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"llmProvider":{"type":"string","enum":["recommended","openai","anthropic","custom"]},"llmProviderApiKey":{"type":"string","nullable":true,"minLength":1,"maxLength":2000},"llmProviderBaseUrl":{"type":"string","nullable":true,"maxLength":500,"format":"uri"},"llmModelTiers":{"$ref":"#/components/schemas/CustomModelTiers"},"llmProviderAuthHeader":{"type":"string","nullable":true,"maxLength":100},"llmProviderModelsUrl":{"type":"string","nullable":true,"maxLength":500,"format":"uri"},"autoJoin":{"type":"boolean","description":"Let anyone with the workspace's email domain join automatically. Turning this on claims the caller's email domain if the workspace has none yet."}},"required":["name","description","ownerId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Workspace"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Payment Required"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"426":{"description":"Upgrade Required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Upgrade Required"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"workspaces.patch","tags":["Workspaces"],"summary":"Update the fields of a workspace","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The workspace properties to update","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":128,"example":"Acme Inc"},"description":{"type":"string","maxLength":2000},"slug":{"type":"string","minLength":4,"maxLength":1024,"pattern":"^[a-z0-9_]+(?:-[a-z0-9_]+)*$","example":"acme-inc"},"ownerId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"llmProvider":{"type":"string","enum":["recommended","openai","anthropic","custom"]},"llmProviderApiKey":{"type":"string","nullable":true,"minLength":1,"maxLength":2000},"llmProviderBaseUrl":{"type":"string","nullable":true,"maxLength":500,"format":"uri"},"llmModelTiers":{"$ref":"#/components/schemas/CustomModelTiers"},"llmProviderAuthHeader":{"type":"string","nullable":true,"maxLength":100},"llmProviderModelsUrl":{"type":"string","nullable":true,"maxLength":500,"format":"uri"},"autoJoin":{"type":"boolean","description":"Let anyone with the workspace's email domain join automatically. Turning this on claims the caller's email domain if the workspace has none yet."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Workspace"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Payment Required"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"426":{"description":"Upgrade Required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Upgrade Required"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"workspaces.del","tags":["Workspaces"],"summary":"Delete a workspace","x-polylane-banned-from":["private","autofix","fix_run"],"parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"}},"required":["id"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/workspaces":{"get":{"operationId":"workspaces.list","tags":["Workspaces"],"summary":"List workspaces","parameters":[{"schema":{"type":"string","enum":["slug","ownerId","name","domain","autoJoinEnabled","description","id","createdBy","lastEditedBy","created","updated","llmProvider","lastHumanInteractionAt","dormancyWarnedAt","dormantAt"],"default":"created"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"slug","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"ownerId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"name","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"domain","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"autoJoinEnabled","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"createdBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"lastEditedBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"llmProvider","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"lastHumanInteractionAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"dormancyWarnedAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"dormantAt","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Workspace"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"post":{"operationId":"workspaces.post","tags":["Workspaces"],"summary":"Create a new workspace","x-polylane-banned-from":["private","autofix","fix_run"],"requestBody":{"required":true,"description":"The workspace to create","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":4,"maxLength":128,"example":"Acme Inc"},"description":{"type":"string","nullable":true,"maxLength":2000},"slug":{"type":"string","minLength":4,"maxLength":128,"example":"acme-inc"}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Workspace"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/workspaces/{id}/data":{"delete":{"operationId":"workspaces.purge","tags":["Workspaces"],"summary":"Immediately purge a deleted workspace's data","description":"Short-circuits the 60-day retention window for an explicit customer data-deletion request. The workspace must already be deleted. Owner only.","x-polylane-banned-from":["private","autofix","fix_run"],"parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"id","in":"path"}],"responses":{"202":{"description":"Request accepted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Request accepted"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"}},"required":["id"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/workspaces/slug/{slug}":{"get":{"operationId":"workspaces.slug","tags":["Workspaces"],"summary":"Check if a workspace slug already exists","parameters":[{"schema":{"type":"string"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"exists":{"type":"boolean"}},"required":["exists"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/workspaces/domain/status":{"get":{"operationId":"workspaces.domain.status","tags":["Workspaces"],"summary":"Check the workspace linked to the authenticated user's email domain","responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"exists":{"type":"boolean"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id"]},"member":{"type":"boolean"},"autoJoin":{"type":"boolean"},"atCapacity":{"type":"boolean"},"memberCount":{"type":"number"},"limit":{"type":"number"},"plan":{"type":"string"}},"required":["exists"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/workspaces/usage/{id}":{"get":{"operationId":"workspaces.usage.get","tags":["Workspaces"],"summary":"Get the monthly usage for a workspace","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"plan":{"type":"string"},"limits":{"type":"object","properties":{"maxCloudAccounts":{"type":"number","description":"Max connected cloud accounts"},"maxWorkspaceMembers":{"type":"number","description":"Max members in workspace"},"maxInvestigationsPerDay":{"type":"number","default":-1,"description":"Max investigations started per rolling 24h"},"includedAutofixesPerMonth":{"type":"number","default":-1,"description":"Autofixes included per billing month"},"maxPrAnalysesPerMonth":{"type":"number","default":-1,"description":"Max PR analyses per billing month"}},"required":["maxCloudAccounts","maxWorkspaceMembers"],"additionalProperties":false},"usage":{"type":"object","properties":{"normalizedTokensPercentage":{"type":"number","description":"Percentage of normalized token budget used in the current billing period"}},"required":["normalizedTokensPercentage"]}},"required":["plan","limits","usage"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/workspaces/plan/{id}":{"get":{"operationId":"workspaces.plan.get","tags":["Workspaces"],"summary":"Get the current plan and usage for a workspace","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"plan":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"limits":{"type":"object","properties":{"maxCloudAccounts":{"type":"number","description":"Max connected cloud accounts"},"maxWorkspaceMembers":{"type":"number","description":"Max members in workspace"},"maxInvestigationsPerDay":{"type":"number","default":-1,"description":"Max investigations started per rolling 24h"},"includedAutofixesPerMonth":{"type":"number","default":-1,"description":"Autofixes included per billing month"},"maxPrAnalysesPerMonth":{"type":"number","default":-1,"description":"Max PR analyses per billing month"}},"required":["maxCloudAccounts","maxWorkspaceMembers"],"additionalProperties":false},"capabilities":{"$ref":"#/components/schemas/PlanCatalogCapabilities"}},"required":["id","name","limits","capabilities"]},"usage":{"type":"object","properties":{"cloudAccounts":{"type":"object","properties":{"current":{"type":"number"},"limit":{"type":"number"}},"required":["current","limit"]},"normalizedTokens":{"type":"object","properties":{"percentage":{"type":"number"},"atLimit":{"type":"boolean"}},"required":["percentage","atLimit"]},"workspaceMembers":{"type":"object","properties":{"current":{"type":"number"},"limit":{"type":"number"}},"required":["current","limit"]},"autofixes":{"type":"object","properties":{"used":{"type":"number"},"included":{"type":"number"},"bundleBalance":{"type":"number"},"overagePolicy":{"type":"string","enum":["block","meter"]},"overageMonthlyCapCents":{"type":"number"}},"required":["used","included","bundleBalance","overagePolicy","overageMonthlyCapCents"]},"prAnalyses":{"type":"object","properties":{"current":{"type":"number"},"limit":{"type":"number"}},"required":["current","limit"]}},"required":["cloudAccounts","normalizedTokens","workspaceMembers","autofixes","prAnalyses"]},"usageCycle":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"}},"required":["from","to"]},"usageResets":{"type":"object","properties":{"available":{"type":"number"},"nextExpiresAt":{"type":"number","nullable":true,"description":"When the soonest-expiring available reset stops being redeemable, epoch milliseconds"}},"required":["available","nextExpiresAt"]}},"required":["plan","usage","usageCycle","usageResets"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/workspaces/slug/{slug}":{"get":{"operationId":"workspaces.public.slug","security":[],"tags":["Workspaces"],"summary":"Get public details of a workspace by slug","parameters":[{"schema":{"type":"string"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Public Workspace"}},"required":["message","success","error","result"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/workspaces/{id}":{"get":{"operationId":"workspaces.public.get","security":[],"tags":["Workspaces"],"summary":"Get public details of a workspace","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Public Workspace"}},"required":["message","success","error","result"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/workspaces/{id}/escalations_settings":{"get":{"operationId":"workspaces.escalations_settings.get","tags":["Workspaces"],"summary":"Get escalations settings","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/EscalationsSettings"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"workspaces.escalations_settings.patch","tags":["Workspaces"],"summary":"Partially update escalations settings","description":"Updates the escalation severities Polylane announces right away. New escalations use the new selection.","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The escalations settings fields to update","content":{"application/json":{"schema":{"type":"object","properties":{"escalations":{"type":"object","properties":{"alertSeverities":{"type":"array","items":{"type":"string","enum":["critical","high","medium","low"]},"maxItems":4,"description":"Severities of new escalations Polylane announces right away, in the Slack notifications channel and by email. The daily digest lists every open escalation."}},"additionalProperties":false}},"required":["escalations"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/EscalationsSettings"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/workspaces/{id}/investigations_settings":{"get":{"operationId":"workspaces.investigations_settings.get","tags":["Workspaces"],"summary":"Get investigations settings","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/InvestigationsSettings"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"workspaces.investigations_settings.patch","tags":["Workspaces"],"summary":"Partially update investigations settings","description":"Updates the selected automatic investigation severities. Held issues are reconsidered when detected again.","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The investigations settings fields to update","content":{"application/json":{"schema":{"type":"object","properties":{"investigations":{"type":"object","properties":{"autoInvestigateSeverities":{"type":"array","items":{"type":"string","enum":["critical","high","medium","low","info"]},"maxItems":5,"description":"Severities of confirmed issues Polylane investigates automatically. Other issues are triaged and held until a person starts the investigation."}},"additionalProperties":false}},"required":["investigations"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/InvestigationsSettings"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/workspaces/{id}/digest_settings":{"get":{"operationId":"workspaces.digest_settings.get","tags":["Workspaces"],"summary":"Get workspace digest settings","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/DigestSettings"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"workspaces.digest_settings.patch","tags":["Workspaces"],"summary":"Enable or disable workspace digest emails","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The digest settings fields to update","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the weekly digest is sent for this workspace"}}}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/DigestSettings"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/workspaces/{id}/pr_review_settings":{"get":{"operationId":"workspaces.pr_review_settings.get","tags":["Workspaces"],"summary":"Get impact assessment settings","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/PrReviewsSettings"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"workspaces.pr_review_settings.patch","tags":["Workspaces"],"summary":"Update impact assessment settings","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The impact assessment settings to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchPrReviewsConfig"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/PrReviewsSettings"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/workspaces/{id}/autofix_settings":{"get":{"operationId":"workspaces.autofix_settings.get","tags":["Workspaces"],"summary":"Get autofix settings","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/AutofixSettings"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"workspaces.autofix_settings.patch","tags":["Workspaces"],"summary":"Update autofix settings","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The autofix settings to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchAutofixConfig"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/AutofixSettings"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/workspaces/{id}/export":{"post":{"operationId":"workspaces.export","tags":["Workspaces"],"summary":"Start a workspace export","description":"Starts an asynchronous export of the workspace's pull request impact assessment records, settings, and threads into a downloadable JSON archive. The requester is emailed a download link when the archive is ready. Available to workspace admins and the owner, including for 60 days after the workspace is deleted.","x-polylane-banned-from":["private","autofix","fix_run"],"parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"id","in":"path"}],"responses":{"202":{"description":"Request accepted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Request accepted"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^file_[0-9a-z]{24}$","description":"ID of the file","example":"file_38mg3o4ibc92h8t2efn8csrh"}},"required":["id"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/workspaces/{workspaceId}/exports/{exportId}":{"get":{"operationId":"workspaces.export.get","tags":["Workspaces"],"summary":"Get the status of a workspace export","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^file_[0-9a-z]{24}$","description":"ID of the file","example":"file_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the file","name":"exportId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^file_[0-9a-z]{24}$","description":"ID of the file","example":"file_38mg3o4ibc92h8t2efn8csrh"},"status":{"type":"string","enum":["pending","ready"]},"size":{"type":"number","nullable":true},"created":{"type":"string","nullable":true},"shareUrl":{"type":"string","nullable":true},"shareExpiresAt":{"type":"string","nullable":true}},"required":["id","status","size","created","shareUrl","shareExpiresAt"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/workspaces/{workspaceId}/exports/{exportId}/download":{"get":{"operationId":"workspaces.export.download","tags":["Workspaces"],"summary":"Download a workspace export archive","description":"Streams the JSON archive produced by a workspace export. Available to workspace admins and the owner, including for 60 days after the workspace is deleted.","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^file_[0-9a-z]{24}$","description":"ID of the file","example":"file_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the file","name":"exportId","in":"path"}],"responses":{"200":{"description":"The export archive","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Not authorized for this export"},"404":{"description":"Export not found"}}}},"/v1/workspaces/{workspaceId}/exports/{exportId}/download/{token}":{"get":{"operationId":"workspaces.export.download.shared","security":[],"tags":["Workspaces"],"summary":"Download a workspace export archive with a signed link","description":"Streams the JSON archive produced by a workspace export. The signed time-limited token in the path is the authorization, so the link works from an email or curl without signing in — including for 60 days after the workspace is deleted.","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^file_[0-9a-z]{24}$","description":"ID of the file","example":"file_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the file","name":"exportId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"token","in":"path"}],"responses":{"200":{"description":"The export archive","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Not authorized for this export"},"404":{"description":"Export not found"}}}},"/v1/invites/{workspaceId}/{id}":{"get":{"operationId":"invites.get","tags":["Invites"],"summary":"Get an invite","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^inv_[0-9a-z]{64}$","description":"ID of the invite","example":"inv_gepzgu225yzyyv9mp485wbjwwrhwgvjwkammgcv5uzm1jorkgeqezkxz7x5ad1ha"},"required":true,"description":"ID of the invite","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Invite"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"invites.del","tags":["Invites"],"summary":"Delete an invite","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^inv_[0-9a-z]{64}$","description":"ID of the invite","example":"inv_gepzgu225yzyyv9mp485wbjwwrhwgvjwkammgcv5uzm1jorkgeqezkxz7x5ad1ha"},"required":true,"description":"ID of the invite","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^inv_[0-9a-z]{64}$","description":"ID of the invite","example":"inv_gepzgu225yzyyv9mp485wbjwwrhwgvjwkammgcv5uzm1jorkgeqezkxz7x5ad1ha"},"_object":{"type":"string","enum":["invite"]}},"required":["id","_object"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/invites/{workspaceId}":{"get":{"operationId":"invites.list","tags":["Invites"],"summary":"List invites","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","enum":["email","createdBy","id","acceptedBy","acceptedAt","position","status","created","updated"],"default":"created"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"createdBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"acceptedAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"position","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Invite"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/invites":{"post":{"operationId":"invites.post","tags":["Invites"],"summary":"Create an invite","requestBody":{"required":true,"description":"The invite to create","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"email":{"type":"string","format":"email"},"position":{"type":"string","enum":["admin","member","read-only"]}},"required":["workspaceId","email","position"],"additionalProperties":false}}}},"responses":{"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Invite"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Payment Required"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/invites/{id}":{"put":{"operationId":"invites.put","tags":["Invites"],"summary":"Accept an invite","parameters":[{"schema":{"type":"string","pattern":"^inv_[0-9a-z]{64}$","description":"ID of the invite","example":"inv_gepzgu225yzyyv9mp485wbjwwrhwgvjwkammgcv5uzm1jorkgeqezkxz7x5ad1ha"},"required":true,"description":"ID of the invite","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The email accepting the invite","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Invite"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"426":{"description":"Upgrade Required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Upgrade Required"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/workspace_members/{workspaceId}/{id}":{"get":{"operationId":"workspace_members.get","tags":["Workspace Members"],"summary":"Get a workspace member","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","description":"ID of the user","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"required":true,"description":"ID of the user","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Workspace Member"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"workspace_member.patch","tags":["Workspace Members"],"summary":"Update the fields of a workspace member","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","description":"ID of the user","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"required":true,"description":"ID of the user","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The workspace member properties to update","content":{"application/json":{"schema":{"type":"object","properties":{"position":{"type":"string","enum":["owner","admin","member","read-only"]},"scopes":{"type":"array","items":{"type":"string","enum":["workspaces:read","workspaces:write","workspaces:delete","workspace_members:read","workspace_members:write","workspace_members:delete","billing:read","billing:write","subscriptions:read","subscriptions:write","subscriptions:purchase","threads:read","threads:write","threads:delete","repositories:read","repositories:write","repositories:delete","ratings:write","messages:read","messages:write","messages:delete","integrations:read","integrations:write","integrations:delete","cloud_accounts:read","cloud_accounts:write","cloud_accounts:delete","memories:read","memories:write","memories:delete","cloud_infra:read","cloud_infra:write","cloud_infra:delete","analytics:read","analytics:export","audit_logs:read","audit_logs:export","api_keys:read","api_keys:write","api_keys:delete","telemetry_tokens:read","telemetry_tokens:write","telemetry_tokens:delete","autofixes:read","autofixes:write","autofixes:delete","teams:read","teams:write","teams:delete","labels:read","labels:write","labels:delete","oauth_clients:read","oauth_clients:write","oauth_clients:delete","agent_tools:read","agent_tools:write","issues:read","issues:write","issues:delete","pages:read","pages:delete","deliverables:read","deliverables:write"],"description":"Permission scope label","example":"workspaces:read"}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Workspace Member"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"workspace_members.del","tags":["Workspace Members"],"summary":"Delete a workspace member","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","description":"ID of the user","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"required":true,"description":"ID of the user","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"id":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","description":"ID of the user","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"_object":{"type":"string","enum":["workspace_member"]}},"required":["workspaceId","id","_object"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/workspace_members/{workspaceId}":{"get":{"operationId":"workspace_members.list","tags":["Workspace Members"],"summary":"List workspace members","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","enum":["userId","invitedBy","position","lastActive","created","updated"],"default":"created"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"userId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"invitedBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"position","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Workspace Member"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/workspace_members/{workspaceId}/guest-link":{"post":{"operationId":"workspace_members.join_via_guest_link","tags":["Workspace Members"],"summary":"Join a workspace as a member using a private-repository PR guest link","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"}],"requestBody":{"required":true,"description":"The signed PR guest link token proving private-repository access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Join Via Guest Link"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Workspace Member"}},"required":["message","success","error","result"]}}}},"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Workspace Member"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"426":{"description":"Upgrade Required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Upgrade Required"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/scopes":{"get":{"operationId":"scopes.list","tags":["Permission Scopes"],"summary":"List permission scopes","responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"scope":{"type":"string"},"description":{"type":"string"},"resource":{"type":"string"},"label":{"type":"string"}},"required":["scope","description","resource","label"]}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/visibilities":{"get":{"operationId":"visibilities.list","tags":["Visibilities"],"summary":"List visibilities","responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"description":{"type":"string"},"label":{"type":"string"}},"required":["value","description","label"]}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/sessions/{id}":{"get":{"operationId":"sessions.get","tags":["Sessions"],"summary":"Get a user session","parameters":[{"schema":{"type":"string","pattern":"^[a-z0-9]+$","description":"ID of the session","example":""},"required":true,"description":"ID of the session","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Session"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"sessions.del","tags":["Sessions"],"summary":"Delete a user session","x-polylane-banned-from":["private","autofix","fix_run"],"parameters":[{"schema":{"type":"string","pattern":"^[a-z0-9]+$","description":"ID of the session","example":""},"required":true,"description":"ID of the session","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9]+$","description":"ID of the session","example":""},"_object":{"type":"string","enum":["session"]}},"required":["id","_object"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/sessions":{"get":{"operationId":"sessions.list","tags":["Sessions"],"summary":"List user sessions","parameters":[{"schema":{"type":"string","enum":["id","impersonator","created","updated","expiresAt"],"default":"created"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"impersonator","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Session"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/oauth_clients/{id}":{"get":{"operationId":"oauth_clients.public.get","security":[],"tags":["OAuth Clients"],"summary":"Get an OAuth client","parameters":[{"schema":{"type":"string","pattern":"^oauth_client_[0-9a-z]{24}$","description":"ID of the oauth_client","example":"oauth_client_efw4pgjae0n4vq2i5l98cozm"},"required":true,"description":"ID of the oauth_client","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/OAuth Client"}},"required":["message","success","error","result"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/oauth_clients/{workspaceId}":{"get":{"operationId":"oauth_clients.public.list","security":[],"tags":["OAuth Clients"],"summary":"List OAuth clients","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","enum":["id","name","description","email","logoUrl","websiteUrl","privacyPolicyUrl","termsOfServiceUrl","isActive","created","updated"],"default":"created"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"name","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"description","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"email","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"logoUrl","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"websiteUrl","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"privacyPolicyUrl","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"termsOfServiceUrl","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OAuth Client"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/oauth_clients":{"post":{"operationId":"oauth_clients.create","tags":["OAuth Clients"],"summary":"Create an OAuth client","requestBody":{"required":true,"description":"The client to create","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string","minLength":4,"maxLength":256},"description":{"type":"string"},"email":{"type":"string","format":"email"},"redirectUris":{"type":"array","items":{"type":"string","format":"uri"},"minItems":1},"scopes":{"type":"array","items":{"type":"string","enum":["workspaces:read","workspaces:write","workspaces:delete","workspace_members:read","workspace_members:write","workspace_members:delete","billing:read","billing:write","subscriptions:read","subscriptions:write","subscriptions:purchase","threads:read","threads:write","threads:delete","repositories:read","repositories:write","repositories:delete","ratings:write","messages:read","messages:write","messages:delete","integrations:read","integrations:write","integrations:delete","cloud_accounts:read","cloud_accounts:write","cloud_accounts:delete","memories:read","memories:write","memories:delete","cloud_infra:read","cloud_infra:write","cloud_infra:delete","analytics:read","analytics:export","audit_logs:read","audit_logs:export","api_keys:read","api_keys:write","api_keys:delete","telemetry_tokens:read","telemetry_tokens:write","telemetry_tokens:delete","autofixes:read","autofixes:write","autofixes:delete","teams:read","teams:write","teams:delete","labels:read","labels:write","labels:delete","oauth_clients:read","oauth_clients:write","oauth_clients:delete","agent_tools:read","agent_tools:write","issues:read","issues:write","issues:delete","pages:read","pages:delete","deliverables:read","deliverables:write"],"description":"Permission scope label","example":"workspaces:read"},"minItems":1},"logoUrl":{"type":"string","format":"uri"},"websiteUrl":{"type":"string","format":"uri"},"privacyPolicyUrl":{"type":"string","format":"uri"},"termsOfServiceUrl":{"type":"string","format":"uri"}},"required":["workspaceId","name","email","redirectUris","scopes"]}}}},"responses":{"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/OAuth Client With Secret"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/oauth_clients/{workspaceId}/{id}":{"get":{"operationId":"oauth_clients.get","tags":["OAuth Clients"],"summary":"Get an OAuth client","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^oauth_client_[0-9a-z]{24}$","description":"ID of the oauth_client","example":"oauth_client_efw4pgjae0n4vq2i5l98cozm"},"required":true,"description":"ID of the oauth_client","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/OAuth Client"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"put":{"operationId":"oauth_clients.update","tags":["OAuth Clients"],"summary":"Update an OAuth client","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^oauth_client_[0-9a-z]{24}$","description":"ID of the oauth_client","example":"oauth_client_efw4pgjae0n4vq2i5l98cozm"},"required":true,"description":"ID of the oauth_client","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The client to edit","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":4,"maxLength":256},"description":{"type":"string"},"email":{"type":"string","format":"email"},"redirectUris":{"type":"array","items":{"type":"string","format":"uri"},"minItems":1},"scopes":{"type":"array","items":{"type":"string","enum":["workspaces:read","workspaces:write","workspaces:delete","workspace_members:read","workspace_members:write","workspace_members:delete","billing:read","billing:write","subscriptions:read","subscriptions:write","subscriptions:purchase","threads:read","threads:write","threads:delete","repositories:read","repositories:write","repositories:delete","ratings:write","messages:read","messages:write","messages:delete","integrations:read","integrations:write","integrations:delete","cloud_accounts:read","cloud_accounts:write","cloud_accounts:delete","memories:read","memories:write","memories:delete","cloud_infra:read","cloud_infra:write","cloud_infra:delete","analytics:read","analytics:export","audit_logs:read","audit_logs:export","api_keys:read","api_keys:write","api_keys:delete","telemetry_tokens:read","telemetry_tokens:write","telemetry_tokens:delete","autofixes:read","autofixes:write","autofixes:delete","teams:read","teams:write","teams:delete","labels:read","labels:write","labels:delete","oauth_clients:read","oauth_clients:write","oauth_clients:delete","agent_tools:read","agent_tools:write","issues:read","issues:write","issues:delete","pages:read","pages:delete","deliverables:read","deliverables:write"],"description":"Permission scope label","example":"workspaces:read"},"minItems":1},"logoUrl":{"type":"string","format":"uri"},"websiteUrl":{"type":"string","format":"uri"},"privacyPolicyUrl":{"type":"string","format":"uri"},"termsOfServiceUrl":{"type":"string","format":"uri"},"isActive":{"type":"boolean"}},"required":["name","description","email","redirectUris","scopes"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/OAuth Client"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"oauth_clients.patch","tags":["OAuth Clients"],"summary":"Update the fields of an OAuth client","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^oauth_client_[0-9a-z]{24}$","description":"ID of the oauth_client","example":"oauth_client_efw4pgjae0n4vq2i5l98cozm"},"required":true,"description":"ID of the oauth_client","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The OAuth client properties to update","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":4,"maxLength":256},"description":{"type":"string"},"email":{"type":"string","format":"email"},"redirectUris":{"type":"array","items":{"type":"string","format":"uri"},"minItems":1},"scopes":{"type":"array","items":{"type":"string","enum":["workspaces:read","workspaces:write","workspaces:delete","workspace_members:read","workspace_members:write","workspace_members:delete","billing:read","billing:write","subscriptions:read","subscriptions:write","subscriptions:purchase","threads:read","threads:write","threads:delete","repositories:read","repositories:write","repositories:delete","ratings:write","messages:read","messages:write","messages:delete","integrations:read","integrations:write","integrations:delete","cloud_accounts:read","cloud_accounts:write","cloud_accounts:delete","memories:read","memories:write","memories:delete","cloud_infra:read","cloud_infra:write","cloud_infra:delete","analytics:read","analytics:export","audit_logs:read","audit_logs:export","api_keys:read","api_keys:write","api_keys:delete","telemetry_tokens:read","telemetry_tokens:write","telemetry_tokens:delete","autofixes:read","autofixes:write","autofixes:delete","teams:read","teams:write","teams:delete","labels:read","labels:write","labels:delete","oauth_clients:read","oauth_clients:write","oauth_clients:delete","agent_tools:read","agent_tools:write","issues:read","issues:write","issues:delete","pages:read","pages:delete","deliverables:read","deliverables:write"],"description":"Permission scope label","example":"workspaces:read"},"minItems":1},"logoUrl":{"type":"string","format":"uri"},"websiteUrl":{"type":"string","format":"uri"},"privacyPolicyUrl":{"type":"string","format":"uri"},"termsOfServiceUrl":{"type":"string","format":"uri"},"isActive":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/OAuth Client"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"oauth_clients.delete","tags":["OAuth Clients"],"summary":"Delete an OAuth client","x-polylane-banned-from":["private","autofix","fix_run"],"parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^oauth_client_[0-9a-z]{24}$","description":"ID of the oauth_client","example":"oauth_client_efw4pgjae0n4vq2i5l98cozm"},"required":true,"description":"ID of the oauth_client","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^oauth_client_[0-9a-z]{24}$","description":"ID of the oauth_client","example":"oauth_client_efw4pgjae0n4vq2i5l98cozm"},"_object":{"type":"string","enum":["oauth_client"]}},"required":["id","_object"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/oauth_clients/{workspaceId}":{"get":{"operationId":"oauth_clients.list","tags":["OAuth Clients"],"summary":"List OAuth clients","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","enum":["id","name","description","email","logoUrl","websiteUrl","privacyPolicyUrl","termsOfServiceUrl","isActive","created","updated"],"default":"created"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"name","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"description","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"email","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"logoUrl","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"websiteUrl","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"privacyPolicyUrl","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"termsOfServiceUrl","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OAuth Client"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/oauth_clients/rotate_secret":{"post":{"operationId":"oauth_clients.rotate_secret","tags":["OAuth Clients"],"summary":"Rotate the secret of an OAuth client","description":"Generates a new client secret and invalidates the previous one immediately.","x-polylane-banned-from":["private","autofix","fix_run"],"requestBody":{"required":true,"description":"The OAuth client whose secret to rotate","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"id":{"type":"string","pattern":"^oauth_client_[0-9a-z]{24}$","description":"ID of the oauth_client","example":"oauth_client_efw4pgjae0n4vq2i5l98cozm"}},"required":["workspaceId","id"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/OAuth Client With Secret"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/oauth/authorize":{"post":{"operationId":"oauth.authorizeConsent","tags":["OAuth"],"summary":"OAuth authorization consent","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"client_id":{"type":"string","description":"The client identifier issued to the client during registration","example":"oauth_client_efw4pgjae0n4vq2i5l98cozm"},"redirect_uri":{"type":"string","format":"uri","description":"The absolute URI to which the authorization server will redirect the user-agent after authorization is granted or denied. Must match one of the registered redirect URIs.","example":"https://app.example.com/oauth/callback"},"scope":{"type":"string","description":"Space-delimited list of scopes that identify the resources that the client is requesting access to","example":"read:user read:email write:repo"},"state":{"type":"string","description":"An opaque value used by the client to maintain state between the request and callback. The authorization server includes this value when redirecting back to the client. Used to prevent CSRF attacks.","example":"af0ifjsldkj3423ljasdf3"},"code_challenge":{"type":"string","description":"PKCE (RFC 7636) code challenge. Required for all clients.","example":"E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM"},"code_challenge_method":{"type":"string","enum":["S256"],"default":"S256","description":"PKCE code challenge method. Only S256 is accepted.","example":"S256"},"approved":{"type":"boolean","description":"Indicates whether the user has approved the authorization request. Set to true when the user clicks 'Allow' or 'Approve', false when they click 'Deny'.","example":true},"run":{"type":"string","maxLength":64,"description":"Pre-auth onboarding run identifier carried from the authorization URL. Invalid values are discarded, never rejected."}},"required":["client_id","redirect_uri","scope","code_challenge","approved"],"description":"OAuth 2.0 authorization request parameters. Used when redirecting the user to the authorization endpoint or processing the user's authorization decision."}}}},"responses":{"200":{"description":"Returns redirect URI with authorization code","content":{"application/json":{"schema":{"type":"object","properties":{"redirect_uri":{"type":"string"}},"required":["redirect_uri"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"}}}},"/v1/oauth/device/code":{"post":{"operationId":"oauth.deviceAuthorization","security":[],"tags":["OAuth"],"summary":"OAuth device authorization endpoint (RFC 8628)","requestBody":{"required":true,"description":"The device authorization request","content":{"application/json":{"schema":{"type":"object","properties":{"client_id":{"type":"string","description":"The client identifier issued to the client during registration","example":"oauth_client_efw4pgjae0n4vq2i5l98cozm"},"scope":{"type":"string","description":"Space-delimited list of scopes that identify the resources that the client is requesting access to","example":"read:user read:email write:repo"}},"required":["client_id","scope"],"description":"OAuth 2.0 device authorization request (RFC 8628)"}}}},"responses":{"200":{"description":"Device authorization issued successfully","content":{"application/json":{"schema":{"type":"object","properties":{"device_code":{"type":"string","description":"The device verification code, used by the device when polling the token endpoint"},"user_code":{"type":"string","description":"The code the user enters at the verification URI to approve the device","example":"BDFG2345"},"verification_uri":{"type":"string","description":"The URI the user should visit to enter the user code","example":"https://console.polylane.com/activate"},"verification_uri_complete":{"type":"string","description":"The verification URI with the user code pre-filled","example":"https://console.polylane.com/activate?user_code=BDFG2345"},"expires_in":{"type":"number","description":"The lifetime in seconds of the device code and user code","example":900},"interval":{"type":"number","description":"The minimum number of seconds the device should wait between token endpoint polls","example":5}},"required":["device_code","user_code","verification_uri","verification_uri_complete","expires_in","interval"],"description":"OAuth 2.0 device authorization response (RFC 8628)"}}}},"400":{"description":"Invalid request"},"404":{"description":"OAuth client not found"}}}},"/v1/oauth/device":{"get":{"operationId":"oauth.deviceLookup","tags":["OAuth"],"summary":"Look up a device authorization request","parameters":[{"schema":{"type":"string","description":"The user code displayed on the device","example":"BDFG2345"},"required":true,"description":"The user code displayed on the device","name":"user_code","in":"query"}],"responses":{"200":{"description":"Device authorization request details","content":{"application/json":{"schema":{"type":"object","properties":{"client_name":{"type":"string","description":"The name of the OAuth client requesting authorization","example":"Polylane CLI"},"client_description":{"type":"string","description":"The description of the OAuth client requesting authorization"},"client_logo_url":{"type":"string","description":"The logo URL of the OAuth client requesting authorization"},"scopes":{"type":"array","items":{"type":"string"},"description":"The scopes the device is requesting access to","example":["read:user","read:email"]},"status":{"type":"string","enum":["pending","approved","denied"],"description":"The current status of the device authorization request","example":"pending"}},"required":["client_name","scopes","status"],"description":"Details of a pending device authorization request"}}}},"401":{"description":"Authentication required"},"404":{"description":"Unknown or expired user code"}}}},"/v1/oauth/device/approve":{"post":{"operationId":"oauth.deviceConsent","tags":["OAuth"],"summary":"Approve or deny a device authorization request","requestBody":{"required":true,"description":"The device authorization decision","content":{"application/json":{"schema":{"type":"object","properties":{"user_code":{"type":"string","description":"The user code displayed on the device","example":"BDFG2345"},"approved":{"type":"boolean","description":"Indicates whether the user has approved the device authorization request. Set to true when the user clicks 'Approve', false when they click 'Deny'.","example":true},"run":{"type":"string","maxLength":64,"description":"Pre-auth onboarding run identifier carried from the device's verification link. Invalid values are discarded, never rejected."},"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"Workspace to pin the grant to. When set on an approval, tokens minted from this grant are bound to exactly this workspace and writes elsewhere are refused. The consenting user must be a member of the workspace.","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"}},"required":["user_code","approved"],"description":"The user's decision on a device authorization request"}}}},"responses":{"200":{"description":"Decision recorded","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["approved","denied"],"description":"The resulting status of the device authorization request","example":"approved"}},"required":["status"],"description":"Result of the device authorization decision"}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"},"404":{"description":"Unknown or expired user code"}}}},"/v1/oauth/token":{"post":{"operationId":"oauth.token","security":[],"tags":["OAuth"],"summary":"OAuth token endpoint","requestBody":{"required":true,"description":"The token request","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"grant_type":{"type":"string","enum":["authorization_code"],"description":"The grant type for the token request. Use 'authorization_code' for initial authentication.","example":"authorization_code"},"code":{"type":"string","description":"The authorization code received from the authorization server","example":"oauth_code_9b2l4opxmvjk6wy7f3dg8szn"},"redirect_uri":{"type":"string","description":"The redirect URI that was used in the authorization request. Must match exactly.","example":"https://app.example.com/oauth/callback"},"client_id":{"type":"string","description":"The client identifier issued to the client during registration","example":"oauth_client_efw4pgjae0n4vq2i5l98cozm"},"client_secret":{"type":"string","description":"The client secret. Required for confidential clients."},"code_verifier":{"type":"string","description":"The PKCE code verifier. Required for all token requests.","example":"dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"}},"required":["grant_type","code","redirect_uri","client_id","client_secret","code_verifier"],"description":"Token request using authorization code grant type"},{"type":"object","properties":{"grant_type":{"type":"string","enum":["refresh_token"],"description":"The grant type for the token request. Use 'refresh_token' to refresh an access token.","example":"refresh_token"},"refresh_token":{"type":"string","description":"The refresh token issued to the client","example":"oauth_refresh_m4k8sz2nwp9l3x6v7jbgqfth"},"client_id":{"type":"string","description":"The client identifier issued to the client during registration","example":"oauth_client_efw4pgjae0n4vq2i5l98cozm"},"client_secret":{"type":"string","description":"The client secret. Required for confidential clients."},"scope":{"type":"string","description":"The requested scope of the access token. If omitted, the scope is unchanged from the original authorization.","example":"read:user read:email"}},"required":["grant_type","refresh_token","client_id","client_secret"],"description":"Token request using refresh token grant type"},{"type":"object","properties":{"grant_type":{"type":"string","enum":["urn:ietf:params:oauth:grant-type:device_code"],"description":"The grant type for the token request. Use 'urn:ietf:params:oauth:grant-type:device_code' when polling for a device authorization (RFC 8628).","example":"urn:ietf:params:oauth:grant-type:device_code"},"device_code":{"type":"string","description":"The device verification code returned by the device authorization endpoint"},"client_id":{"type":"string","description":"The client identifier issued to the client during registration","example":"oauth_client_efw4pgjae0n4vq2i5l98cozm"},"client_secret":{"type":"string","description":"The client secret. Required for confidential clients."}},"required":["grant_type","device_code","client_id","client_secret"],"description":"Token request using device code grant type (RFC 8628)"}],"discriminator":{"propertyName":"grant_type","mapping":{"authorization_code":"AuthorizationCodeRequest","refresh_token":"RefreshTokenRequest","urn:ietf:params:oauth:grant-type:device_code":"DeviceCodeRequest"}},"description":"OAuth 2.0 token request. Supports authorization code, refresh token, and device code grant types."}}}},"responses":{"200":{"description":"Token issued successfully","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string","description":"The access token issued by the authorization server"},"token_type":{"type":"string","enum":["Bearer"],"description":"The type of token issued. Always 'Bearer' for OAuth 2.0.","example":"Bearer"},"expires_in":{"type":"number","description":"The lifetime in seconds of the access token","example":3600},"refresh_token":{"type":"string","description":"The refresh token, which can be used to obtain new access tokens","example":"oauth_refresh_m4k8sz2nwp9l3x6v7jbgqfth"},"scope":{"type":"string","description":"The scope of the access token. Space-delimited list of granted scopes.","example":"read:user read:email"}},"required":["access_token","token_type","expires_in","refresh_token","scope"],"description":"Successful OAuth 2.0 token response"}}}},"400":{"description":"Invalid request"},"401":{"description":"Invalid client credentials"}}}},"/v1/oauth/introspect":{"post":{"operationId":"oauth.introspect","tags":["OAuth"],"summary":"OAuth token introspection","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"token_type_hint":{"type":"string","enum":["access_token"]},"client_id":{"type":"string"},"client_secret":{"type":"string"}},"required":["token","client_id","client_secret"]}}}},"responses":{"200":{"description":"Token introspection result","content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"},"scope":{"type":"string"},"client_id":{"type":"string"},"username":{"type":"string"},"exp":{"type":"number"},"iat":{"type":"number"},"sub":{"type":"string"}},"required":["active"]}}}},"401":{"description":"Invalid client credentials"}}}},"/v1/oauth/userinfo":{"get":{"operationId":"oauth.userinfo","security":[{"Bearer":[]}],"tags":["OAuth"],"summary":"OAuth user info","responses":{"200":{"description":"User information","content":{"application/json":{"schema":{"type":"object","properties":{"sub":{"type":"string"},"name":{"type":"string"},"given_name":{"type":"string"},"family_name":{"type":"string"},"email":{"type":"string"},"email_verified":{"type":"boolean"},"username":{"type":"string"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["sub"]}}}},"401":{"description":"Invalid or expired access token"}}}},"/v1/oauth/revoke":{"post":{"operationId":"oauth.revoke","security":[],"tags":["OAuth"],"summary":"OAuth token revocation","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"The token to revoke"},"token_type_hint":{"type":"string","enum":["access_token","refresh_token"],"description":"A hint about the type of the token submitted for revocation"},"client_id":{"type":"string","description":"The client identifier"},"client_secret":{"type":"string","description":"The client secret"}},"required":["token","client_id","client_secret"]}}}},"responses":{"200":{"description":"Token revoked successfully (or was already invalid)"},"401":{"description":"Invalid client credentials"}}}},"/v1/.well-known/openid-configuration":{"get":{"operationId":"oauth.wellKnown","tags":["OAuth"],"summary":"OpenID Connect discovery endpoint","responses":{"200":{"description":"OpenID configuration","content":{"application/json":{"schema":{"type":"object","properties":{"issuer":{"type":"string"},"authorization_endpoint":{"type":"string"},"device_authorization_endpoint":{"type":"string"},"token_endpoint":{"type":"string"},"userinfo_endpoint":{"type":"string"},"jwks_uri":{"type":"string"},"response_types_supported":{"type":"array","items":{"type":"string"}},"subject_types_supported":{"type":"array","items":{"type":"string"}},"id_token_signing_alg_values_supported":{"type":"array","items":{"type":"string"}},"scopes_supported":{"type":"array","items":{"type":"string"}},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}},"claims_supported":{"type":"array","items":{"type":"string"}},"code_challenge_methods_supported":{"type":"array","items":{"type":"string"}},"grant_types_supported":{"type":"array","items":{"type":"string"}},"introspection_endpoint":{"type":"string"},"revocation_endpoint":{"type":"string"},"revocation_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}}},"required":["issuer","authorization_endpoint","device_authorization_endpoint","token_endpoint","userinfo_endpoint","response_types_supported","subject_types_supported","scopes_supported","token_endpoint_auth_methods_supported","claims_supported","code_challenge_methods_supported","grant_types_supported","introspection_endpoint"]}}}}}}},"/v1/.well-known/oauth-authorization-server":{"get":{"operationId":"oauth.wellKnownRFC8414","tags":["OAuth"],"summary":"OAuth authorization server metadata (RFC 8414)","responses":{"200":{"description":"OAuth authorization server metadata (RFC 8414)","content":{"application/json":{"schema":{"type":"object","properties":{"issuer":{"type":"string"},"authorization_endpoint":{"type":"string"},"device_authorization_endpoint":{"type":"string"},"token_endpoint":{"type":"string"},"userinfo_endpoint":{"type":"string"},"jwks_uri":{"type":"string"},"response_types_supported":{"type":"array","items":{"type":"string"}},"subject_types_supported":{"type":"array","items":{"type":"string"}},"id_token_signing_alg_values_supported":{"type":"array","items":{"type":"string"}},"scopes_supported":{"type":"array","items":{"type":"string"}},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}},"claims_supported":{"type":"array","items":{"type":"string"}},"code_challenge_methods_supported":{"type":"array","items":{"type":"string"}},"grant_types_supported":{"type":"array","items":{"type":"string"}},"introspection_endpoint":{"type":"string"},"revocation_endpoint":{"type":"string"},"revocation_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}}},"required":["issuer","authorization_endpoint","device_authorization_endpoint","token_endpoint","userinfo_endpoint","response_types_supported","subject_types_supported","scopes_supported","token_endpoint_auth_methods_supported","claims_supported","code_challenge_methods_supported","grant_types_supported","introspection_endpoint"]}}}}}}},"/v1/public/llm_providers":{"get":{"operationId":"llmProviders.list","tags":["LlmProviders"],"summary":"List LLM providers","responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"},"icon":{"type":"string"}},"required":["value","label","icon"]}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/teams":{"post":{"operationId":"teams.post","tags":["Teams"],"summary":"Create a team","requestBody":{"required":true,"description":"The team to create","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"name":{"type":"string","minLength":1,"maxLength":128,"description":"Team name"},"slug":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-z0-9_]+(?:-[a-z0-9_]+)*$","description":"URL-friendly identifier. Auto-generated from name if not provided."},"description":{"type":"string","maxLength":2000,"description":"Team description"},"color":{"type":"string","maxLength":32,"description":"Hex color for UI badges"},"icon":{"type":"string","maxLength":64,"description":"Icon identifier"}},"required":["workspaceId","name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Team"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/teams/{workspaceId}":{"get":{"operationId":"teams.list","tags":["Teams"],"summary":"List teams","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","enum":["id","name","slug","description","color","icon","createdBy","created","updated"],"default":"created"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":50},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"name","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"slug","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"description","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"color","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"icon","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"createdBy","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Team"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/teams/{workspaceId}/mine":{"get":{"operationId":"teams.mine","tags":["Teams"],"summary":"List teams the current user belongs to","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Team"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/teams/{workspaceId}/{teamId}":{"get":{"operationId":"teams.get","tags":["Teams"],"summary":"Get a team","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^team_[0-9a-z]{24}$","description":"ID of the team","example":"team_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the team","name":"teamId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Team"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"teams.del","tags":["Teams"],"summary":"Delete a team","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^team_[0-9a-z]{24}$","description":"ID of the team","example":"team_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the team","name":"teamId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Team"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/teams/{teamId}":{"patch":{"operationId":"teams.patch","tags":["Teams"],"summary":"Update a team","parameters":[{"schema":{"type":"string","pattern":"^team_[0-9a-z]{24}$","description":"ID of the team","example":"team_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the team","name":"teamId","in":"path"}],"requestBody":{"required":true,"description":"The team fields to update","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"name":{"type":"string","minLength":1,"maxLength":128,"description":"Team name"},"slug":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-z0-9_]+(?:-[a-z0-9_]+)*$","description":"URL-friendly identifier"},"description":{"type":"string","nullable":true,"maxLength":2000,"description":"Team description"},"color":{"type":"string","nullable":true,"maxLength":32,"description":"Hex color"},"icon":{"type":"string","nullable":true,"maxLength":64,"description":"Icon identifier"}},"required":["workspaceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Team"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/teams/members":{"post":{"operationId":"team_members.post","tags":["Teams"],"summary":"Add a member to a team","requestBody":{"required":true,"description":"The user to add to the team","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"teamId":{"type":"string","pattern":"^team_[0-9a-z]{24}$","example":"team_38mg3o4ibc92h8t2efn8csrh","description":"Team ID"},"userId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6","description":"User to add"}},"required":["workspaceId","teamId","userId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/TeamMember"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/teams/{workspaceId}/{teamId}/members":{"get":{"operationId":"team_members.list","tags":["Teams"],"summary":"List members of a team","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^team_[0-9a-z]{24}$","description":"ID of the team","example":"team_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the team","name":"teamId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TeamMember"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/teams/members/remove":{"post":{"operationId":"team_members.del","tags":["Teams"],"summary":"Remove a member from a team","requestBody":{"required":true,"description":"The user to remove from the team","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"teamId":{"type":"string","pattern":"^team_[0-9a-z]{24}$","example":"team_38mg3o4ibc92h8t2efn8csrh","description":"Team ID"},"userId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6","description":"User to remove"}},"required":["workspaceId","teamId","userId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/labels":{"post":{"operationId":"labels.post","tags":["Labels"],"summary":"Create a label","requestBody":{"required":true,"description":"The label to create","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"name":{"type":"string","minLength":1,"maxLength":64,"description":"Label name"},"color":{"type":"string","maxLength":32,"description":"Hex color code"},"description":{"type":"string","maxLength":500,"description":"Label description"}},"required":["workspaceId","name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Label"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/labels/{workspaceId}":{"get":{"operationId":"labels.list","tags":["Labels"],"summary":"List labels","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","enum":["id","name","color","description","createdBy","created","updated"],"default":"name"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":50},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc"},"required":false,"name":"order","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"name","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"color","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"description","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"createdBy","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Label"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/labels/{workspaceId}/{labelId}":{"get":{"operationId":"labels.get","tags":["Labels"],"summary":"Get a label","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","description":"ID of the label"},"required":true,"description":"ID of the label","name":"labelId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Label"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"labels.del","tags":["Labels"],"summary":"Delete a label","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","description":"ID of the label"},"required":true,"description":"ID of the label","name":"labelId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Label"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/labels/{labelId}":{"patch":{"operationId":"labels.patch","tags":["Labels"],"summary":"Update a label","parameters":[{"schema":{"type":"string","description":"ID of the label"},"required":true,"description":"ID of the label","name":"labelId","in":"path"}],"requestBody":{"required":true,"description":"The label fields to update","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"name":{"type":"string","minLength":1,"maxLength":64,"description":"Label name"},"color":{"type":"string","maxLength":32,"description":"Hex color code"},"description":{"type":"string","nullable":true,"maxLength":500,"description":"Label description"}},"required":["workspaceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Label"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/terminal/reset":{"post":{"operationId":"terminal.reset","tags":["Repositories"],"summary":"Reset terminal sandbox environment","requestBody":{"required":true,"description":"Reset terminal sandbox","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","description":"Workspace ID"},"repositoryId":{"type":"string","description":"Repository ID"}},"required":["workspaceId","repositoryId"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"reset":{"type":"boolean"}},"required":["reset"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/repositories/{workspaceId}/{id}/environment":{"get":{"operationId":"repositories.environment.get","tags":["Repositories"],"summary":"Get repository environment configuration","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^repo_[0-9a-z]{24}$","description":"ID of the repository","example":"repo_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the repository","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/RepositoryEnvironment"}},"required":["message","success","error","result"]}}}},"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/RepositoryEnvironment"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"put":{"operationId":"repositories.environment.put","tags":["Repositories"],"summary":"Create or update repository environment configuration","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^repo_[0-9a-z]{24}$","description":"ID of the repository","example":"repo_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the repository","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The environment configuration to create or update","content":{"application/json":{"schema":{"type":"object","properties":{"containerImage":{"type":"string","default":"universal","description":"Container base image name"},"preinstalledPackages":{"allOf":[{"$ref":"#/components/schemas/PreinstalledPackages"},{"description":"Runtime versions to pre-install"}]},"setupScriptMode":{"type":"string","enum":["automatic","manual"],"default":"automatic","description":"Automatic or manual dependency installation"},"setupScript":{"type":"string","nullable":true,"default":null,"description":"Manual bash setup script"},"maintenanceScript":{"type":"string","nullable":true,"default":null,"description":"Bash script for cached container resumption"},"prReviewCheckDisabledAt":{"type":"string","nullable":true,"format":"date-time","default":null,"description":"When null, the impact assessment posts a GitHub check that fails on production concerns, so branch protection can block merging; set to disable the check"},"prReviewsDisabledAt":{"type":"string","nullable":true,"format":"date-time","default":null,"description":"When set, Polylane does not assess production impact for pull requests on this repository"},"autofixDisabledAt":{"type":"string","nullable":true,"format":"date-time","default":null,"description":"When set, Polylane does not open new autofix pull requests on this repository"},"prReviewMaxAutoRounds":{"type":"integer","nullable":true,"minimum":1,"maximum":100,"description":"How many pushes to a pull request are assessed automatically before Polylane pauses and waits to be asked; null uses the default of 10. Omit to keep the current value"},"envVars":{"type":"object","additionalProperties":{"type":"string"},"default":{},"description":"Environment variables for sandbox"},"secrets":{"type":"object","additionalProperties":{"type":"string"},"default":{},"description":"Secrets (encrypted at rest, available only during setup)"},"cachingEnabled":{"type":"boolean","default":true,"description":"Enable container state caching"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/RepositoryEnvironment"}},"required":["message","success","error","result"]}}}},"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/RepositoryEnvironment"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"repositories.environment.delete","tags":["Repositories"],"summary":"Delete repository environment configuration","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^repo_[0-9a-z]{24}$","description":"ID of the repository","example":"repo_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the repository","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"]}},"required":["message","success","error","result"]}}}},"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/environment/reset-cache":{"post":{"operationId":"repositories.environment.resetCache","tags":["Repositories"],"summary":"Reset repository environment cache","requestBody":{"required":true,"description":"Reset cache request","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","description":"Workspace ID"},"repositoryId":{"type":"string","description":"Repository ID"}},"required":["workspaceId","repositoryId"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"reset":{"type":"boolean"}},"required":["reset"]}},"required":["message","success","error","result"]}}}},"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"reset":{"type":"boolean"}},"required":["reset"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/environment/detect":{"post":{"operationId":"repositories.environment.detect","tags":["Repositories"],"summary":"Detect repository environment configuration from its files","requestBody":{"required":true,"description":"Detect environment request","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","description":"Workspace ID"},"repositoryId":{"type":"string","description":"Repository ID"}},"required":["workspaceId","repositoryId"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"packageManager":{"type":"string","nullable":true,"description":"Detected package manager"},"installCommand":{"type":"string","nullable":true,"description":"Generated install command"},"lockFile":{"type":"string","nullable":true,"description":"Detected lock file"},"runtimeHints":{"allOf":[{"$ref":"#/components/schemas/PreinstalledPackages"},{"description":"Suggested runtime versions"}]}},"required":["packageManager","installCommand","lockFile","runtimeHints"]}},"required":["message","success","error","result"]}}}},"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"packageManager":{"type":"string","nullable":true,"description":"Detected package manager"},"installCommand":{"type":"string","nullable":true,"description":"Generated install command"},"lockFile":{"type":"string","nullable":true,"description":"Detected lock file"},"runtimeHints":{"allOf":[{"$ref":"#/components/schemas/PreinstalledPackages"},{"description":"Suggested runtime versions"}]}},"required":["packageManager","installCommand","lockFile","runtimeHints"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/environment/setup":{"post":{"operationId":"repositories.environment.setup","tags":["Repositories"],"summary":"Run repository environment setup","requestBody":{"required":true,"description":"Setup retry request","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","description":"Workspace ID"},"repositoryId":{"type":"string","description":"Repository ID"}},"required":["workspaceId","repositoryId"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"queued":{"type":"boolean"}},"required":["queued"]}},"required":["message","success","error","result"]}}}},"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"queued":{"type":"boolean"}},"required":["queued"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/repositories/{workspaceId}/pr_reviews/{id}":{"get":{"operationId":"repositories.pr_reviews.get","tags":["Repositories"],"summary":"Count the repositories on an integration with impact assessments enabled","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^int_[0-9a-z]{24}$","description":"ID of the integration","example":"int_34gky74ibc92h8t2efn8csrh"},"required":true,"description":"ID of the integration","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/IntegrationPrReviewCounts"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/repositories/pr_reviews":{"post":{"operationId":"repositories.pr_reviews.post","tags":["Repositories"],"summary":"Enable or disable impact assessments on a set of repositories","requestBody":{"required":true,"description":"The impact assessment state to apply, and the repositories to apply it to","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"enabled":{"type":"boolean","description":"State to apply to every repository in scope"},"repositoryIds":{"type":"array","items":{"type":"string","pattern":"^repo_[0-9a-z]{24}$","description":"ID of the repository","example":"repo_38mg3o4ibc92h8t2efn8csrh"},"minItems":1,"description":"Repositories to apply the state to"},"integrationId":{"type":"string","pattern":"^int_[0-9a-z]{24}$","description":"Apply the state to every repository connected to this integration","example":"int_34gky74ibc92h8t2efn8csrh"}},"required":["workspaceId","enabled"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/PrReviewsBulkResult"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/repositories/pr_reviews/review":{"post":{"operationId":"repositories.pr_reviews.review","tags":["Repositories"],"summary":"Run an impact assessment for a pull request now","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"repositoryId":{"type":"string","pattern":"^repo_[0-9a-z]{24}$","description":"ID of the repository","example":"repo_38mg3o4ibc92h8t2efn8csrh"},"prNumber":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Pull request number on GitHub"}},"required":["workspaceId","repositoryId","prNumber"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/PrReviewRequest"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/repositories/{workspaceId}/{id}/autofix_reviewers/candidates":{"get":{"operationId":"repositories.autofix_reviewers.candidates","tags":["Repositories"],"summary":"Search the GitHub people and teams who can be set as autofix reviewers on a repository","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^repo_[0-9a-z]{24}$","description":"ID of the repository","example":"repo_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the repository","name":"id","in":"path"},{"schema":{"type":"string","maxLength":100,"description":"A GitHub login, team slug, or the start of a name. Omit to list every candidate."},"required":false,"description":"A GitHub login, team slug, or the start of a name. Omit to list every candidate.","name":"q","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/RepositoryReviewerCandidates"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/repositories/{workspaceId}/{id}/autofix_reviewers":{"get":{"operationId":"repositories.autofix_reviewers.get","tags":["Repositories"],"summary":"List the people and teams asked to review autofix pull requests on a repository","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^repo_[0-9a-z]{24}$","description":"ID of the repository","example":"repo_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the repository","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/RepositoryAutofixReviewers"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"put":{"operationId":"repositories.autofix_reviewers.put","tags":["Repositories"],"summary":"Set the people and teams asked to review autofix pull requests on a repository","description":"Replaces the list. Each entry is matched against the members and teams of the GitHub organization that owns the repository. When an entry matches nobody, or several people, nothing is saved and the error lists what to fix.","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^repo_[0-9a-z]{24}$","description":"ID of the repository","example":"repo_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the repository","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The reviewers to set on the repository","content":{"application/json":{"schema":{"type":"object","properties":{"reviewers":{"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"object","properties":{"kind":{"type":"string","enum":["user","team"],"description":"A GitHub user, or a team of the organization that owns the repository"},"githubId":{"type":"string","pattern":"^\\d+$","description":"Numeric GitHub id from a saved reviewer or a candidate"}},"required":["kind","githubId"]}]},"maxItems":15,"description":"The full list of reviewers, which replaces the current one. Send a reviewer you already have, or a candidate, as `{ kind, githubId }`: an id stays the same person after a rename on GitHub. Text is a GitHub login (`joe-smith`), a team (`acme/platform` or `platform`), or a name (`Joe`), matched against who holds it now; a name must match exactly one member of the organization that owns the repository. Send an empty list to clear."}},"required":["reviewers"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/RepositoryAutofixReviewers"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/repositories/{workspaceId}/{id}":{"get":{"operationId":"repositories.get","tags":["Repositories"],"summary":"Get a repository","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^repo_[0-9a-z]{24}$","description":"ID of the repository","example":"repo_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the repository","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Repository"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"put":{"operationId":"repositories.put","tags":["Repositories"],"summary":"Update a repository","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^repo_[0-9a-z]{24}$","description":"ID of the repository","example":"repo_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the repository","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The repository properties to update","content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","nullable":true,"description":"Description of the repository"},"keywords":{"type":"array","items":{"type":"string"},"description":"Key topics of the repository"},"labels":{"type":"array","items":{"type":"string"},"maxItems":20},"disabled":{"type":"boolean","nullable":true},"changeDescription":{"type":"string","nullable":true,"description":"Description of the change"}},"required":["keywords","disabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Repository"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"repositories.patch","tags":["Repositories"],"summary":"Update the fields of a repository","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^repo_[0-9a-z]{24}$","description":"ID of the repository","example":"repo_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the repository","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The repository properties to update","content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","nullable":true,"description":"Description of the repository"},"keywords":{"type":"array","items":{"type":"string"},"description":"Key topics of the repository"},"labels":{"type":"array","items":{"type":"string"},"maxItems":20},"disabled":{"type":"boolean","nullable":true},"changeDescription":{"type":"string","nullable":true,"description":"Description of the change"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Repository"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"repositories.del","tags":["Repositories"],"summary":"Delete a repository","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^repo_[0-9a-z]{24}$","description":"ID of the repository","example":"repo_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the repository","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^repo_[0-9a-z]{24}$","description":"ID of the repository","example":"repo_38mg3o4ibc92h8t2efn8csrh"},"_object":{"type":"string","enum":["repository"]}},"required":["id","_object"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/repositories/{workspaceId}/{id}/instrumentation":{"get":{"operationId":"repositories.instrumentation","tags":["Repositories"],"summary":"Observability instrumentation report for a repository: route coverage plus the open findings","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^repo_[0-9a-z]{24}$","description":"ID of the repository","example":"repo_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the repository","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/RepositoryInstrumentationReport"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/repositories/{workspaceId}/{id}/advisories/{advisoryId}/dismissal":{"post":{"operationId":"repositories.advisory_dismissal","tags":["Repositories"],"summary":"Ignore or restore an observability finding for a repository","parameters":[{"schema":{"type":"string","description":"ID of the workspace"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","description":"ID of the repository"},"required":true,"description":"ID of the repository","name":"id","in":"path"},{"schema":{"type":"string","description":"ID of the finding"},"required":true,"description":"ID of the finding","name":"advisoryId","in":"path"}],"requestBody":{"required":true,"description":"The desired dismissal state","content":{"application/json":{"schema":{"type":"object","properties":{"dismissed":{"type":"boolean","description":"true ignores this finding; false restores it"}},"required":["dismissed"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/RepositoryAdvisoryDismissal"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/repositories/{workspaceId}/{id}/changes":{"get":{"operationId":"repositories.changes.list","tags":["Repositories"],"summary":"List pull request change intelligence records for a repository","parameters":[{"schema":{"type":"string","description":"ID of the workspace"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","description":"ID of the repository"},"required":true,"description":"ID of the repository","name":"id","in":"path"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":50},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PrChangeRecord"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/repositories/{workspaceId}/{id}/changes/{changeId}":{"get":{"operationId":"repositories.changes.get","tags":["Repositories"],"summary":"Get a pull request change intelligence record","parameters":[{"schema":{"type":"string","description":"ID of the workspace"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","description":"ID of the repository"},"required":true,"description":"ID of the repository","name":"id","in":"path"},{"schema":{"type":"string","description":"ID of the pull request change record"},"required":true,"description":"ID of the pull request change record","name":"changeId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/PrChangeRecordDetail"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/repositories/{workspaceId}/{id}/changes/{changeId}/dismissal":{"post":{"operationId":"repositories.changes.dismiss","tags":["Repositories"],"summary":"Ignore or restore a pull request change intelligence record","parameters":[{"schema":{"type":"string","description":"ID of the workspace"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","description":"ID of the repository"},"required":true,"description":"ID of the repository","name":"id","in":"path"},{"schema":{"type":"string","description":"ID of the pull request change record"},"required":true,"description":"ID of the pull request change record","name":"changeId","in":"path"}],"requestBody":{"required":true,"description":"The desired dismissal state","content":{"application/json":{"schema":{"type":"object","properties":{"dismissed":{"type":"boolean","description":"true ignores this analysis and stops comments on the pull request; false restores it"}},"required":["dismissed"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/PrChangeRecordDismissal"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/repositories/{workspaceId}/{id}/changes/{changeId}/fix":{"post":{"operationId":"repositories.changes.fix","tags":["Repositories"],"summary":"Start an autofix that addresses a failed pull request impact assessment","parameters":[{"schema":{"type":"string","description":"ID of the workspace"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","description":"ID of the repository"},"required":true,"description":"ID of the repository","name":"id","in":"path"},{"schema":{"type":"string","description":"ID of the pull request change record"},"required":true,"description":"ID of the pull request change record","name":"changeId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/PrChangeRecordFix"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/repositories/{workspaceId}":{"get":{"operationId":"repositories.list","tags":["Repositories"],"summary":"List repositories","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","enum":["remoteId","id","name","description","createdBy","lastEditedBy","integrationId","owner","provider","status","lastSync","created","updated","disabled","pendingSyncs","pendingChildWorkflows","normalizedRemote","githubRepoId","installationId","unavailableAt","unavailableReason"],"default":"created"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"remoteId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"name","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"description","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"createdBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"lastEditedBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"integrationId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"owner","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"provider","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"status","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"lastSync","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"disabled","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"pendingSyncs","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"pendingChildWorkflows","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"normalizedRemote","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"githubRepoId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"installationId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"unavailableAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"unavailableReason","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"labels","in":"query"},{"schema":{"$ref":"#/components/schemas/Repository Access Filter"},"required":false,"description":"Only repositories in one of these access states: 'active', 'paused' by a person, or 'unavailable' on GitHub. Takes one state or a list; prefix a state with '!' to exclude it.","name":"access","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/RepositoryWithPrReviews"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/repositories/search":{"post":{"operationId":"repositories.search","tags":["Repositories"],"summary":"Search repositories","parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"remoteId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"name","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"description","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"createdBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"lastEditedBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"integrationId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"owner","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"provider","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"status","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"lastSync","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"disabled","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"pendingSyncs","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"pendingChildWorkflows","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"normalizedRemote","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"githubRepoId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"installationId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"unavailableAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"unavailableReason","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"labels","in":"query"},{"schema":{"$ref":"#/components/schemas/Repository Access Filter"},"required":false,"description":"Only repositories in one of these access states: 'active', 'paused' by a person, or 'unavailable' on GitHub. Takes one state or a list; prefix a state with '!' to exclude it.","name":"access","in":"query"}],"requestBody":{"required":true,"description":"The prompt to search repositories","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"prompt":{"type":"string","nullable":true}},"required":["workspaceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"array","items":{"$ref":"#/components/schemas/RepositoryWithPrReviews"}}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"418":{"description":"I'm a Teapot","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["I'm a Teapot"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/integrations/catalog":{"get":{"operationId":"integrations.public.catalog","security":[],"tags":["Integrations"],"summary":"Get the public integrations and cloud providers catalog","responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"category":{"type":"string","enum":["tool","cloud"]},"subcategory":{"type":"string","enum":["git","observability","communication","knowledge-base","issue-tracking","incident-management","ci-cd","product-analytics","cloud","protocol","code-agent"]},"name":{"type":"string"},"description":{"type":"string"},"longDescription":{"type":"string"},"icon":{"type":"string"},"comingSoon":{"type":"boolean"},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"summary":{"type":"string"}},"required":["name","summary"]}},"supportedResources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string"}},"required":["type","name","icon"]}},"lifecycle":{"type":"object","properties":{"connect":{"type":"string","enum":["api-key","oauth","app-install","cloudformation","infrastructure-manager","helm","none"]},"reconnect":{"type":"string","enum":["credentials","authorize","provider","none"],"description":"How a connected integration takes new access without a disconnect: replace the stored credentials, authorize again, change the access in the provider, or nothing to renew."},"browser":{"type":"boolean","description":"Connecting needs a human in a browser (OAuth consent, app install page, cloud console)."},"headlessConnect":{"type":"boolean","description":"The connect API accepts credentials directly without a browser."},"teardown":{"type":"string","enum":["complete","partial","none"],"description":"How much of the provider-side footprint a Polylane disconnect removes."},"residue":{"type":"array","items":{"type":"string"},"description":"Provider-side objects that remain after a Polylane disconnect."}},"required":["connect","reconnect","browser","headlessConnect","teardown","residue"]},"marketing":{"type":"object","properties":{"whatPolylaneDoes":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"body":{"type":"string"}},"required":["title","body"]}},"howItWorks":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"body":{"type":"string"}},"required":["title","body"]}}},"required":["whatPolylaneDoes","howItWorks"],"description":"Marketing content for polylane.com/integrations: what Polylane does with this integration and how it works."},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["integration_catalog_item"]}},"required":["type","category","subcategory","name","description","longDescription","icon","comingSoon","tools","supportedResources","lifecycle","_object"]}}},"required":["items"]}},"required":["message","success","error","result"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/integrations/stack_scan":{"get":{"operationId":"integrations.public.stackScan","security":[],"tags":["Integrations"],"summary":"Scan a domain's public stack and name the providers Polylane connects to","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":300,"description":"The domain to scan. A pasted URL or email address is reduced to its hostname.","example":"polylane.com"},"required":true,"description":"The domain to scan. A pasted URL or email address is reduced to its hostname.","name":"domain","in":"query"}],"responses":{"200":{"description":"A newline-delimited JSON stream of scan events: `start`, then `edge` and `node` events as detectors resolve, one `provider` event per Polylane cloud provider or integration the public signals point at, and `done`.","content":{"application/x-ndjson":{"schema":{"type":"string"}}}},"400":{"description":"The domain is not a public, resolvable domain"},"429":{"description":"Too many scans from this address"}}}},"/v1/integrations/slack/generate":{"post":{"operationId":"integrations.slack.generate","tags":["Integrations"],"summary":"Generate Slack OAuth install URL","requestBody":{"required":true,"description":"Workspace to connect Slack to","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"url":{"type":"string"},"state":{"type":"string"}},"required":["url","state"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/integrations/{workspaceId}/slack/{id}/channels":{"get":{"operationId":"integrations.slack.channels","tags":["Integrations"],"summary":"List Slack channels the bot can post in","parameters":[{"schema":{"type":"string"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"isMember":{"type":"boolean"},"numMembers":{"type":"number"},"mentionOnly":{"type":"boolean"}},"required":["id","name","isPrivate","isMember","mentionOnly"]}}},"required":["channels"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/integrations/{workspaceId}/slack/{id}/channel-suggestions":{"get":{"operationId":"integrations.slack.channelSuggestions","tags":["Integrations"],"summary":"Suggest public Slack channels the bot should join","parameters":[{"schema":{"type":"string"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"suggestions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"pitch":{"type":"string"}},"required":["id","name","pitch"]}},"inAnyRealChannel":{"type":"boolean"},"notificationsChannelId":{"type":"string"},"notificationsChannelName":{"type":"string"},"teamIcon":{"type":"string"},"canSelfJoin":{"type":"boolean"},"truncated":{"type":"boolean"}},"required":["suggestions","inAnyRealChannel","canSelfJoin","truncated"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/integrations/slack/channels/join":{"post":{"operationId":"integrations.slack.channels.join","tags":["Integrations"],"summary":"Join a public Slack channel as the bot; answers invite_needed or unavailable when it cannot","requestBody":{"required":true,"description":"The Slack channel the bot should join","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"integrationId":{"type":"string"},"channelId":{"type":"string"}},"required":["workspaceId","integrationId","channelId"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"status":{"type":"string","enum":["joined","invite_needed","unavailable"]}},"required":["status"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/integrations/{workspaceId}/slack/channels/{channelId}":{"get":{"operationId":"integrations.slack.channel.get","tags":["Integrations"],"summary":"Get a Slack channel the workspace can configure","parameters":[{"schema":{"type":"string"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"channelId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Slack Channel Detail"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/integrations/{workspaceId}/slack/channels/{channelId}/proactive":{"get":{"operationId":"integrations.slack.channelProactive.get","tags":["Integrations"],"summary":"Get whether a Slack channel is mention-only","parameters":[{"schema":{"type":"string"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"channelId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Slack Channel Proactive Mode Detail"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"put":{"operationId":"integrations.slack.channelProactive.put","tags":["Integrations"],"summary":"Set whether a Slack channel is mention-only","parameters":[{"schema":{"type":"string"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"channelId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Slack Channel Proactive Mode"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Slack Channel Proactive Mode Detail"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/integrations/{workspaceId}/slack/{id}/members":{"get":{"operationId":"integrations.slack.members","tags":["Integrations"],"summary":"List the people in the connected Slack workspace","parameters":[{"schema":{"type":"string"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"image":{"type":"string"}},"required":["id","name"]}}},"required":["members"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/integrations/github/generate":{"post":{"operationId":"integrations.github.generate","tags":["Integrations"],"summary":"Generate GitHub app integration url","requestBody":{"required":true,"description":"The params to generate","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"flow":{"type":"string","enum":["install"],"description":"`install` opens the app's install page directly, to add another GitHub account to a workspace that already has one"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/integrations/mcp/connect":{"post":{"operationId":"integrations.mcp.connect","tags":["Integrations"],"summary":"Connect an MCP server","requestBody":{"required":true,"description":"MCP server connection details","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["mcp"]},"workspaceId":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string","minLength":1,"maxLength":64},"transport":{"type":"string","enum":["http","sse"],"default":"http"},"bearerToken":{"type":"string"},"extraHeaders":{"type":"object","additionalProperties":{"type":"string"}}},"required":["type","workspaceId","url","name"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Integration"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"426":{"description":"Upgrade Required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Upgrade Required"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/integrations/mcp/validate":{"post":{"operationId":"integrations.mcp.validate","tags":["Integrations"],"summary":"Validate an MCP server connection without persisting it","requestBody":{"required":true,"description":"MCP server credentials to validate","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"url":{"type":"string","format":"uri"},"transport":{"type":"string","enum":["http","sse"],"default":"http"},"bearerToken":{"type":"string"},"extraHeaders":{"type":"object","additionalProperties":{"type":"string"}}},"required":["workspaceId","url"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"serverInfo":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"},"protocolVersion":{"type":"string"}}},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"inputSchema":{"type":"object","additionalProperties":{"nullable":true}}},"required":["name"]}}},"required":["serverInfo","tools"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/integrations/mcp/refresh-tools":{"post":{"operationId":"integrations.mcp.refreshTools","tags":["Integrations"],"summary":"Re-fetch the tool list from a connected MCP server","requestBody":{"required":true,"description":"MCP integration to refresh","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"id":{"type":"string"}},"required":["workspaceId","id"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Integration"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"426":{"description":"Upgrade Required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Upgrade Required"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/integrations/mcp/oauth/start":{"post":{"operationId":"integrations.mcp.oauthStart","tags":["Integrations"],"summary":"Begin OAuth authorization for an MCP server","requestBody":{"required":true,"description":"MCP server to begin OAuth authorization with","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"integrationId":{"type":"string","pattern":"^int_[0-9a-z]{24}$","description":"Renew this connected OAuth MCP server with its saved URL, transport, scope and headers; the other fields are ignored","example":"int_34gky74ibc92h8t2efn8csrh"},"url":{"type":"string","format":"uri"},"name":{"type":"string","minLength":1,"maxLength":64},"transport":{"type":"string","enum":["http","sse"],"default":"http"},"scope":{"type":"string"},"extraHeaders":{"type":"object","additionalProperties":{"type":"string"}}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"pendingId":{"type":"string"},"authorizeUrl":{"type":"string"}},"required":["pendingId","authorizeUrl"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"426":{"description":"Upgrade Required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Upgrade Required"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/integrations/mcp/oauth/callback":{"get":{"operationId":"integrations.mcp.oauthCallback","tags":["Integrations"],"summary":"OAuth callback for MCP server authorization","parameters":[{"schema":{"type":"string"},"required":false,"name":"code","in":"query"},{"schema":{"type":"string"},"required":true,"name":"state","in":"query"},{"schema":{"type":"string"},"required":false,"name":"error","in":"query"},{"schema":{"type":"string"},"required":false,"name":"error_description","in":"query"}],"responses":{"200":{"description":"HTML redirect or error page","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/v1/integrations/sentry/generate":{"post":{"operationId":"integrations.sentry.generate","tags":["Integrations"],"summary":"Generate Sentry integration install URL","requestBody":{"required":true,"description":"Workspace to connect Sentry to","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"url":{"type":"string"},"state":{"type":"string"}},"required":["url","state"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/integrations/{workspaceId}/{id}/checks/posthog_budget":{"get":{"operationId":"integrations.posthog_budget.get","tags":["Integrations"],"summary":"Read the persisted request budget for a visible PostHog integration","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^int_[0-9a-z]{24}$","description":"ID of the integration","example":"int_34gky74ibc92h8t2efn8csrh"},"required":true,"description":"ID of the integration","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"snapshot":{"type":"object","nullable":true,"additionalProperties":{"type":"object","properties":{"remaining":{"type":"number"},"limit":{"type":"number"},"windowMs":{"type":"number"},"resetAtMs":{"type":"number"}},"required":["remaining","limit","windowMs","resetAtMs"],"additionalProperties":false}}},"required":["snapshot"],"additionalProperties":false}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/integrations/connect":{"post":{"operationId":"integrations.connect","tags":["Integrations"],"summary":"Connect an integration","requestBody":{"required":true,"description":"The integration to connect","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["datadog"]},"workspaceId":{"type":"string"},"site":{"type":"string"},"apiKey":{"type":"string"},"appKey":{"type":"string"}},"required":["type","workspaceId","site","apiKey","appKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["honeycomb"]},"workspaceId":{"type":"string"},"region":{"type":"string","enum":["us","eu"]},"apiKey":{"type":"string"},"managementApiKeyId":{"type":"string"},"managementApiKeySecret":{"type":"string"}},"required":["type","workspaceId","region","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["axiom"]},"workspaceId":{"type":"string"},"region":{"type":"string","enum":["us-east-1","eu-central-1"],"description":"Axiom edge deployment region. When omitted, it is detected from the API token via the Axiom API."},"apiToken":{"type":"string"}},"required":["type","workspaceId","apiToken"]},{"type":"object","properties":{"type":{"type":"string","enum":["betterstack"]},"workspaceId":{"type":"string"},"apiToken":{"type":"string","minLength":1},"teamName":{"type":"string","minLength":1},"uptimeApiToken":{"type":"string","minLength":1},"telemetryApiToken":{"type":"string","minLength":1},"queryUsername":{"type":"string"},"queryPassword":{"type":"string"}},"required":["type","workspaceId","apiToken","teamName"]},{"type":"object","properties":{"type":{"type":"string","enum":["openstatus"]},"workspaceId":{"type":"string"},"apiKey":{"type":"string","minLength":1}},"required":["type","workspaceId","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["depot"]},"workspaceId":{"type":"string"},"apiToken":{"type":"string","minLength":1,"description":"Depot organization token"}},"required":["type","workspaceId","apiToken"]},{"type":"object","properties":{"type":{"type":"string","enum":["incident_io"]},"workspaceId":{"type":"string"},"apiKey":{"type":"string","minLength":1,"description":"incident.io API key"},"escalationSeverity":{"type":"string","enum":["critical","high","medium","low"],"description":"Lowest escalation severity that alerts in incident.io while the escalation is unresolved; defaults to high"}},"required":["type","workspaceId","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["grafana"]},"workspaceId":{"type":"string"},"stackUrl":{"type":"string","minLength":1,"description":"Grafana stack URL, e.g. https://<stack>.grafana.net"},"serviceAccountToken":{"type":"string","minLength":1,"description":"Grafana service account token (glsa_...)"}},"required":["type","workspaceId","stackUrl","serviceAccountToken"]},{"type":"object","properties":{"type":{"type":"string","enum":["logfire"]},"workspaceId":{"type":"string"},"apiKey":{"type":"string","minLength":1,"description":"Project API key (pylf_..., Key type Project, Read-only access and Manage project and org) for the project to connect"},"organizationApiKey":{"type":"string","minLength":1,"description":"Organization API key (pylf_..., Key type Organization, Read-only access and Manage project and org) for the project's organization"},"region":{"type":"string","enum":["us","eu"],"description":"Logfire data plane region. When omitted, it is read from the project key prefix."}},"required":["type","workspaceId","apiKey","organizationApiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["langsmith"]},"workspaceId":{"type":"string"},"apiKey":{"type":"string","minLength":1,"description":"LangSmith service key (lsv2_sk_...) or personal access token (lsv2_pt_...)"},"langsmithWorkspaceId":{"type":"string","minLength":1,"description":"LangSmith workspace to connect. Required only when the key can read more than one workspace."}},"required":["type","workspaceId","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["braintrust"]},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"apiKey":{"type":"string","minLength":1,"description":"Braintrust service token (bt-st-...) from Settings > Service tokens, in a permission group that can read and update all projects in the organization. Personal API keys (sk-...) are refused."}},"required":["type","workspaceId","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["newrelic"]},"workspaceId":{"type":"string"},"apiKey":{"type":"string","minLength":1,"description":"New Relic User key (NRAK-...)"},"accountId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"New Relic account to connect. Required only when the key can read more than one account."}},"required":["type","workspaceId","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["devin"]},"workspaceId":{"type":"string"},"apiKey":{"type":"string","minLength":1}},"required":["type","workspaceId","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["cursor"]},"workspaceId":{"type":"string"},"apiKey":{"type":"string","minLength":1}},"required":["type","workspaceId","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["circleci"]},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"apiKey":{"type":"string","minLength":1,"maxLength":4096},"organizationId":{"type":"string","minLength":1,"maxLength":256,"description":"The CircleCI organization to connect. Required when the token reaches more than one organization."}},"required":["type","workspaceId","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["factory"]},"workspaceId":{"type":"string"},"apiKey":{"type":"string","minLength":1}},"required":["type","workspaceId","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["conductor"]},"workspaceId":{"type":"string"},"apiKey":{"type":"string","minLength":1}},"required":["type","workspaceId","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["capy"]},"workspaceId":{"type":"string"},"apiKey":{"type":"string","minLength":1}},"required":["type","workspaceId","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["amp"]},"workspaceId":{"type":"string"},"apiKey":{"type":"string","minLength":1}},"required":["type","workspaceId","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["mixpanel"]},"workspaceId":{"type":"string"},"region":{"type":"string","enum":["us","eu","in"]},"serviceAccountUsername":{"type":"string","minLength":1},"serviceAccountSecret":{"type":"string","minLength":1},"projectId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["type","workspaceId","region","serviceAccountUsername","serviceAccountSecret","projectId"]},{"type":"object","properties":{"type":{"type":"string","enum":["amplitude"]},"workspaceId":{"type":"string"},"apiKey":{"type":"string","minLength":1},"secretKey":{"type":"string","minLength":1}},"required":["type","workspaceId","apiKey","secretKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["linear"]},"workspaceId":{"type":"string"},"apiKey":{"type":"string","minLength":1}},"required":["type","workspaceId","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["coding_agent"]},"workspaceId":{"type":"string"},"machineIdentifiers":{"type":"object","properties":{"machineId":{"type":"string","maxLength":128},"hostname":{"type":"string","maxLength":255},"osUser":{"type":"string","maxLength":128}}},"repoRemotes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":512},"maxItems":64,"default":[]},"clientName":{"type":"string","minLength":1,"maxLength":64},"clientVersion":{"type":"string","minLength":1,"maxLength":32}},"required":["type","workspaceId","machineIdentifiers"]}]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Integration"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"422":{"description":"Unprocessable content","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unprocessable content"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/integrations/rotate-credentials":{"post":{"operationId":"integrations.rotate_credentials","tags":["Integrations"],"summary":"Rotate the API key or token for an integration","requestBody":{"required":true,"description":"The new credentials or configuration for the integration","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"id":{"type":"string","pattern":"^int_[0-9a-z]{24}$","description":"ID of the integration","example":"int_34gky74ibc92h8t2efn8csrh"},"apiKey":{"type":"string","description":"New API key (for Datadog, Honeycomb, OpenStatus, Linear, CircleCI, LangSmith, New Relic, incident.io, Devin, Cursor, Factory, Conductor, Capy, Amp, or the Logfire project key), or the new service token (for Braintrust)"},"organizationApiKey":{"type":"string","description":"New organization API key (for Logfire)"},"managementApiKeyId":{"type":"string","description":"New Management API key ID (for Honeycomb)"},"managementApiKeySecret":{"type":"string","description":"New Management API key secret (for Honeycomb)"},"clearManagementApiKey":{"type":"boolean","description":"Remove the stored Management API key (for Honeycomb)"},"appKey":{"type":"string","description":"New application key (for Datadog)"},"apiToken":{"type":"string","description":"New API token (for Axiom, Better Stack, or the Depot organization token)"},"uptimeApiToken":{"type":"string","description":"New Uptime API token (for Better Stack)"},"telemetryApiToken":{"type":"string","description":"New Telemetry API token (for Better Stack)"},"queryUsername":{"type":"string","description":"New SQL API username (for Better Stack)"},"queryPassword":{"type":"string","description":"New SQL API password (for Better Stack)"},"clearQueryCredentials":{"type":"boolean","description":"Remove the stored SQL API connection (for Better Stack)"},"serviceAccountUsername":{"type":"string","description":"New service account username (for Mixpanel)"},"serviceAccountSecret":{"type":"string","description":"New service account secret (for Mixpanel)"},"secretKey":{"type":"string","description":"New secret key (for Amplitude)"},"serviceAccountToken":{"type":"string","description":"New service account token (for Grafana)"},"bearerToken":{"type":"string","nullable":true,"description":"New bearer token (for MCP); null to clear"},"extraHeaders":{"type":"object","nullable":true,"additionalProperties":{"type":"string"},"description":"Replacement extra headers (for MCP); null to clear"},"enabledTools":{"type":"array","items":{"type":"string"},"description":"Tool allow-list (for MCP); empty to expose all"}},"required":["workspaceId","id"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Integration"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"422":{"description":"Unprocessable content","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unprocessable content"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/integrations/validate-credentials":{"post":{"operationId":"integrations.validate_credentials","tags":["Integrations"],"summary":"Validate the saved credentials for an integration","requestBody":{"required":true,"description":"The integration whose saved credentials to validate","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"id":{"type":"string","pattern":"^int_[0-9a-z]{24}$","description":"ID of the integration","example":"int_34gky74ibc92h8t2efn8csrh"}},"required":["workspaceId","id"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"valid":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}},"required":["valid"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/integrations/{workspaceId}/{id}":{"delete":{"operationId":"integrations.delete","tags":["Integrations"],"summary":"Delete an integration","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^int_[0-9a-z]{24}$","description":"ID of the integration","example":"int_34gky74ibc92h8t2efn8csrh"},"required":true,"description":"ID of the integration","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^int_[0-9a-z]{24}$","description":"ID of the integration","example":"int_34gky74ibc92h8t2efn8csrh"},"_object":{"type":"string","enum":["integration"]}},"required":["id","_object"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"get":{"operationId":"integrations.get","tags":["Integrations"],"summary":"Get a configured integration","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^int_[0-9a-z]{24}$","description":"ID of the integration","example":"int_34gky74ibc92h8t2efn8csrh"},"required":true,"description":"ID of the integration","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Integration"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"put":{"operationId":"integrations.put","tags":["Integrations"],"summary":"Update a configured integration","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^int_[0-9a-z]{24}$","description":"ID of the integration","example":"int_34gky74ibc92h8t2efn8csrh"},"required":true,"description":"ID of the integration","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The integration properties to update","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":4,"maxLength":256,"description":"Name of the integration"},"disabled":{"type":"boolean","nullable":true},"ownerId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"visibility":{"type":"string","enum":["public","private","unlisted","workspace","workspace_and_guests","workspace_and_github_org","private_and_guests","team","team_and_guests","custom","internal"],"description":"Visibility level"},"guests":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Guest email addresses"},"labels":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Integration labels"},"changeDescription":{"type":"string","nullable":true,"description":"Description of the change"}},"required":["name","disabled","ownerId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Integration"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"integrations.patch","tags":["Integrations"],"summary":"Update the fields of a configured integration","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^int_[0-9a-z]{24}$","description":"ID of the integration","example":"int_34gky74ibc92h8t2efn8csrh"},"required":true,"description":"ID of the integration","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The integration properties to update","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":4,"maxLength":256,"description":"Name of the integration"},"disabled":{"type":"boolean","nullable":true},"ownerId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"visibility":{"type":"string","enum":["public","private","unlisted","workspace","workspace_and_guests","workspace_and_github_org","private_and_guests","team","team_and_guests","custom","internal"],"description":"Visibility level"},"guests":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Guest email addresses"},"labels":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Integration labels"},"changeDescription":{"type":"string","nullable":true,"description":"Description of the change"},"notificationsEnabled":{"type":"boolean","description":"Slack only: enable or disable Polylane notifications to this workspace's notifications channel"},"mcpInjectionEnabled":{"type":"boolean","description":"Cursor only: enable or disable adding Polylane's MCP server to Cursor cloud agent launches"},"anomalyChecksDisabled":{"type":"string","nullable":true,"format":"date-time","description":"Timestamp to disable anomaly checks, or null to enable. Omit to leave unchanged. Independent of `disabled`."},"anomalyCheckIntervalMinutes":{"type":"number","nullable":true,"description":"How often anomaly checks run for this integration, in minutes. Null resets to the default interval. Omit to leave unchanged."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Integration"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/integrations/{workspaceId}":{"get":{"operationId":"integrations.list","tags":["Integrations"],"summary":"List configured integrations","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","enum":["id","name","installationId","externalId","createdBy","ownerId","visibility","guests","lastEditedBy","type","created","disabled","updated","initialised","lastFailureAt","anomalyChecksDisabled","anomalyCheckIntervalMinutes"],"default":"created"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"name","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"installationId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"externalId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"createdBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"ownerId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"visibility","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"guests","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"lastEditedBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"type","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"disabled","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"initialised","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"lastFailureAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"anomalyChecksDisabled","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"anomalyCheckIntervalMinutes","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"labels","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Integration"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/{workspaceId}/stats":{"get":{"operationId":"cloud_infra.stats","tags":["Cloud Infrastructure"],"summary":"Get stats about the cloud infra","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","x-shared-enum":"cloudProvider"},"required":false,"description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","name":"provider","in":"query"},{"schema":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud account the node is part of"},"required":false,"description":"The cloud account the node is part of","name":"account","in":"query"},{"schema":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud region the node is part of"},"required":false,"description":"The cloud region the node is part of","name":"region","in":"query"},{"schema":{"type":"string","description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","x-shared-enum":"nodeType"},"required":false,"description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","name":"type","in":"query"},{"schema":{"type":"array","items":{"type":"string","enum":["provider","account","region","type","created_by","last_edited_by","id","tier","category"]},"description":"Fields to group node counts by; repeat the parameter to group by multiple fields. Without it the response is the flat node and edge totals."},"required":false,"description":"Fields to group node counts by; repeat the parameter to group by multiple fields. Without it the response is the flat node and edge totals.","name":"groupBy","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"anyOf":[{"type":"object","properties":{"nodes":{"type":"number"},"edges":{"type":"number"}},"required":["nodes","edges"],"additionalProperties":false},{"type":"array","items":{"$ref":"#/components/schemas/Grouped Infrastructure Statistics"}}]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/{workspaceId}/advisories":{"get":{"operationId":"cloud_infra.advisories","tags":["Cloud Infrastructure"],"summary":"Best-practice advisories aggregated across every resource in the workspace, with monitoring coverage counts","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["resource","repository"],"description":"What the group's targets are: cloud resources or code repositories"},"category":{"type":"string","enum":["observability","resilience","security","data-protection","lifecycle"]},"severity":{"type":"string","enum":["warning","info"]},"fixability":{"type":"string","enum":["in-place","guidance"]},"title":{"type":"string"},"message":{"type":"string","description":"Representative explanation of the rule, from the first affected resource's advisory"},"count":{"type":"number"},"resources":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"account":{"type":"string"},"region":{"type":"string"},"type":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"severity":{"type":"string","enum":["warning","info"]}},"required":["provider","account","region","type","id","name","title","severity"]}},"repositories":{"type":"array","items":{"type":"object","properties":{"repositoryId":{"type":"string"},"owner":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"url":{"type":"string","nullable":true}},"required":["repositoryId","owner","name","provider","url"]}}},"required":["id","kind","category","severity","fixability","title","message","count","resources"]}},"coverage":{"type":"object","properties":{"totalNodes":{"type":"number"},"monitorableNodes":{"type":"number"},"monitoredNodes":{"type":"number"},"minimalNodes":{"type":"number"},"observabilityGapNodes":{"type":"number"}},"required":["totalNodes","monitorableNodes","monitoredNodes","minimalNodes","observabilityGapNodes"]},"dismissed":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"title":{"type":"string"},"category":{"type":"string","enum":["observability","resilience","security","data-protection","lifecycle"]},"severity":{"type":"string","enum":["warning","info"]},"resource":{"type":"object","properties":{"provider":{"type":"string"},"account":{"type":"string"},"region":{"type":"string"},"type":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"severity":{"type":"string","enum":["warning","info"]}},"required":["provider","account","region","type","id","name","title","severity"]},"dismissedAtMs":{"type":"number"},"dismissedBy":{"type":"string"}},"required":["ruleId","title","category","severity","resource","dismissedAtMs","dismissedBy"]},"description":"Advisories the user chose to ignore, shown collapsed with a restore action"}},"required":["groups","coverage","dismissed"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/nodes/alternate_names":{"post":{"operationId":"cloud_infra.nodes.update_alternate_names","tags":["Cloud Infrastructure"],"summary":"Set the alternate names for a cloud infrastructure node","requestBody":{"required":true,"description":"Set the alternate names for a node","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"id":{"type":"string","description":"The ID of the node in the cloud account"},"provider":{"type":"string","description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","x-shared-enum":"cloudProvider"},"account":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud account the node is part of"},"region":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud region the node is part of"},"type":{"type":"string","description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","x-shared-enum":"nodeType"},"alternateNames":{"type":"array","items":{"type":"string"},"description":"The complete list of alternate names for this node"}},"required":["workspaceId","id","provider","account","region","type","alternateNames"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Infrastructure Node"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/nodes/list":{"post":{"operationId":"cloud_infra.nodes.list","tags":["Cloud Infrastructure"],"summary":"List cloud infrastructure nodes","requestBody":{"required":true,"description":"The list query","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"clauses":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"predicate":{"type":"string","enum":["=","!=",">","<","<=",">=","LIKE"],"default":"="},"joiner":{"type":"string","enum":["AND","OR"],"default":"AND"},"tree":{"type":"boolean","description":"Flag to signal a deep tree search on the JSON object"}},"required":["field","value"],"additionalProperties":false}},"filters":{"type":"object","properties":{"ids":{"type":"array","items":{"$ref":"#/components/schemas/Infrastructure Node Composite ID"},"description":"The IDs of the nodes in the cloud account. If present, only this filter is applied"},"provider":{"type":"string","description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","x-shared-enum":"cloudProvider"},"account":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud account the node is part of"},"region":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud region the node is part of"},"type":{"type":"string","description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","x-shared-enum":"nodeType"},"category":{"type":"string","enum":["compute","storage","database","networking","messaging","security","observability","code","identity","configuration","environment","external","other"],"description":"Broad functional category; matches every resource type in that category"},"environment":{"type":"string","enum":["production","preview","staging","development","ephemeral"],"description":"Deployment environment the sync stamped on the node; a node without one counts as production"}},"additionalProperties":false},"options":{"type":"object","properties":{"tree":{"type":"boolean","description":"Flag to signal a deep tree search on the JSON object"},"key":{"type":"string","description":"Key of the root field to do the deep JSON search on, if tree is true"},"limit":{"type":"integer","minimum":1,"maximum":200,"description":"Page size, at most 200; the server applies the maximum when omitted"},"offset":{"type":"number"},"orderBy":{"type":"string","enum":["provider","account","region","type","id","created_by","last_edited_by","created","updated","tier","tier_source","tier_updated_at"],"description":"Column to order results by"},"orderDirection":{"type":"string","enum":["ASC","DESC"],"description":"Sort direction"}},"additionalProperties":false}},"required":["workspaceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Infrastructure Node"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Service Unavailable"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/nodes/get":{"post":{"operationId":"cloud_infra.nodes.get","tags":["Cloud Infrastructure"],"summary":"Get a cloud infrastructure node","requestBody":{"required":true,"description":"The infra node","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"id":{"type":"string","description":"The ID of the node in the cloud account"},"provider":{"type":"string","description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","x-shared-enum":"cloudProvider"},"account":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud account the node is part of"},"region":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud region the node is part of"},"type":{"type":"string","description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","x-shared-enum":"nodeType"}},"required":["workspaceId","id","provider","account","region","type"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"allOf":[{"$ref":"#/components/schemas/Infrastructure Node"},{"type":"object","properties":{"factSheet":{"type":"string","description":"Markdown rendered from the graph: identity, configuration, and connected resources"},"monitoring":{"type":"object","properties":{"disabledAt":{"type":"string","nullable":true,"description":"When anomaly monitoring was disabled for this resource, or null if enabled"},"tier":{"type":"number","description":"Effective monitoring tier (1-4) for this resource"},"tierSource":{"type":"string","enum":["agent","manual"],"description":"Whether the tier was assigned automatically or set manually"},"tierUpdatedAt":{"type":"string","nullable":true,"description":"When the tier was last updated"},"tierInputs":{"type":"object","nullable":true,"properties":{"collectedAt":{"type":"number"},"subgraphNodeCount":{"type":"number","nullable":true},"neighbourCount":{"type":"number","nullable":true},"metrics":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"unit":{"type":"string","nullable":true},"avg":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"last":{"type":"number"}},"required":["label","unit","avg","min","max","last"]}},"cohortSummary":{"type":"string","nullable":true}},"required":["collectedAt","subgraphNodeCount","neighbourCount","metrics"],"description":"The data used by the automatic classification"},"anomalySupported":{"type":"boolean","description":"Whether this resource type is eligible for anomaly detection (has metrics, logs, traces, or invocations)"},"lastRunAt":{"type":"number","nullable":true,"description":"When the last anomaly check ran for this resource (epoch ms), or null if none has run yet"},"intervalMinutes":{"type":"number","description":"How often this resource is checked for anomalies, derived from its tier"}},"required":["disabledAt","tier","tierSource","tierUpdatedAt","tierInputs","anomalySupported","lastRunAt","intervalMinutes"]},"capabilities":{"type":"object","properties":{"alternateNames":{"type":"boolean","description":"Whether alternate names apply to this node type"},"issues":{"type":"boolean","description":"Whether issues can be associated with this node type"},"tier":{"type":"boolean","description":"Whether the resource tier applies to this node type"}},"required":["alternateNames","issues","tier"],"description":"Which per-resource features apply to this node type; context-only nodes such as repositories support none of them"},"advisories":{"type":"array","items":{"$ref":"#/components/schemas/ResourceAdvisory"},"description":"Best-practice advisories derived from this resource's configuration"}},"required":["factSheet","monitoring","capabilities","advisories"],"additionalProperties":false}]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/nodes":{"post":{"operationId":"cloud_infra.nodes.post","tags":["Cloud Infrastructure"],"summary":"Create a new infra node","requestBody":{"required":true,"description":"The infra node to create","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"data":{"type":"object","additionalProperties":{"nullable":true}},"id":{"type":"string","description":"The ID of the node in the cloud account"},"provider":{"type":"string","description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","x-shared-enum":"cloudProvider"},"account":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud account the node is part of"},"region":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud region the node is part of"},"type":{"type":"string","description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","x-shared-enum":"nodeType"}},"required":["workspaceId","data","id","provider","account","region","type"],"additionalProperties":false}}}},"responses":{"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Infrastructure Node"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"put":{"operationId":"cloud_infra.nodes.put","tags":["Cloud Infrastructure"],"summary":"Update a cloud infra node","requestBody":{"required":true,"description":"The infra node properties to update","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":{"nullable":true}},"workspaceId":{"type":"string"},"id":{"type":"string","description":"The ID of the node in the cloud account"},"provider":{"type":"string","description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","x-shared-enum":"cloudProvider"},"account":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud account the node is part of"},"region":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud region the node is part of"},"type":{"type":"string","description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","x-shared-enum":"nodeType"}},"required":["data","workspaceId","id","provider","account","region","type"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Infrastructure Node"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"cloud_infra.nodes.patch","tags":["Cloud Infrastructure"],"summary":"Update the fields of a cloud infra node","requestBody":{"required":true,"description":"The infra node properties to update","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":{"nullable":true}},"workspaceId":{"type":"string"},"id":{"type":"string","description":"The ID of the node in the cloud account"},"provider":{"type":"string","description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","x-shared-enum":"cloudProvider"},"account":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud account the node is part of"},"region":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud region the node is part of"},"type":{"type":"string","description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","x-shared-enum":"nodeType"}},"required":["data","workspaceId","id","provider","account","region","type"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Infrastructure Node"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"cloud_infra.nodes.del","tags":["Cloud Infrastructure"],"summary":"Delete a cloud infra node","requestBody":{"required":true,"description":"The infra node","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"id":{"type":"string","description":"The ID of the node in the cloud account"},"provider":{"type":"string","description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","x-shared-enum":"cloudProvider"},"account":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud account the node is part of"},"region":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud region the node is part of"},"type":{"type":"string","description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","x-shared-enum":"nodeType"}},"required":["workspaceId","id","provider","account","region","type"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the node in the cloud account"},"provider":{"type":"string","description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","x-shared-enum":"cloudProvider"},"account":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud account the node is part of"},"region":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud region the node is part of"},"type":{"type":"string","description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","x-shared-enum":"nodeType"},"_object":{"type":"string","enum":["infra_node"]}},"required":["id","provider","account","region","type","_object"],"additionalProperties":false}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/nodes/edges":{"post":{"operationId":"cloud_infra.nodes.list_edges","tags":["Cloud Infrastructure"],"summary":"List the edges of a cloud infrastructure node","requestBody":{"required":true,"description":"Parameters for getting node edges","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get Node Edges Parameters"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"array","items":{"$ref":"#/components/schemas/Infrastructure Edge"}}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Service Unavailable"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/edges/list":{"post":{"operationId":"cloud_infra.edges.list","tags":["Cloud Infrastructure"],"summary":"List cloud infrastructure edges","requestBody":{"required":true,"description":"The edges list query","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/Infrastructure Node Composite ID"}},"after":{"type":"object","properties":{"source":{"type":"string","description":"Cursor key from a previous response: the edge source composite id"},"target":{"type":"string","description":"Cursor key from a previous response: the edge target composite id"},"relationship":{"type":"string","description":"Cursor key from a previous response: the edge relationship"}},"required":["source","target","relationship"],"additionalProperties":false,"description":"Resume the edge list after the cursor a previous response returned as nextCursor"}},"required":["workspaceId","nodes"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Infrastructure Edge"}},"count":{"type":"number","minimum":0,"description":"Number of items available"},"nextCursor":{"type":"object","nullable":true,"properties":{"source":{"type":"string","description":"Cursor key from a previous response: the edge source composite id"},"target":{"type":"string","description":"Cursor key from a previous response: the edge target composite id"},"relationship":{"type":"string","description":"Cursor key from a previous response: the edge relationship"}},"required":["source","target","relationship"],"additionalProperties":false}},"required":["items","count","nextCursor"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/nodes/neighbours":{"post":{"operationId":"cloud_infra.nodes.list_neighbours","tags":["Cloud Infrastructure"],"summary":"List neighbours of a cloud infrastructure node","requestBody":{"required":true,"description":"The list neighbours query","content":{"application/json":{"schema":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/Infrastructure Node Composite ID"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"neighborsFn":{"type":"string","enum":["inbound","outbound","both"]},"filters":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the node in the cloud account"},"provider":{"type":"string","description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","x-shared-enum":"cloudProvider"},"account":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud account the node is part of"},"region":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud region the node is part of"},"type":{"type":"string","description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","x-shared-enum":"nodeType"}},"additionalProperties":false}},"required":["params","workspaceId","neighborsFn","filters"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Infrastructure Node Composite ID"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/nodes/count":{"post":{"operationId":"cloud_infra.nodes.count","tags":["Cloud Infrastructure"],"summary":"Count cloud infrastructure nodes","requestBody":{"required":true,"description":"The list query","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"clauses":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"predicate":{"type":"string","enum":["=","!=",">","<","<=",">=","LIKE"],"default":"="},"joiner":{"type":"string","enum":["AND","OR"],"default":"AND"},"tree":{"type":"boolean","description":"Flag to signal a deep tree search on the JSON object"}},"required":["field","value"],"additionalProperties":false}},"filters":{"type":"object","properties":{"ids":{"type":"array","items":{"$ref":"#/components/schemas/Infrastructure Node Composite ID"},"description":"The IDs of the nodes in the cloud account. If present, only this filter is applied"},"provider":{"type":"string","description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","x-shared-enum":"cloudProvider"},"account":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud account the node is part of"},"region":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud region the node is part of"},"type":{"type":"string","description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","x-shared-enum":"nodeType"},"category":{"type":"string","enum":["compute","storage","database","networking","messaging","security","observability","code","identity","configuration","environment","external","other"],"description":"Broad functional category; matches every resource type in that category"},"environment":{"type":"string","enum":["production","preview","staging","development","ephemeral"],"description":"Deployment environment the sync stamped on the node; a node without one counts as production"}},"additionalProperties":false},"options":{"type":"object","properties":{"tree":{"type":"boolean","description":"Flag to signal a deep tree search on the JSON object"},"key":{"type":"string","description":"Key of the root field to do the deep JSON search on, if tree is true"},"limit":{"type":"integer","minimum":1,"maximum":200,"description":"Page size, at most 200; the server applies the maximum when omitted"},"offset":{"type":"number"},"orderBy":{"type":"string","enum":["provider","account","region","type","id","created_by","last_edited_by","created","updated","tier","tier_source","tier_updated_at"],"description":"Column to order results by"},"orderDirection":{"type":"string","enum":["ASC","DESC"],"description":"Sort direction"}},"additionalProperties":false}},"required":["workspaceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"count":{"type":"number"}},"required":["count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/nodes/traverse":{"post":{"operationId":"cloud_infra.nodes.traverse","tags":["Cloud Infrastructure"],"summary":"Traverse the architecture starting from a cloud infrastructure node","requestBody":{"required":true,"description":"The traverse query","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"start":{"$ref":"#/components/schemas/Infrastructure Node Composite ID"},"neighborsFn":{"type":"string","enum":["inbound","outbound","both"]},"maxDepth":{"type":"number","minimum":0},"end":{"$ref":"#/components/schemas/Infrastructure Node Composite ID"}},"required":["workspaceId","start"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"array","items":{"$ref":"#/components/schemas/Infrastructure Node Composite ID"}}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/nodes/blast_radius":{"post":{"operationId":"cloud_infra.nodes.blast_radius","tags":["Cloud Infrastructure"],"summary":"Compute the deterministic blast radius of a fault at one or more cloud infrastructure nodes","requestBody":{"required":true,"description":"The faulted nodes the radius propagates from","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/Infrastructure Node Composite ID"},"minItems":1,"description":"The faulted nodes the radius propagates from"}},"required":["workspaceId","nodes"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Infrastructure Blast Radius"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/edges":{"post":{"operationId":"cloud_infra.edges.post","tags":["Cloud Infrastructure"],"summary":"Create a new infra edge","requestBody":{"required":true,"description":"The infra edge to create","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"source":{"$ref":"#/components/schemas/Infrastructure Node Composite ID"},"target":{"$ref":"#/components/schemas/Infrastructure Node Composite ID"},"relationship":{"type":"string","enum":["connects_to","publishes_to","contains","is_tailed","uses","defines","encrypts","serves","invokes","triggers","assumes","impersonates","accesses","manages","runs_on","controls","deploys_to","owns","monitors","allows_traffic_from"]},"properties":{"type":"object","additionalProperties":{"nullable":true}}},"required":["workspaceId","source","target","relationship","properties"],"additionalProperties":false}}}},"responses":{"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Infrastructure Edge"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/edges/{workspaceId}":{"delete":{"operationId":"cloud_infra.edges.del","tags":["Cloud Infrastructure"],"summary":"Delete a cloud infra edge","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$"},"required":true,"name":"source","in":"query"},{"schema":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$"},"required":true,"name":"target","in":"query"},{"schema":{"type":"string","enum":["connects_to","publishes_to","contains","is_tailed","uses","defines","encrypts","serves","invokes","triggers","assumes","impersonates","accesses","manages","runs_on","controls","deploys_to","owns","monitors","allows_traffic_from"]},"required":true,"name":"relationship","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"source":{"$ref":"#/components/schemas/Infrastructure Node Composite ID"},"target":{"$ref":"#/components/schemas/Infrastructure Node Composite ID"},"relationship":{"type":"string"},"_object":{"type":"string","enum":["infra_edge"]}},"required":["source","target","relationship","_object"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"get":{"operationId":"cloud_infra.edges.get","tags":["Cloud Infrastructure"],"summary":"Get a cloud infra edge","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$"},"required":true,"name":"source","in":"query"},{"schema":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$"},"required":true,"name":"target","in":"query"},{"schema":{"type":"string","enum":["connects_to","publishes_to","contains","is_tailed","uses","defines","encrypts","serves","invokes","triggers","assumes","impersonates","accesses","manages","runs_on","controls","deploys_to","owns","monitors","allows_traffic_from"]},"required":true,"name":"relationship","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Infrastructure Edge"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/nodes/{workspaceId}":{"put":{"operationId":"cloud_infra.edges.put","tags":["Cloud Infrastructure"],"summary":"Update a cloud infra edge","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$"},"required":true,"name":"source","in":"query"},{"schema":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$"},"required":true,"name":"target","in":"query"},{"schema":{"type":"string","enum":["connects_to","publishes_to","contains","is_tailed","uses","defines","encrypts","serves","invokes","triggers","assumes","impersonates","accesses","manages","runs_on","controls","deploys_to","owns","monitors","allows_traffic_from"]},"required":true,"name":"relationship","in":"query"}],"requestBody":{"required":true,"description":"The infra edge properties to update","content":{"application/json":{"schema":{"type":"object","properties":{"properties":{"type":"object","additionalProperties":{"nullable":true}}},"required":["properties"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Infrastructure Edge"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/nodes/metrics":{"post":{"operationId":"cloud_infra.nodes.metrics","tags":["Cloud Infrastructure"],"summary":"Get the metric time series of a cloud infrastructure node","parameters":[{"schema":{"type":"string"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string"},"required":true,"name":"to","in":"query"}],"requestBody":{"required":true,"description":"The infra node","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"id":{"type":"string","description":"The ID of the node in the cloud account"},"provider":{"type":"string","description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","x-shared-enum":"cloudProvider"},"account":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud account the node is part of"},"region":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud region the node is part of"},"type":{"type":"string","description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","x-shared-enum":"nodeType"}},"required":["workspaceId","id","provider","account","region","type"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"unit":{"type":"string"},"stack":{"type":"string"},"render":{"type":"string","enum":["line","table"]},"metrics":{"type":"object","properties":{"calculations":{"type":"array","items":{"$ref":"#/components/schemas/Calculation"}}},"required":["calculations"]},"rateLimited":{"type":"boolean","description":"The provider rate limited this read; empty or partial series mean unavailable data, not zero."},"degraded":{"type":"boolean","description":"A read behind this group failed; empty or partial series mean unavailable data, not zero."}},"required":["id","label","description","metrics"],"additionalProperties":false}}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/nodes/logs":{"post":{"operationId":"cloud_infra.nodes.logs","tags":["Cloud Infrastructure"],"summary":"Get the logs of a cloud infrastructure node","requestBody":{"required":true,"description":"Logs request parameters including node identification and query options","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"id":{"type":"string","description":"The ID of the node in the cloud account"},"provider":{"type":"string","description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","x-shared-enum":"cloudProvider"},"account":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud account the node is part of"},"region":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud region the node is part of"},"type":{"type":"string","description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","x-shared-enum":"nodeType"},"from":{"type":"number","description":"Unix timestamp in seconds"},"to":{"type":"number","description":"Unix timestamp in seconds"},"limit":{"type":"number","description":"Maximum number of log events to return"},"offset":{"type":"string","description":"Pagination token (ID of last log event)"},"filters":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"operation":{"type":"string","enum":["includes","not_includes","starts_with","regex","exists","is_null","in","not_in","eq","neq","gt","gte","lt","lte"]},"type":{"type":"string","enum":["string","number","boolean"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["key","operation","type","value"]},"description":"Array of filters to apply to log events"},"needle":{"type":"object","properties":{"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"isRegex":{"type":"boolean"},"matchCase":{"type":"boolean"}},"required":["value","matchCase"],"description":"Full-text search configuration"}},"required":["workspaceId","id","provider","account","region","type","from","to"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"number"},"event":{"type":"object","additionalProperties":{"nullable":true}}},"required":["timestamp","event"]}},"nextOffset":{"type":"string"}},"required":["events"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/nodes/log_templates":{"post":{"operationId":"cloud_infra.nodes.log_templates","tags":["Cloud Infrastructure"],"summary":"Cross-run log template ledger for a resource: recurring log patterns with their historical rates","requestBody":{"required":true,"description":"The infra node","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"id":{"type":"string","description":"The ID of the node in the cloud account"},"provider":{"type":"string","description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","x-shared-enum":"cloudProvider"},"account":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud account the node is part of"},"region":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud region the node is part of"},"type":{"type":"string","description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","x-shared-enum":"nodeType"}},"required":["workspaceId","id","provider","account","region","type"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/NodeLogTemplates"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/nodes/summary":{"post":{"operationId":"cloud_infra.nodes.metrics.summary","tags":["Cloud Infrastructure"],"summary":"Get a metrics summary of a cloud infrastructure node, compared with the previous window","parameters":[{"schema":{"type":"string"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string"},"required":true,"name":"to","in":"query"}],"requestBody":{"required":true,"description":"The infra node","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"id":{"type":"string","description":"The ID of the node in the cloud account"},"provider":{"type":"string","description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","x-shared-enum":"cloudProvider"},"account":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud account the node is part of"},"region":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud region the node is part of"},"type":{"type":"string","description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","x-shared-enum":"nodeType"}},"required":["workspaceId","id","provider","account","region","type"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"description":{"type":"string"},"current":{"type":"number"},"previous":{"type":"number"},"unit":{"type":"string"},"id":{"type":"string"},"direction":{"type":"string","enum":["positive","negative"]},"rateLimited":{"type":"boolean","description":"The provider rate limited this read; the values mean unavailable data, not zero."}},"required":["label","current","previous","direction"]}}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/nodes/monitoring":{"post":{"operationId":"cloud_infra.nodes.monitoring","tags":["Cloud Infrastructure"],"summary":"Enable or disable anomaly monitoring for a cloud infrastructure node","requestBody":{"required":true,"description":"The infra node and desired monitoring state","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"id":{"type":"string","description":"The ID of the node in the cloud account"},"provider":{"type":"string","description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","x-shared-enum":"cloudProvider"},"account":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud account the node is part of"},"region":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud region the node is part of"},"type":{"type":"string","description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","x-shared-enum":"nodeType"},"disabledAt":{"type":"string","nullable":true,"format":"date-time","description":"Timestamp to disable anomaly monitoring for this resource, or null to enable. Omit to leave unchanged."},"tier":{"type":"number","nullable":true,"description":"Monitoring tier (1-4) to set manually for this resource. Null reverts to automatic classification. Omit to leave unchanged."}},"required":["workspaceId","id","provider","account","region","type"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"disabledAt":{"type":"string","nullable":true},"tier":{"type":"number","description":"Effective monitoring tier (1-4) for this resource"},"tierSource":{"type":"string","enum":["agent","manual"],"description":"Whether the tier was assigned automatically or set manually"}},"required":["disabledAt","tier","tierSource"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_infra/nodes/advisory_dismissal":{"post":{"operationId":"cloud_infra.nodes.advisory_dismissal","tags":["Cloud Infrastructure"],"summary":"Ignore or restore a best-practice advisory for a specific resource, across the home page, the resource panel, and the weekly digest","requestBody":{"required":true,"description":"The infra node, the advisory rule id, and the desired dismissal state","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"id":{"type":"string","description":"The ID of the node in the cloud account"},"provider":{"type":"string","description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","x-shared-enum":"cloudProvider"},"account":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud account the node is part of"},"region":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud region the node is part of"},"type":{"type":"string","description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","x-shared-enum":"nodeType"},"advisoryId":{"type":"string","minLength":1,"description":"The advisory rule id to ignore or restore for this resource"},"dismissed":{"type":"boolean","description":"true ignores this advisory for this resource everywhere it surfaces; false restores it"}},"required":["workspaceId","id","provider","account","region","type","advisoryId","dismissed"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/AdvisoryDismissal"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_accounts/gcp/requests":{"post":{"operationId":"cloud_accounts.gcp.requests.create","tags":["GCP Connections"],"summary":"Prepare a Google Cloud project connection","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGcpConnectionRequest"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/GcpConnectionRequest"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_accounts/gcp/requests/{workspaceId}/{requestId}":{"get":{"operationId":"cloud_accounts.gcp.requests.get","tags":["GCP Connections"],"summary":"Read Google Cloud connection progress","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^gcpconn_[0-9a-z]{24}$","description":"ID of the gcp_connection_request","example":"gcpconn_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the gcp_connection_request","name":"requestId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/GcpConnectionRequest"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"cloud_accounts.gcp.requests.delete","tags":["GCP Connections"],"summary":"Cancel an inactive Google Cloud connection request","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^gcpconn_[0-9a-z]{24}$","description":"ID of the gcp_connection_request","example":"gcpconn_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the gcp_connection_request","name":"requestId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/GcpConnectionRequest"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_accounts/gcp/activate":{"post":{"operationId":"cloud_accounts.gcp.activate","tags":["GCP Connections"],"summary":"Verify and activate a Google Cloud project connection","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateGcpConnection"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"oneOf":[{"type":"object","properties":{"requestId":{"type":"string","pattern":"^gcpconn_[0-9a-z]{24}$","description":"ID of the gcp_connection_request","example":"gcpconn_38mg3o4ibc92h8t2efn8csrh"},"cloudAccountId":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"},"provisioningStatus":{"type":"string","enum":["registered"]}},"required":["requestId","cloudAccountId","provisioningStatus"]},{"type":"object","properties":{"requestId":{"type":"string","pattern":"^gcpconn_[0-9a-z]{24}$","description":"ID of the gcp_connection_request","example":"gcpconn_38mg3o4ibc92h8t2efn8csrh"},"provisioningStatus":{"type":"string","enum":["verifying"]}},"required":["requestId","provisioningStatus"]}]}},"required":["message","success","error","result"]}}}},"202":{"description":"Request accepted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Request accepted"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"oneOf":[{"type":"object","properties":{"requestId":{"type":"string","pattern":"^gcpconn_[0-9a-z]{24}$","description":"ID of the gcp_connection_request","example":"gcpconn_38mg3o4ibc92h8t2efn8csrh"},"cloudAccountId":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"},"provisioningStatus":{"type":"string","enum":["registered"]}},"required":["requestId","cloudAccountId","provisioningStatus"]},{"type":"object","properties":{"requestId":{"type":"string","pattern":"^gcpconn_[0-9a-z]{24}$","description":"ID of the gcp_connection_request","example":"gcpconn_38mg3o4ibc92h8t2efn8csrh"},"provisioningStatus":{"type":"string","enum":["verifying"]}},"required":["requestId","provisioningStatus"]}]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Payment Required"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_accounts/gcp/requests/{workspaceId}/{requestId}/setup":{"get":{"operationId":"cloud_accounts.gcp.requests.setup","tags":["GCP Connections"],"summary":"Get the Infrastructure Manager setup for a Google Cloud connection","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^gcpconn_[0-9a-z]{24}$","description":"ID of the gcp_connection_request","example":"gcpconn_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the gcp_connection_request","name":"requestId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"terraform":{"type":"string"},"commands":{"type":"string"},"consoleUrl":{"type":"string","format":"uri"}},"required":["terraform","commands","consoleUrl"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_accounts/{workspaceId}/{id}/repositories":{"get":{"operationId":"cloud_account_repositories.list","tags":["Cloud Account Repositories"],"summary":"List repositories connected to a cloud account","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"},"required":true,"description":"ID of the cloud_account","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Cloud Account Repository"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_accounts/repositories":{"post":{"operationId":"cloud_account_repositories.post","tags":["Cloud Account Repositories"],"summary":"Create a connection between a cloud account and a repository","requestBody":{"required":true,"description":"The cloud account repository connection to create","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"cloudAccountId":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"},"repositoryId":{"type":"string","pattern":"^repo_[0-9a-z]{24}$","description":"ID of the repository","example":"repo_38mg3o4ibc92h8t2efn8csrh"},"reasoning":{"type":"string","default":"","description":"Why this repository is connected"}},"required":["workspaceId","cloudAccountId","repositoryId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Cloud Account Repository"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_accounts/{workspaceId}/{cloudAccountId}/repositories/{id}":{"patch":{"operationId":"cloud_account_repositories.patch","tags":["Cloud Account Repositories"],"summary":"Update a cloud account repository connection","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud account","example":"acc_34gky74ibc92h8t2efn8csrh"},"required":true,"description":"ID of the cloud account","name":"cloudAccountId","in":"path"},{"schema":{"type":"string","pattern":"^car_[0-9a-z]{24}$","description":"ID of the cloud account repository connection","example":"car_7xk9m2p4qw8n5j3v6h1t0y9r"},"required":true,"description":"ID of the cloud account repository connection","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The cloud account repository properties to update","content":{"application/json":{"schema":{"type":"object","properties":{"reasoning":{"type":"string","description":"Updated reasoning"},"confidence":{"type":"string","enum":["definitive","strong","moderate","weak","speculative"]},"confirmed":{"type":"boolean","description":"Set to true to confirm an auto-discovered connection"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Cloud Account Repository"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"cloud_account_repositories.del","tags":["Cloud Account Repositories"],"summary":"Delete a cloud account repository connection","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud account","example":"acc_34gky74ibc92h8t2efn8csrh"},"required":true,"description":"ID of the cloud account","name":"cloudAccountId","in":"path"},{"schema":{"type":"string","pattern":"^car_[0-9a-z]{24}$","description":"ID of the cloud account repository connection","example":"car_7xk9m2p4qw8n5j3v6h1t0y9r"},"required":true,"description":"ID of the cloud account repository connection","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^car_[0-9a-z]{24}$","description":"ID of the cloud_account_repo","example":"car_7xk9m2p4qw8n5j3v6h1t0y9r"},"_object":{"type":"string","enum":["cloud_account_repo"]}},"required":["id","_object"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_accounts/{workspaceId}/{id}/settings":{"get":{"operationId":"cloud_accounts.settings.get","tags":["Cloud Accounts"],"summary":"Get cloud account settings","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"},"required":true,"description":"ID of the cloud_account","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"settings":{"type":"object","properties":{"anomalyChecks":{"type":"object","properties":{"disabledAt":{"type":"string","nullable":true,"description":"When anomaly checks were disabled, or null if enabled"},"intervalMinutes":{"type":"number","nullable":true,"description":"How often anomaly checks run for this account, in minutes. Null means the default interval."}},"required":["disabledAt","intervalMinutes"]},"previewEnvironments":{"type":"object","properties":{"enabledAt":{"type":"string","nullable":true,"description":"When monitoring of preview/non-production environments was enabled, or null if disabled (the default: production only)."}},"required":["enabledAt"]},"readOnly":{"type":"object","properties":{"enabledAt":{"type":"string","nullable":true,"description":"When this account was set to read-only, or null if writes are allowed. While set, all write calls against the provider API are refused."}},"required":["enabledAt"]},"webhookSecretSet":{"type":"boolean","description":"Whether a webhook signing secret is stored for this account. The secret itself is never returned. Only Trigger.dev accounts accept one through this route."}},"required":["anomalyChecks","previewEnvironments","readOnly","webhookSecretSet"]}},"required":["settings"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"cloud_accounts.settings.patch","tags":["Cloud Accounts"],"summary":"Update cloud account settings","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"},"required":true,"description":"ID of the cloud_account","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"anomalyChecksDisabled":{"type":"string","nullable":true,"format":"date-time","description":"Timestamp to disable anomaly checks, or null to enable. Omit to leave unchanged."},"anomalyCheckIntervalMinutes":{"type":"number","nullable":true,"description":"How often anomaly checks run for this account, in minutes. Null resets to the default interval. Omit to leave unchanged."},"previewEnvironmentsEnabled":{"type":"string","nullable":true,"format":"date-time","description":"Timestamp to enable monitoring of the account's non-production environments (preview, staging, development, ephemeral), or null to monitor production only. Ignored for providers without the toggle: those whose nodes are all production, and those whose account is one environment (Trigger.dev), which is monitored from the moment it is connected. Omit to leave unchanged."},"readOnly":{"type":"string","nullable":true,"format":"date-time","description":"Timestamp to set this account read-only, or null to allow writes. Omit to leave unchanged."},"investigateAlerts":{"type":"string","nullable":true,"format":"date-time","description":"Google Cloud only: timestamp to start investigating this project's Cloud Monitoring alerts, or null to stop. Omit to leave unchanged."},"webhookSecret":{"type":"string","minLength":1,"description":"Trigger.dev only: the signing secret Trigger.dev shows when this environment's webhook alert is created. Each environment's alert has its own secret; it is stored, encrypted, on this account only. Omit to leave unchanged."}}}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"settings":{"type":"object","properties":{"anomalyChecks":{"type":"object","properties":{"disabledAt":{"type":"string","nullable":true,"description":"When anomaly checks were disabled, or null if enabled"},"intervalMinutes":{"type":"number","nullable":true,"description":"How often anomaly checks run for this account, in minutes. Null means the default interval."}},"required":["disabledAt","intervalMinutes"]},"previewEnvironments":{"type":"object","properties":{"enabledAt":{"type":"string","nullable":true,"description":"When monitoring of preview/non-production environments was enabled, or null if disabled (the default: production only)."}},"required":["enabledAt"]},"readOnly":{"type":"object","properties":{"enabledAt":{"type":"string","nullable":true,"description":"When this account was set to read-only, or null if writes are allowed. While set, all write calls against the provider API are refused."}},"required":["enabledAt"]},"webhookSecretSet":{"type":"boolean","description":"Whether a webhook signing secret is stored for this account. The secret itself is never returned. Only Trigger.dev accounts accept one through this route."}},"required":["anomalyChecks","previewEnvironments","readOnly","webhookSecretSet"]}},"required":["settings"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_accounts/tiers/reclassify":{"post":{"operationId":"cloud_accounts.tiers.reclassify","tags":["Cloud Accounts"],"summary":"Re-run automatic priority classification for every resource in a cloud account","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","description":"ID of the workspace"},"id":{"type":"string","description":"ID of the cloud account"}},"required":["workspaceId","id"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"scheduled":{"type":"number","description":"Number of resources scheduled for re-classification"}},"required":["scheduled"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"429":{"description":"Slow down","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Slow down"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_accounts/{workspaceId}":{"get":{"operationId":"cloud_accounts.list","tags":["Cloud Accounts"],"summary":"List cloud accounts","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","enum":["id","alias","account","region","createdBy","ownerId","visibility","guests","lastEditedBy","provider","status","workflowId","lastSync","created","updated","initialised","lastFailureAt","anomalyChecksDisabled","anomalyCheckIntervalMinutes","readOnly","resyncRequestedAt","syncReservedAt","syncPausedAt","syncPauseReason","repositoryDiscoveryCompletedAt"],"default":"created"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"alias","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"account","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"region","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"createdBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"ownerId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"visibility","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"guests","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"lastEditedBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"provider","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"status","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"workflowId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"lastSync","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"initialised","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"lastFailureAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"anomalyChecksDisabled","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"anomalyCheckIntervalMinutes","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"readOnly","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"resyncRequestedAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"syncReservedAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"syncPausedAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"syncPauseReason","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"repositoryDiscoveryCompletedAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"labels","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Cloud Account"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_accounts/{workspaceId}/{id}":{"get":{"operationId":"cloud_accounts.get","tags":["Cloud Accounts"],"summary":"Get a cloud account","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"},"required":true,"description":"ID of the cloud_account","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Cloud Account"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"cloud_accounts.patch","tags":["Cloud Accounts"],"summary":"Update the fields of a cloud account","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"},"required":true,"description":"ID of the cloud_account","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The cloud account properties to update","content":{"application/json":{"schema":{"type":"object","properties":{"alias":{"type":"string","minLength":4,"maxLength":256,"description":"Alias of the cloud account"},"ownerId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"visibility":{"type":"string","enum":["public","private","unlisted","workspace","workspace_and_guests","workspace_and_github_org","private_and_guests","team","team_and_guests","custom","internal"],"description":"Visibility level"},"guests":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Guest email addresses"},"labels":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Cloud account labels"},"regions":{"type":"array","nullable":true,"items":{"type":"string"},"minItems":1,"description":"AWS only: regions to scan on each sync. Null scans every region enabled on the account, resolved at sync time."},"changeDescription":{"type":"string","nullable":true,"description":"Description of the change"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Cloud Account"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"cloud_accounts.disconnect","tags":["Cloud Accounts"],"summary":"Disconnect a cloud account","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"},"required":true,"description":"ID of the cloud_account","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"},"_object":{"type":"string","enum":["cloud_account"]}},"required":["id","_object"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_accounts/{workspaceId}/{provider}/{account}/{region}":{"get":{"operationId":"cloud_accounts.get_by_account_and_region","tags":["Cloud Accounts"],"summary":"Get a cloud account by account and region","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","enum":["aws","vercel","cloudflare","fly","render","planetscale","supabase","turso","neon","gcp","modal","railway","convex","clickhouse","triggerdev","kubernetes","code","oci","external","openstatus","depot","circleci","incident_io","unknown"]},"required":true,"name":"provider","in":"path"},{"schema":{"type":"string"},"required":true,"name":"account","in":"path"},{"schema":{"type":"string"},"required":true,"name":"region","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Cloud Account"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_accounts":{"post":{"operationId":"cloud_accounts.connect","tags":["Cloud Accounts"],"summary":"Connect cloud accounts","requestBody":{"required":true,"description":"The cloud account to connect","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"provider":{"type":"string","enum":["cloudflare"]},"token":{"type":"string","description":"Cloudflare authentication token"},"readOnly":{"type":"boolean","default":false,"description":"Whether the token was created with read-only access"},"createMonitoringAlarms":{"type":"boolean","default":true,"description":"Whether to create default Workers observability alerts for this account"}},"required":["workspaceId","provider","token"],"additionalProperties":false},{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"provider":{"type":"string","enum":["aws"]},"account":{"type":"string","pattern":"^\\d{12}$","description":"AWS account ID"},"regions":{"type":"array","nullable":true,"items":{"type":"string"},"minItems":1,"description":"AWS regions to scan. Null scans every region enabled on the account, resolved at each sync."},"createMonitoringAlarms":{"type":"boolean","default":true,"description":"Whether to create CloudWatch monitoring alarms for this account"},"subscribeToAlarms":{"type":"boolean","default":true,"description":"Whether to subscribe to existing and new CloudWatch alarms in this account"}},"required":["workspaceId","provider","account","regions"],"additionalProperties":false},{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"provider":{"type":"string","enum":["vercel"]},"code":{"type":"string","description":"OAuth authorization code from Vercel"},"configurationId":{"type":"string","description":"Vercel integration configuration ID"},"next":{"type":"string","description":"Redirect URL after connection"}},"required":["workspaceId","provider","code","configurationId"],"additionalProperties":false},{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"provider":{"type":"string","enum":["fly"]},"token":{"type":"string","description":"Fly.io organization API token"}},"required":["workspaceId","provider","token"],"additionalProperties":false},{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"provider":{"type":"string","enum":["render"]},"apiKey":{"type":"string","description":"Render API key"},"ownerId":{"type":"string","description":"Render owner id (usr-… or tea-…) to connect. When omitted, every owner reachable by the API key is connected."}},"required":["workspaceId","provider","apiKey"],"additionalProperties":false},{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"provider":{"type":"string","enum":["planetscale"]},"code":{"type":"string","description":"OAuth authorization code from PlanetScale. Provide this or a service token pair."},"tokenId":{"type":"string","description":"PlanetScale service token ID. Required with `token` when no OAuth code is provided."},"token":{"type":"string","description":"PlanetScale service token. Required with `tokenId` when no OAuth code is provided."},"organization":{"type":"string","description":"PlanetScale organization to connect. May be omitted only when the credentials reach exactly one organization; otherwise the request fails with the reachable organization names."}},"required":["workspaceId","provider"],"additionalProperties":false},{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"provider":{"type":"string","enum":["modal"]},"tokenId":{"type":"string","description":"Modal token ID (ak-…)"},"tokenSecret":{"type":"string","description":"Modal token secret (as-…)"}},"required":["workspaceId","provider","tokenId","tokenSecret"],"additionalProperties":false},{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"provider":{"type":"string","enum":["supabase"]},"code":{"type":"string","description":"OAuth authorization code from Supabase. Provide this or a personal access token."},"token":{"type":"string","description":"Supabase personal access token (sbp_…). Required when no OAuth code is provided."},"organization":{"type":"string","description":"Supabase organization slug to connect. May be omitted only when the credentials reach exactly one organization; otherwise the request fails with the reachable organization slugs."}},"required":["workspaceId","provider"],"additionalProperties":false},{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"provider":{"type":"string","enum":["turso"]},"token":{"type":"string","description":"Turso Platform API token"},"organization":{"type":"string","description":"Turso organization slug to connect. Required for organization-scoped tokens. May be omitted only for a legacy unrestricted token that reaches exactly one organization."}},"required":["workspaceId","provider","token"],"additionalProperties":false},{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"provider":{"type":"string","enum":["neon"]},"token":{"type":"string","description":"Neon organization or personal API key"},"orgId":{"type":"string","description":"Neon organization id (org-…) to connect. May be omitted only when the key reaches exactly one organization; otherwise the request fails with the reachable organizations."}},"required":["workspaceId","provider","token"],"additionalProperties":false},{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"provider":{"type":"string","enum":["railway"]},"code":{"type":"string","description":"OAuth authorization code from Railway. Provide this or a workspace token."},"token":{"type":"string","description":"Railway workspace or account token. Required when no OAuth code is provided."},"railwayWorkspaceId":{"type":"string","description":"Railway workspace ID to connect. When omitted, every workspace reachable by the credentials is connected."}},"required":["workspaceId","provider"],"additionalProperties":false},{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"provider":{"type":"string","enum":["convex"]},"token":{"type":"string","description":"Convex team access token, created under Team Settings > Access Tokens in the Convex dashboard"}},"required":["workspaceId","provider","token"],"additionalProperties":false},{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"provider":{"type":"string","enum":["clickhouse"]},"keyId":{"type":"string","description":"ClickHouse Cloud API key ID"},"keySecret":{"type":"string","description":"ClickHouse Cloud API key secret"}},"required":["workspaceId","provider","keyId","keySecret"],"additionalProperties":false},{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"provider":{"type":"string","enum":["triggerdev"]},"apiKey":{"type":"string","description":"Trigger.dev environment secret key (tr_prod_sk_… or tr_stg_sk_…) created with the \"No restrictions\" preset in the environment's API Keys page. Connecting again for the same environment replaces the account's key."}},"required":["workspaceId","provider","apiKey"],"additionalProperties":false},{"$ref":"#/components/schemas/ConnectGcpAccount"}]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string","enum":["cloudflare"]},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Cloud Account"}},"failures":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"account":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"response":{"type":"string"}},"required":["message","account","name","type"]}}},"required":["provider","accounts","failures"]},{"type":"object","properties":{"provider":{"type":"string","enum":["aws"]},"url":{"type":"string"},"s3Url":{"type":"string"},"region":{"type":"string","description":"Region the CloudFormation stack is deployed in"},"templateBody":{"type":"string","description":"The generated CloudFormation template. Deploy it unchanged: the ExternalParameter default is the external ID that registers this connection"}},"required":["provider","url","s3Url","region","templateBody"]},{"type":"object","properties":{"provider":{"type":"string","enum":["vercel"]},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Cloud Account"}},"failures":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"account":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"response":{"type":"string"}},"required":["message","account","name","type"]}}},"required":["provider","accounts","failures"]},{"type":"object","properties":{"provider":{"type":"string","enum":["fly"]},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Cloud Account"}},"failures":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"account":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"response":{"type":"string"}},"required":["message","account","name","type"]}}},"required":["provider","accounts","failures"]},{"type":"object","properties":{"provider":{"type":"string","enum":["render"]},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Cloud Account"}},"failures":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"account":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"response":{"type":"string"}},"required":["message","account","name","type"]}}},"required":["provider","accounts","failures"]},{"type":"object","properties":{"provider":{"type":"string","enum":["planetscale"]},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Cloud Account"}},"failures":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"account":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"response":{"type":"string"}},"required":["message","account","name","type"]}}},"required":["provider","accounts","failures"]},{"type":"object","properties":{"provider":{"type":"string","enum":["railway"]},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Cloud Account"}},"failures":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"account":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"response":{"type":"string"}},"required":["message","account","name","type"]}}},"required":["provider","accounts","failures"]},{"type":"object","properties":{"provider":{"type":"string","enum":["modal"]},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Cloud Account"}},"failures":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"account":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"response":{"type":"string"}},"required":["message","account","name","type"]}}},"required":["provider","accounts","failures"]},{"type":"object","properties":{"provider":{"type":"string","enum":["supabase"]},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Cloud Account"}},"failures":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"account":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"response":{"type":"string"}},"required":["message","account","name","type"]}}},"required":["provider","accounts","failures"]},{"type":"object","properties":{"provider":{"type":"string","enum":["convex"]},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Cloud Account"}},"failures":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"account":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"response":{"type":"string"}},"required":["message","account","name","type"]}}},"required":["provider","accounts","failures"]},{"type":"object","properties":{"provider":{"type":"string","enum":["clickhouse"]},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Cloud Account"}},"failures":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"account":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"response":{"type":"string"}},"required":["message","account","name","type"]}}},"required":["provider","accounts","failures"]},{"type":"object","properties":{"provider":{"type":"string","enum":["turso"]},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Cloud Account"}},"failures":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"account":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"response":{"type":"string"}},"required":["message","account","name","type"]}}},"required":["provider","accounts","failures"]},{"type":"object","properties":{"provider":{"type":"string","enum":["neon"]},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Cloud Account"}},"failures":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"account":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"response":{"type":"string"}},"required":["message","account","name","type"]}}},"required":["provider","accounts","failures"]},{"type":"object","properties":{"provider":{"type":"string","enum":["triggerdev"]},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Cloud Account"}},"failures":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"account":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"response":{"type":"string"}},"required":["message","account","name","type"]}}},"required":["provider","accounts","failures"]},{"type":"object","properties":{"provider":{"type":"string","enum":["gcp"]},"setup":{"$ref":"#/components/schemas/GcpSetup"}},"required":["provider","setup"]}]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Payment Required"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_accounts/kubernetes/agent/register":{"post":{"operationId":"cloud_accounts.kubernetes.agent_register","tags":["Cloud Accounts"],"summary":"Register an in-cluster polylane-k8s agent","requestBody":{"required":true,"description":"The polylane-k8s agent registration payload. Registration is idempotent per cluster UID and never rotates credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"clusterUid":{"type":"string","minLength":1,"maxLength":256,"description":"Stable cluster identity (the kube-system namespace UID). Registration is idempotent per cluster UID."},"clusterName":{"type":"string","maxLength":256,"description":"Display name for the cluster. When omitted, the platform derives one from the cluster UID."},"kubernetesVersion":{"type":"string","minLength":1,"maxLength":128,"description":"Kubernetes server version reported by the cluster, e.g. v1.30.2."},"agentVersion":{"type":"string","minLength":1,"maxLength":128,"description":"Version of the polylane-k8s agent performing the registration."},"distribution":{"type":"string","maxLength":128,"description":"Detected Kubernetes distribution, e.g. eks, gke, k3s."},"namespace":{"type":"string","minLength":1,"maxLength":253,"description":"Namespace the agent is deployed in."},"chartVersion":{"type":"string","maxLength":128,"description":"Helm chart version the agent was installed from."}},"required":["clusterUid","kubernetesVersion","agentVersion","namespace"],"additionalProperties":false}}}},"responses":{"200":{"description":"Registration result. Flat body (no platform envelope): the in-cluster agent decodes it directly.","content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string"},"agentId":{"type":"string"},"tunnelId":{"type":"string"},"tunnelToken":{"type":"string"},"tunnelHostname":{"type":"string"},"shimSecret":{"type":"string"},"_object":{"type":"string","enum":["kubernetes_agent_registration"]}},"required":["accountId","agentId","tunnelId","tunnelToken","tunnelHostname","shimSecret","_object"]}}}},"400":{"description":"Invalid request, agent connections not configured on this stage, or the cluster is already connected in direct mode. Terminal for the agent.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials, or a non-API-key authentication method. Terminal for the agent.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"The API key is not authorized for cloud_accounts:write. Terminal for the agent.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"426":{"description":"Plan limit exceeded: the workspace holds as many cloud accounts as its plan allows. Terminal for the agent.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"plan":{"type":"string"},"upgradeUrl":{"type":"string"}},"required":["error"]}}}},"429":{"description":"Rate limited. The agent retries with backoff, honoring Retry-After.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Internal error. The agent retries with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/v1/cloud_accounts/rotate-credentials":{"post":{"operationId":"cloud_accounts.rotate_credentials","tags":["Cloud Accounts"],"summary":"Rotate the API key or token for a cloud account","requestBody":{"required":true,"description":"The new credentials for the cloud account","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"id":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"},"token":{"type":"string","description":"New API token (for Cloudflare, Fly.io, Supabase, Turso, Neon, or Convex)"},"apiKey":{"type":"string","description":"New API key (for Render or Trigger.dev)"},"tokenId":{"type":"string","description":"New service token ID (for PlanetScale, alongside token)"},"tokenSecret":{"type":"string","description":"New token secret (for Modal or ClickHouse Cloud, alongside tokenId)"}},"required":["workspaceId","id"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Cloud Account"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_accounts/validate-credentials":{"post":{"operationId":"cloud_accounts.validate_credentials","tags":["Cloud Accounts"],"summary":"Validate the saved credentials for a cloud account","requestBody":{"required":true,"description":"The cloud account whose saved credentials to validate","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"id":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"}},"required":["workspaceId","id"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"valid":{"type":"boolean"},"status":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}}},"required":["valid","status"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_accounts/sync":{"post":{"operationId":"cloud_accounts.sync","tags":["Cloud Accounts"],"summary":"Sync a cloud account","requestBody":{"required":true,"description":"The cloud account to sync","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"id":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"}},"required":["workspaceId","id"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Cloud Account"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_accounts/{workspaceId}/{id}/api_key":{"put":{"operationId":"cloud_accounts.vercel.api_key.update","tags":["Cloud Accounts"],"summary":"Set or remove the Vercel access token used for metrics and logs","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"},"required":true,"description":"ID of the cloud_account","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The Vercel access token to store on the account","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","nullable":true,"description":"The Vercel personal access token to store, or null to remove the stored token"}},"required":["token"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Cloud Account"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_accounts/suggest":{"post":{"operationId":"cloud_accounts.suggest","tags":["Cloud Accounts"],"summary":"Suggest a cloud provider","requestBody":{"required":true,"description":"Suggest cloud provider","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"path":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"details":{"type":"string"}},"required":["workspaceId","name","url"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{}}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/cloud_accounts/search":{"post":{"operationId":"cloud_accounts.search","tags":["Cloud Accounts"],"summary":"Search cloud accounts","parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"alias","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"account","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"region","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"createdBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"ownerId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"visibility","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"guests","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"lastEditedBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"provider","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"status","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"workflowId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"lastSync","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"initialised","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"lastFailureAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"anomalyChecksDisabled","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"anomalyCheckIntervalMinutes","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"readOnly","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"resyncRequestedAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"syncReservedAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"syncPausedAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"syncPauseReason","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"repositoryDiscoveryCompletedAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"labels","in":"query"}],"requestBody":{"required":true,"description":"The prompt to search cloud accounts","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"prompt":{"type":"string","nullable":true}},"required":["workspaceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"array","items":{"$ref":"#/components/schemas/Cloud Account"}}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"418":{"description":"I'm a Teapot","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["I'm a Teapot"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/aws_connection_requests":{"post":{"operationId":"aws_connection_requests.create","tags":["AWS Connections"],"summary":"Create an idempotent customer-managed AWS connection request","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAwsConnectionRequest"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/AwsConnectionRequest"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Payment Required"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/aws_connection_requests/{workspaceId}/{requestId}":{"get":{"operationId":"aws_connection_requests.get","tags":["AWS Connections"],"summary":"Get a customer-managed AWS connection request","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^cloudformation_[0-9a-z]{24}$","description":"ID of the cloudformation_template","example":"cloudformation_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the cloudformation_template","name":"requestId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/AwsConnectionRequest"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"aws_connection_requests.delete","tags":["AWS Connections"],"summary":"Delete a customer-managed AWS connection request","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^cloudformation_[0-9a-z]{24}$","description":"ID of the cloudformation_template","example":"cloudformation_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the cloudformation_template","name":"requestId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"requestId":{"type":"string","pattern":"^cloudformation_[0-9a-z]{24}$","description":"ID of the cloudformation_template","example":"cloudformation_38mg3o4ibc92h8t2efn8csrh"}},"required":["requestId"],"additionalProperties":false}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/aws_connections":{"post":{"operationId":"aws_connections.activate","tags":["AWS Connections"],"summary":"Validate and register customer-managed AWS resources","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateAwsConnection"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/AwsConnectionActivation"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Payment Required"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/feedbacks":{"post":{"operationId":"feedbacks.post","tags":["Feedbacks"],"summary":"Submit feedback about the platform","requestBody":{"required":true,"description":"The feedback to submit","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"text":{"type":"string","description":"Feedback"},"title":{"type":"string","description":"Title"},"context":{"type":"string","description":"The context from the feedback, usually the web page the feedback is submitted from"},"environment":{"type":"object","additionalProperties":{"nullable":true},"description":"Details about the environment the feedback is submitted from"},"screenshotFileId":{"type":"string","nullable":true,"pattern":"^file_[0-9a-z]{24}$","description":"The ID of an uploaded screenshot attached to the feedback"}},"required":["workspaceId","text","title","context","environment"],"additionalProperties":false}}}},"responses":{"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Feedback"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/integration_interest":{"post":{"operationId":"integrationInterest.post","tags":["Integrations"],"summary":"Request an integration that is not available yet","requestBody":{"required":true,"description":"The integration to request","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"provider":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9._-]+$","description":"The catalog type of the integration the request is for","example":"gcp"}},"required":["workspaceId","provider"],"additionalProperties":false}}}},"responses":{"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/IntegrationInterest"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/integration_interest/{workspaceId}":{"get":{"operationId":"integrationInterest.list","tags":["Integrations"],"summary":"List the integrations the signed-in user has requested in this workspace","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationInterest"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/ratings":{"post":{"operationId":"ratings.post","tags":["Ratings"],"summary":"Create a rating","requestBody":{"required":true,"description":"The rating to create","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"id":{"type":"string"},"threadId":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"accountId":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"},"version":{"type":"string"},"resource":{"type":"string","enum":["message","incident"]},"type":{"type":"string","enum":["implicit","explicit"]},"score":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[-1]}],"description":"The score to give to the message, 1 for postitive response, -1 for negative"},"details":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true,"enum":["ui","overactive_refusal","not_grounded","not_follow_instruction","not_factual","incomplete",null]}},"required":["workspaceId","id","resource","type","score"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Rating"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/ratings/{workspaceId}/{id}":{"patch":{"operationId":"ratings.patch","tags":["Ratings"],"summary":"Update a rating","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^rating_[0-9a-z]{32}$","description":"ID of the rating","example":"rating_d18564pxsvozx979j3532mii2kk7pmw6"},"required":true,"description":"ID of the rating","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The rating to update","content":{"application/json":{"schema":{"type":"object","properties":{"details":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true,"enum":["ui","overactive_refusal","not_grounded","not_follow_instruction","not_factual","incomplete",null]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Rating"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/ratings":{"post":{"operationId":"ratings.public.post","tags":["Ratings"],"summary":"Create a rating","requestBody":{"required":true,"description":"The rating to create","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"id":{"type":"string"},"threadId":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"accountId":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"},"version":{"type":"string"},"resource":{"type":"string","enum":["message","incident"]},"type":{"type":"string","enum":["implicit","explicit"]},"score":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[-1]}],"description":"The score to give to the message, 1 for postitive response, -1 for negative"},"details":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true,"enum":["ui","overactive_refusal","not_grounded","not_follow_instruction","not_factual","incomplete",null]}},"required":["workspaceId","id","resource","type","score"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Rating"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/ratings/{workspaceId}/{id}":{"patch":{"operationId":"public.ratings.patch","tags":["Ratings"],"summary":"Update a rating","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^rating_[0-9a-z]{32}$","description":"ID of the rating","example":"rating_d18564pxsvozx979j3532mii2kk7pmw6"},"required":true,"description":"ID of the rating","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The rating to update","content":{"application/json":{"schema":{"type":"object","properties":{"details":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true,"enum":["ui","overactive_refusal","not_grounded","not_follow_instruction","not_factual","incomplete",null]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Rating"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/analytics":{"post":{"operationId":"analytics.query","tags":["Analytics"],"summary":"Query analytics time series data","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"from":{"type":"number"},"to":{"type":"number"},"event":{"type":"string"},"operation":{"type":"string","enum":["count","sum"]},"sumField":{"type":"string"},"granularity":{"type":"string","enum":["hourly","daily"]},"groupBy":{"type":"string"},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"values":{"type":"array","items":{"type":"string"}},"operator":{"type":"string","enum":["in","gte"],"description":"Use in for exact values (the default) or gte for one numeric lower bound."}},"required":["field","values"]}}},"required":["workspaceId","from","to","event","operation"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"total":{"type":"number"},"series":{"type":"array","items":{"type":"object","properties":{"bucket":{"type":"string"},"value":{"type":"number"},"group":{"type":"string"}},"required":["bucket","value"]}}},"required":["total","series"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/analytics/usage/{workspaceId}":{"get":{"operationId":"analytics.usage","tags":["Analytics"],"summary":"Get current-cycle credit usage and the selected period's usage mix","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":90,"default":30},"required":false,"name":"days","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"allowance":{"type":"string","enum":["limited","unlimited","none"]},"percentage":{"type":"number","nullable":true},"from":{"type":"number"},"to":{"type":"number"},"series":{"type":"array","nullable":true,"items":{"type":"object","properties":{"bucket":{"type":"string"},"value":{"type":"number"},"group":{"type":"string"}},"required":["bucket","value"]}},"breakdown":{"type":"array","nullable":true,"items":{"type":"object","properties":{"group":{"type":"string"},"value":{"type":"number"}},"required":["group","value"]}}},"required":["allowance","percentage","from","to","series","breakdown"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/pages/view/{id}":{"get":{"operationId":"pages.view","security":[],"tags":["Pages"],"summary":"Mint a short-lived signed viewing URL for a published page","description":"Authorized for authenticated workspace members with workspace read access, and for holders of a pull request guest link token (Bearer header or `token` query parameter) minted for the pull request this page was published from.","parameters":[{"schema":{"type":"string","pattern":"^page_[0-9a-z]{40}$","description":"ID of the page","example":"page_38mg3o4ibc92h8t2efn8csrhd18564pxsvozx979"},"required":true,"description":"ID of the page","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"page":{"type":"object","properties":{"id":{"type":"string","pattern":"^page_[0-9a-z]{40}$","description":"ID of the page","example":"page_38mg3o4ibc92h8t2efn8csrhd18564pxsvozx979"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"kind":{"type":"string","enum":["pr_analysis","autofix_run","issue_disposition"]},"title":{"type":"string"},"source":{"type":"string"},"sourceUrl":{"type":"string","nullable":true},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","workspaceId","kind","title","source","sourceUrl","created","updated"],"additionalProperties":false},"url":{"type":"string","description":"Short-lived signed URL serving the page content, suitable for embedding in an iframe."},"expiresAt":{"type":"string","description":"When the signed URL stops working. Request a fresh one after this instant."}},"required":["page","url","expiresAt"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/pages/{workspaceId}":{"get":{"operationId":"pages.list","tags":["Pages"],"summary":"List the workspace's published pages","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","enum":["workspaceId","id","kind","title","source","sourceUrl","url","deletedBy","created","updated","deleted"],"default":"created"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"type":"string","description":"Case-insensitive substring match against title and source."},"required":false,"description":"Case-insensitive substring match against title and source.","name":"search","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"kind","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"title","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"source","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"sourceUrl","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"url","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"deletedBy","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Page"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/pages/{workspaceId}/{id}":{"delete":{"operationId":"pages.delete","tags":["Pages"],"summary":"Delete a published page","description":"Deletes the published page so its URL stops resolving. The row is kept in the backend and the page can be restored.","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^page_[0-9a-z]{40}$","description":"ID of the page","example":"page_38mg3o4ibc92h8t2efn8csrhd18564pxsvozx979"},"required":true,"description":"ID of the page","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Page"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/memories/{workspaceId}/tree":{"get":{"operationId":"memories.tree","tags":["Memories"],"summary":"List a folder of the workspace memory repository","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","maxLength":512},"required":false,"name":"path","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/MemoryDirectory"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/memories/{workspaceId}/file":{"get":{"operationId":"memories.file","tags":["Memories"],"summary":"Read a file from the workspace memory repository","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"name":"path","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/MemoryFile"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"put":{"operationId":"memories.write","tags":["Memories"],"summary":"Create or replace a markdown file in the workspace memory repository","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryWriteBody"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/MemoryWritten"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"memories.delete","tags":["Memories"],"summary":"Delete a markdown file from the workspace memory repository","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"name":"path","in":"query"},{"schema":{"type":"string","minLength":40,"maxLength":40,"description":"The sha of the file when it was read, so a change made in between is not deleted"},"required":true,"description":"The sha of the file when it was read, so a change made in between is not deleted","name":"expectedSha","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/MemoryDeleted"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/memories/{workspaceId}/commits":{"get":{"operationId":"memories.commits","tags":["Memories"],"summary":"List recent commits of the workspace memory repository","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":30},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/MemoryCommits"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/search":{"post":{"operationId":"search.global","tags":["Search"],"summary":"Global search across all resource types","requestBody":{"required":true,"description":"Global search request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","description":"The workspace ID to search within"},"prompt":{"type":"string","description":"The search query"},"searchMode":{"type":"string","enum":["vector","fts","hybrid"],"description":"Search mode (defaults to 'hybrid')"},"mode":{"type":"string","enum":["fast","full"],"description":"Ranking tier: 'fast' skips AI reranking for low-latency retrieval-only results, 'full' (default) reranks with AI"}},"required":["workspaceId","prompt"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["repository"]},"id":{"type":"string"},"score":{"type":"number"},"entity":{"nullable":true}},"required":["type","id","score"]},{"type":"object","properties":{"type":{"type":"string","enum":["thread"]},"id":{"type":"string"},"score":{"type":"number"},"entity":{"nullable":true}},"required":["type","id","score"]},{"type":"object","properties":{"type":{"type":"string","enum":["cloud_account"]},"id":{"type":"string"},"score":{"type":"number"},"entity":{"nullable":true}},"required":["type","id","score"]}]}}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"418":{"description":"I'm a Teapot","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["I'm a Teapot"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/search/label/{workspaceId}/{labelId}":{"get":{"operationId":"search.labelResources","tags":["Search"],"summary":"List all resources with a specific label","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"labelId","in":"path"},{"schema":{"type":"number","minimum":1,"maximum":20,"default":5},"required":false,"name":"perPage","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"},"entity":{"type":"object","additionalProperties":{"nullable":true}}},"required":["type","id","entity"]}}},"required":["items"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/threads/{workspaceId}/{id}/family":{"get":{"operationId":"threads.family","tags":["Threads"],"summary":"Get a thread's family (parent, siblings, children)","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"self":{"$ref":"#/components/schemas/Thread"},"parent":{"allOf":[{"$ref":"#/components/schemas/Thread"},{"nullable":true}]},"siblings":{"type":"array","items":{"$ref":"#/components/schemas/Thread"}},"children":{"type":"array","items":{"$ref":"#/components/schemas/Thread"}}},"required":["self","parent","siblings","children"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Service Unavailable"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/threads/{workspaceId}/{id}/instructions":{"get":{"operationId":"threads.instructions","tags":["Threads"],"summary":"List the custom instructions active on a thread","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CustomInstruction"}}},"required":["items"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/threads/{workspaceId}/{id}":{"get":{"operationId":"threads.get","tags":["Threads"],"summary":"Get a thread","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"thread":{"$ref":"#/components/schemas/Thread"}},"required":["thread"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"put":{"operationId":"threads.put","tags":["Threads"],"summary":"Update a thread","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The thread properties to update","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":4,"maxLength":256,"description":"Name of the thread"},"context":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["repository","cloud_account","integration","thread","infrastructure_node","anomaly","issue","change_record","pull_request"]},"label":{"type":"string"}},"required":["id","type"]}},"visibility":{"type":"string","enum":["public","private","unlisted","workspace","workspace_and_guests","workspace_and_github_org","private_and_guests","team","team_and_guests","custom","internal"]},"guests":{"type":"array","nullable":true,"items":{"type":"string"}},"labels":{"type":"array","items":{"type":"string"},"maxItems":20},"ownerId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"changeDescription":{"type":"string","nullable":true,"description":"Description of the change"}},"required":["name","context","ownerId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Thread"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"threads.patch","tags":["Threads"],"summary":"Update the fields of a thread","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The thread properties to update","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":4,"maxLength":256,"description":"Name of the thread"},"context":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["repository","cloud_account","integration","thread","infrastructure_node","anomaly","issue","change_record","pull_request"]},"label":{"type":"string"}},"required":["id","type"]}},"visibility":{"type":"string","enum":["public","private","unlisted","workspace","workspace_and_guests","workspace_and_github_org","private_and_guests","team","team_and_guests","custom","internal"]},"guests":{"type":"array","nullable":true,"items":{"type":"string"}},"labels":{"type":"array","items":{"type":"string"},"maxItems":20},"ownerId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"changeDescription":{"type":"string","nullable":true,"description":"Description of the change"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Thread"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"threads.del","tags":["Threads"],"summary":"Delete a thread","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"_object":{"type":"string","enum":["thread"]}},"required":["id","_object"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/threads/{workspaceId}":{"get":{"operationId":"threads.list","tags":["Threads"],"summary":"List threads","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","enum":["id","parentThreadId","agentName","name","createdBy","ownerId","externalId","investigationSlackChannelKey","lastEditedBy","visibility","origin","originVersion","source","type","created","updated","runningSince","awaitingAgentsSince","waitingOnHumanSince","escalatedSince","fleet","state"],"default":"created"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"parentThreadId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"agentName","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"name","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"createdBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"ownerId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"externalId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"investigationSlackChannelKey","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"summary","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"lastEditedBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"visibility","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"origin","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"originVersion","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"source","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"type","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"fleet","in":"query"},{"schema":{"$ref":"#/components/schemas/Thread State Filter"},"required":false,"description":"Only threads in one of these run states (see Thread State). Takes one state or a list; prefix a state with '!' to exclude it.","name":"state","in":"query"},{"schema":{"$ref":"#/components/schemas/Thread State"},"required":false,"description":"Only threads in this run state as well, whatever `state` selects. A list's fixed tab sends it, so a `state` filter narrows the tab instead of replacing it.","name":"inState","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"labels","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Thread"},{"type":"object","properties":{"issue":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"title":{"type":"string"},"severity":{"type":"string","enum":["critical","high","medium","low","info"]},"status":{"type":"string","enum":["new","triaging","confirmed","dismissed","failed","skipped"]},"resolvedAt":{"type":"string","nullable":true,"format":"date-time"},"investigationHeldAt":{"type":"string","nullable":true,"format":"date-time"},"investigationStartedAt":{"type":"string","nullable":true,"format":"date-time"},"investigationThreadId":{"type":"string","nullable":true},"occurrenceCount":{"type":"integer"}},"required":["id","title","severity","status","resolvedAt","investigationHeldAt","investigationStartedAt","investigationThreadId","occurrenceCount"],"additionalProperties":false},"autofix":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"status":{"type":"string"},"executor":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"},"submittedPrNumber":{"type":"integer","nullable":true},"submittedPrUrl":{"type":"string","nullable":true},"mergedPrNumber":{"type":"integer","nullable":true},"mergedPrUrl":{"type":"string","nullable":true},"mergedAt":{"type":"string","nullable":true,"format":"date-time"},"created":{"type":"string","format":"date-time"}},"required":["id","status","executor","owner","repo","submittedPrNumber","submittedPrUrl","mergedPrNumber","mergedPrUrl","mergedAt","created"],"additionalProperties":false}},"additionalProperties":false}]}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"429":{"description":"Slow down","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Slow down"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/threads":{"post":{"operationId":"threads.post","tags":["Threads"],"summary":"Create a new thread","requestBody":{"required":true,"description":"The thread to create","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"parentThreadId":{"type":"string","nullable":true,"pattern":"^thrd_[0-9a-z]{24}$","description":"Parent thread ID if creating a sub-agent thread"},"name":{"type":"string","nullable":true,"minLength":4,"maxLength":256,"description":"Name of the thread"},"prompt":{"type":"string","nullable":true,"description":"Initial prompt to generate the thread name from"},"context":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["repository","cloud_account","integration","thread","infrastructure_node","anomaly","issue","change_record","pull_request"]},"label":{"type":"string"}},"required":["id","type"]}},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","pdf","text"]},"name":{"type":"string"},"thumbnailUrl":{"type":"string"},"size":{"type":"number","nullable":true}},"required":["id","kind","name","thumbnailUrl","size"]},"description":"Files attached to the initial message"},"visibility":{"type":"string","enum":["public","private","unlisted","workspace","workspace_and_guests","workspace_and_github_org","private_and_guests","team","team_and_guests","custom","internal"]},"guests":{"type":"array","nullable":true,"items":{"type":"string"}},"labels":{"type":"array","items":{"type":"string"},"maxItems":20},"source":{"type":"string","nullable":true,"enum":["share","topology","onboarding",null],"description":"Product surface the conversation is kicked off from: a shared view, the topology page, or the first run."},"fleet":{"type":"boolean","description":"Start the thread as a fleet: the thread leads up to 24 agents that investigate in parallel. Needs a connected GitHub integration."}},"required":["workspaceId","visibility"],"additionalProperties":false}}}},"responses":{"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Thread"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Payment Required"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/threads/fork":{"post":{"operationId":"threads.fork","tags":["Threads"],"summary":"Fork a thread from a specific message","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"threadId":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"pivotMessageId":{"type":"string","pattern":"^msg_[0-9a-z]{32}$","description":"ID of the message","example":"msg_d18564pxsvozx979j3532mii2kk7pmw6"},"name":{"type":"string","minLength":1,"maxLength":256},"agentName":{"type":"string","minLength":1,"maxLength":128}},"required":["workspaceId","threadId","pivotMessageId"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"childThreadId":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"copiedMessageCount":{"type":"number"}},"required":["childThreadId","copiedMessageCount"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/threads/revert":{"post":{"operationId":"threads.revert","tags":["Threads"],"summary":"Revert a thread to a specific message, dropping all later messages","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"threadId":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"pivotMessageId":{"type":"string","pattern":"^msg_[0-9a-z]{32}$","description":"ID of the message","example":"msg_d18564pxsvozx979j3532mii2kk7pmw6"}},"required":["workspaceId","threadId","pivotMessageId"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"deletedCount":{"type":"number"}},"required":["deletedCount"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/threads/{workspaceId}/{id}/participants":{"get":{"operationId":"threads.participants.list","tags":["Threads"],"summary":"List participants of a thread","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ThreadParticipant"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/threads/{workspaceId}/{id}/fleet":{"get":{"operationId":"threads.fleet.get","tags":["Threads"],"summary":"Get the board of the fleet a thread leads or belongs to","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/FleetBoard"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/threads/{workspaceId}/{threadId}/context":{"get":{"operationId":"threads.context.get","tags":["Threads"],"summary":"Get what an attached context item looked like when the thread read it","description":"The text the agent read for one attached context item and the record it was rendered from, kept when the turn hydrated the attachment. Threads that ran before snapshots were kept answer 404.","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"threadId","in":"path"},{"schema":{"type":"string","description":"The user message the attachment rode on"},"required":true,"description":"The user message the attachment rode on","name":"messageId","in":"query"},{"schema":{"type":"string","description":"The attached item's id"},"required":true,"description":"The attached item's id","name":"sourceId","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/ThreadContextSnapshot"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/threads/search":{"post":{"operationId":"threads.search","tags":["Threads"],"summary":"Search threads","parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"parentThreadId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"agentName","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"name","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"createdBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"ownerId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"context","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"automation","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"investigation","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"externalId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"investigationSlackChannelKey","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"summary","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"lastEditedBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"visibility","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"origin","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"originVersion","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"source","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"type","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"fleet","in":"query"},{"schema":{"$ref":"#/components/schemas/Thread State Filter"},"required":false,"description":"Only threads in one of these run states (see Thread State). Takes one state or a list; prefix a state with '!' to exclude it.","name":"state","in":"query"},{"schema":{"$ref":"#/components/schemas/Thread State"},"required":false,"description":"Only threads in this run state as well, whatever `state` selects. A list's fixed tab sends it, so a `state` filter narrows the tab instead of replacing it.","name":"inState","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"labels","in":"query"}],"requestBody":{"required":true,"description":"The prompt to search threads","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"prompt":{"type":"string","nullable":true}},"required":["workspaceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Thread"},{"type":"object","properties":{"issue":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"title":{"type":"string"},"severity":{"type":"string","enum":["critical","high","medium","low","info"]},"status":{"type":"string","enum":["new","triaging","confirmed","dismissed","failed","skipped"]},"resolvedAt":{"type":"string","nullable":true,"format":"date-time"},"investigationHeldAt":{"type":"string","nullable":true,"format":"date-time"},"investigationStartedAt":{"type":"string","nullable":true,"format":"date-time"},"investigationThreadId":{"type":"string","nullable":true},"occurrenceCount":{"type":"integer"}},"required":["id","title","severity","status","resolvedAt","investigationHeldAt","investigationStartedAt","investigationThreadId","occurrenceCount"],"additionalProperties":false},"autofix":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"status":{"type":"string"},"executor":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"},"submittedPrNumber":{"type":"integer","nullable":true},"submittedPrUrl":{"type":"string","nullable":true},"mergedPrNumber":{"type":"integer","nullable":true},"mergedPrUrl":{"type":"string","nullable":true},"mergedAt":{"type":"string","nullable":true,"format":"date-time"},"created":{"type":"string","format":"date-time"}},"required":["id","status","executor","owner","repo","submittedPrNumber","submittedPrUrl","mergedPrNumber","mergedPrUrl","mergedAt","created"],"additionalProperties":false}},"additionalProperties":false}]}}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"418":{"description":"I'm a Teapot","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["I'm a Teapot"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/threads/export":{"post":{"operationId":"threads.export","tags":["Threads"],"summary":"Export a thread","requestBody":{"required":true,"description":"The thread to export","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"id":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"format":{"type":"string","enum":["md","pdf"]}},"required":["workspaceId","id","format"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"filename":{"type":"string"},"base64":{"type":"string"}},"required":["id","filename","base64"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/threads":{"post":{"operationId":"threads.anonymous.post","security":[],"tags":["Threads"],"summary":"Start a chat without an account","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"First message; when present the agent starts answering immediately"},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"kind":{"type":"string","enum":["image","pdf","text"]},"name":{"type":"string","maxLength":255},"thumbnailUrl":{"type":"string","maxLength":500},"size":{"type":"number","nullable":true}},"required":["id","kind","name","thumbnailUrl","size"],"additionalProperties":false},"maxItems":4,"description":"Files already uploaded through /public/upload/files, attached to the first message"}},"additionalProperties":false}}}},"responses":{"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"threadId":{"type":"string"},"workspaceId":{"type":"string"},"token":{"type":"string","description":"Claim token, returned once. It proves ownership of this chat: keep it to continue the conversation and to save it to a workspace later."},"url":{"type":"string"}},"required":["threadId","workspaceId","token","url"],"additionalProperties":false}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"429":{"description":"Slow down","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Slow down"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/threads/anonymous/{threadId}":{"get":{"operationId":"threads.anonymous.get","security":[],"tags":["Threads"],"summary":"Get an anonymous chat with its claim status","parameters":[{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"threadId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"thread":{"$ref":"#/components/schemas/Public Thread"},"claimed":{"type":"object","nullable":true,"properties":{"workspaceId":{"type":"string"},"threadId":{"type":"string"},"at":{"type":"number"},"url":{"type":"string"}},"required":["workspaceId","threadId","at","url"],"additionalProperties":false,"description":"Set once the chat has been saved to a workspace; the conversation continues at the claimed thread"}},"required":["thread","claimed"],"additionalProperties":false}},"required":["message","success","error","result"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/threads/claim":{"post":{"operationId":"threads.claim","tags":["Threads"],"summary":"Save an anonymous chat to a workspace","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"threadId":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"token":{"type":"string","minLength":16,"maxLength":64,"description":"The claim token returned when the anonymous chat was created"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"Workspace to save the chat into. Optional when you belong to exactly one workspace.","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"}},"required":["threadId","token"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"threadId":{"type":"string","description":"The thread the conversation now lives in, inside the chosen workspace"},"workspaceId":{"type":"string"},"url":{"type":"string"}},"required":["threadId","workspaceId","url"],"additionalProperties":false}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/threads/{workspaceId}/{id}":{"get":{"operationId":"threads.public.get","security":[],"tags":["Threads"],"summary":"Get public details of a thread","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"thread":{"$ref":"#/components/schemas/Public Thread"}},"required":["thread"]}},"required":["message","success","error","result"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/threads/report":{"post":{"operationId":"threads.public.report","security":[],"tags":["Threads"],"summary":"Report a thread","requestBody":{"required":true,"description":"The thread to report","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"id":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"message":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"reason":{"type":"string","enum":["copyright","trademark","child_safety","fraud","adult_content","hate","illegal_goods","court_order","confidential","unlawful","other"]}},"required":["workspaceId","id","reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"id":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"message":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"reason":{"type":"string","enum":["copyright","trademark","child_safety","fraud","adult_content","hate","illegal_goods","court_order","confidential","unlawful","other"]}},"required":["workspaceId","id","reason"],"additionalProperties":false}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/threads/export":{"post":{"operationId":"threads.public.export","security":[],"tags":["Threads"],"summary":"Export a public thread","requestBody":{"required":true,"description":"The thread to export","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"id":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"format":{"type":"string","enum":["md","pdf"]}},"required":["workspaceId","id","format"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"filename":{"type":"string"},"base64":{"type":"string"}},"required":["id","filename","base64"]}},"required":["message","success","error","result"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/messages/{workspaceId}/{threadId}/{id}":{"get":{"operationId":"messages.get","tags":["Messages"],"summary":"Get a message","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"threadId","in":"path"},{"schema":{"type":"string","pattern":"^msg_[0-9a-z]{32}$","description":"ID of the message","example":"msg_d18564pxsvozx979j3532mii2kk7pmw6"},"required":true,"description":"ID of the message","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Message"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/messages/{workspaceId}/{threadId}":{"get":{"operationId":"messages.list","tags":["Messages"],"summary":"List messages","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"threadId","in":"path"},{"schema":{"type":"string","enum":["id","role","createdAt"],"default":"createdAt"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"role","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"createdAt","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/messages":{"post":{"operationId":"messages.post","tags":["Messages"],"summary":"Send a message to a thread","requestBody":{"required":true,"description":"The message to send to the thread","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"threadId":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"prompt":{"type":"string"}},"required":["workspaceId","threadId","prompt"],"additionalProperties":false}}}},"responses":{"202":{"description":"Request accepted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Request accepted"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"status":{"type":"string","enum":["accepted"]},"threadId":{"type":"string"},"url":{"type":"string","description":"Poll this URL (GET) for the thread's messages, including the agent's response once it is ready."}},"required":["status","threadId","url"],"additionalProperties":false}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Payment Required"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/messages/{workspaceId}/{threadId}":{"get":{"operationId":"messages.public.list","security":[],"tags":["Messages"],"summary":"List public messages","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"threadId","in":"path"},{"schema":{"type":"string","enum":["id","role","createdAt"],"default":"createdAt"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"role","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"createdAt","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Public Message"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/messages/export":{"post":{"operationId":"messages.public.export","security":[],"tags":["Messages"],"summary":"Export a public message","requestBody":{"required":true,"description":"The message to export","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"threadId":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"id":{"type":"string","pattern":"^msg_[0-9a-z]{32}$","description":"ID of the message","example":"msg_d18564pxsvozx979j3532mii2kk7pmw6"},"format":{"type":"string","enum":["md","pdf"]}},"required":["workspaceId","threadId","id","format"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_[0-9a-z]{32}$","description":"ID of the message","example":"msg_d18564pxsvozx979j3532mii2kk7pmw6"},"filename":{"type":"string"},"base64":{"type":"string"}},"required":["id","filename","base64"]}},"required":["message","success","error","result"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/messages/export":{"post":{"operationId":"messages.export","tags":["Messages"],"summary":"Export a message","requestBody":{"required":true,"description":"The message to export","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"threadId":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"id":{"type":"string","pattern":"^msg_[0-9a-z]{32}$","description":"ID of the message","example":"msg_d18564pxsvozx979j3532mii2kk7pmw6"},"format":{"type":"string","enum":["md","pdf"]}},"required":["workspaceId","threadId","id","format"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_[0-9a-z]{32}$","description":"ID of the message","example":"msg_d18564pxsvozx979j3532mii2kk7pmw6"},"filename":{"type":"string"},"base64":{"type":"string"}},"required":["id","filename","base64"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/artifacts/{workspaceId}/{threadId}":{"get":{"operationId":"artifacts.list","tags":["Artifacts"],"summary":"List artifacts","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"threadId","in":"path"},{"schema":{"type":"string","enum":["id","type","title","summary","status","currentVersion","created","updated","createdBy","messageId"],"default":"created"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":50},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"type","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"title","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"summary","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"status","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"currentVersion","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"created","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"updated","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"createdBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"messageId","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ArtifactListItem"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/artifacts/{workspaceId}/{threadId}/{id}":{"get":{"operationId":"artifacts.get","tags":["Artifacts"],"summary":"Get artifact","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"threadId","in":"path"},{"schema":{"type":"string","pattern":"^art_[0-9a-z]{32}$","description":"ID of the artifact","example":"art_d18564pxsvozx979j3532mii2kk7pmw6"},"required":true,"description":"ID of the artifact","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Artifact"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"artifacts.delete","tags":["Artifacts"],"summary":"Delete artifact","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"threadId","in":"path"},{"schema":{"type":"string","pattern":"^art_[0-9a-z]{32}$","description":"ID of the artifact","example":"art_d18564pxsvozx979j3532mii2kk7pmw6"},"required":true,"description":"ID of the artifact","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^art_[0-9a-z]{32}$","description":"ID of the artifact","example":"art_d18564pxsvozx979j3532mii2kk7pmw6"},"_object":{"type":"string","enum":["artifact"]}},"required":["id","_object"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/artifacts/{workspaceId}/{threadId}/{artifactId}/versions/{version}":{"get":{"operationId":"artifacts.getVersion","tags":["Artifacts"],"summary":"Get artifact version","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"threadId","in":"path"},{"schema":{"type":"string","pattern":"^art_[0-9a-z]{32}$","description":"ID of the artifact","example":"art_d18564pxsvozx979j3532mii2kk7pmw6"},"required":true,"description":"ID of the artifact","name":"artifactId","in":"path"},{"schema":{"type":"number","nullable":true,"minimum":0,"default":0},"required":false,"name":"version","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/ArtifactVersion"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/artifacts/{workspaceId}/{threadId}/{artifactId}/versions":{"get":{"operationId":"artifacts.listVersions","tags":["Artifacts"],"summary":"List artifact versions","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"threadId","in":"path"},{"schema":{"type":"string","pattern":"^art_[0-9a-z]{32}$","description":"ID of the artifact","example":"art_d18564pxsvozx979j3532mii2kk7pmw6"},"required":true,"description":"ID of the artifact","name":"artifactId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ArtifactVersion"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/artifacts/{workspaceId}/{threadId}/{id}":{"get":{"operationId":"artifacts.public.get","security":[],"tags":["Artifacts"],"summary":"Get public artifact","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"threadId","in":"path"},{"schema":{"type":"string","pattern":"^art_[0-9a-z]{32}$","description":"ID of the artifact","example":"art_d18564pxsvozx979j3532mii2kk7pmw6"},"required":true,"description":"ID of the artifact","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Artifact"}},"required":["message","success","error","result"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/artifacts/{workspaceId}/{threadId}":{"get":{"operationId":"artifacts.public.list","security":[],"tags":["Artifacts"],"summary":"List public artifacts","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"threadId","in":"path"},{"schema":{"type":"string","enum":["id","type","title","summary","status","currentVersion","created","updated","createdBy","messageId"],"default":"created"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":50},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"type","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"title","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"summary","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"status","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"currentVersion","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"created","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"updated","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"createdBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"messageId","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ArtifactListItem"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/artifacts/{workspaceId}/{threadId}/{artifactId}/versions/{version}":{"get":{"operationId":"artifacts.public.getVersion","security":[],"tags":["Artifacts"],"summary":"Get public artifact version","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"threadId","in":"path"},{"schema":{"type":"string","pattern":"^art_[0-9a-z]{32}$","description":"ID of the artifact","example":"art_d18564pxsvozx979j3532mii2kk7pmw6"},"required":true,"description":"ID of the artifact","name":"artifactId","in":"path"},{"schema":{"type":"number","nullable":true,"minimum":0,"default":0},"required":false,"name":"version","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/ArtifactVersion"}},"required":["message","success","error","result"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/artifacts/{workspaceId}/{threadId}/{artifactId}/versions":{"get":{"operationId":"artifacts.public.listVersions","security":[],"tags":["Artifacts"],"summary":"List public artifact versions","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the thread","name":"threadId","in":"path"},{"schema":{"type":"string","pattern":"^art_[0-9a-z]{32}$","description":"ID of the artifact","example":"art_d18564pxsvozx979j3532mii2kk7pmw6"},"required":true,"description":"ID of the artifact","name":"artifactId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ArtifactVersion"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/autofixes/{workspaceId}/{id}/timeline":{"get":{"operationId":"autofixes.timeline.list","tags":["Autofixes"],"summary":"List timeline events for an autofix","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^fix_[0-9a-z]{24}$","description":"ID of the autofix","example":"fix_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the autofix","name":"id","in":"path"},{"schema":{"type":"number","nullable":true,"minimum":0},"required":false,"name":"from","in":"query"},{"schema":{"type":"number","nullable":true,"minimum":0},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","description":"Comma-separated list of event types to filter by"},"required":false,"description":"Comma-separated list of event types to filter by","name":"types","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":200,"default":100},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc"},"required":false,"name":"order","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/AutofixTimelineEventsList"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/autofixes/timeline":{"post":{"operationId":"autofixes.timeline.create","tags":["Autofixes"],"summary":"Append a user-authored timeline event to an autofix","requestBody":{"required":true,"description":"The timeline event to add to an autofix","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"autofixId":{"type":"string","pattern":"^fix_[0-9a-z]{24}$","description":"ID of the autofix","example":"fix_38mg3o4ibc92h8t2efn8csrh"},"type":{"type":"string","enum":["note"],"description":"User-authored event type"},"at":{"type":"string","nullable":true,"format":"date-time","description":"When the event happened (defaults to now)"},"title":{"type":"string","maxLength":200},"body":{"type":"string","maxLength":5000},"data":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}]}}},"required":["workspaceId","autofixId","type"],"additionalProperties":false}}}},"responses":{"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/AutofixTimelineEvent"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/autofixes/{workspaceId}":{"get":{"operationId":"autofixes.list","tags":["Autofixes"],"summary":"List autofixes","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","enum":["id","provider","owner","repo","branch","part","status","origin","trigger","executor","commitSha","baseBranch","automationId","executionId","actionRowId","actionPlanId","hypothesisId","runId","issueId","severity","detectionSeverity","investigationThreadId","pullNumber","threadId","parentThreadId","parentMessageId","artifactId","findingsCount","title","prompt","failureReason","failureDetail","nativeFallbackAt","skippedReason","skippedReasonDetail","skippedKind","autoRetries","coveringPrNumber","coveringPrUrl","submittedPrNumber","submittedPrUrl","submittedAt","prActivityAt","staleAt","staleNudgedAt","prAdditions","prDeletions","prReviewDecision","prChecks","prStateAt","mergedPrNumber","mergedPrUrl","mergedAt","mergedBy","mergedFromSlackAt","mergedFromSlackChannelId","closedAt","closedBy","closedByThreadId","closedByUserId","closeReason","closeReasonDetail","closeEvidence","closeReasonHumanAt","cancelledAt","cancelledByThreadId","cancelledByUserId","unreachableAt","unreachableReason","expiredAt","archivedAt","archivedBy","causalChain","attributionQueriedAt","detectionOutcome","stopgapKind","stopgapTimelineEntryId","diffClass","created"],"default":"created"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"type":"string","description":"Case-insensitive substring match against title, owner, repo, and branch."},"required":false,"description":"Case-insensitive substring match against title, owner, repo, and branch.","name":"search","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Include archived autofixes. Every list leaves them out unless asked."},"required":false,"description":"Include archived autofixes. Every list leaves them out unless asked.","name":"includeArchived","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"provider","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"owner","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"repo","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"branch","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"part","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"status","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"origin","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"trigger","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"executor","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"commitSha","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"baseBranch","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"automationId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"executionId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"actionRowId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"actionPlanId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"hypothesisId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"runId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"issueId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"severity","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"detectionSeverity","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"investigationThreadId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"pullNumber","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"threadId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"parentThreadId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"parentMessageId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"artifactId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"findingsCount","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"title","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"prompt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"failureReason","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"failureDetail","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"nativeFallbackAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"skippedReason","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"skippedReasonDetail","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"skippedKind","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"autoRetries","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"coveringPrNumber","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"coveringPrUrl","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"submittedPrNumber","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"submittedPrUrl","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"prActivityAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"staleAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"staleNudgedAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"prAdditions","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"prDeletions","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"prReviewDecision","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"prChecks","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"prStateAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"mergedPrNumber","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"mergedPrUrl","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"mergedBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"mergedFromSlackAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"mergedFromSlackChannelId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"closedAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"closedBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"closedByThreadId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"closedByUserId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"closeReason","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"closeReasonDetail","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"closeEvidence","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"closeReasonHumanAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"cancelledAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"cancelledByThreadId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"cancelledByUserId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"unreachableAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"unreachableReason","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"expiredAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"archivedBy","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"causalChain","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"attributionQueriedAt","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"detectionOutcome","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"stopgapKind","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"stopgapTimelineEntryId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"diffClass","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Autofix"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/autofixes/{workspaceId}/{id}":{"get":{"operationId":"autofixes.get","tags":["Autofixes"],"summary":"Get an autofix","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^fix_[0-9a-z]{24}$","description":"ID of the autofix","example":"fix_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the autofix","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Autofix"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"autofixes.del","tags":["Autofixes"],"summary":"Delete an autofix","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^fix_[0-9a-z]{24}$","description":"ID of the autofix","example":"fix_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the autofix","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^fix_[0-9a-z]{24}$","description":"ID of the autofix","example":"fix_38mg3o4ibc92h8t2efn8csrh"},"_object":{"type":"string","enum":["autofix"]}},"required":["id","_object"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/autofixes/{workspaceId}/{id}/video":{"get":{"operationId":"autofixes.video","tags":["Autofixes"],"summary":"Get a signed link to the walkthrough video of an autofix","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^fix_[0-9a-z]{24}$","description":"ID of the autofix","example":"fix_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the autofix","name":"id","in":"path"},{"schema":{"type":"string","description":"The commit whose walkthrough to sign. The newest walkthrough when omitted or when that commit has none."},"required":false,"description":"The commit whose walkthrough to sign. The newest walkthrough when omitted or when that commit has none.","name":"video","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/AutofixVideo"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/autofixes/{workspaceId}/{id}/diff":{"get":{"operationId":"autofixes.diff","tags":["Autofixes"],"summary":"Get the unified diff of an autofix's pull request","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^fix_[0-9a-z]{24}$","description":"ID of the autofix","example":"fix_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the autofix","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/AutofixDiff"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"422":{"description":"Unprocessable content","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unprocessable content"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Service Unavailable"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/autofixes/rerun":{"post":{"operationId":"autofixes.rerun","tags":["Autofixes"],"summary":"Run a skipped or failed autofix again on the same autofix","requestBody":{"required":true,"description":"The skipped or failed autofix to run again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerunAutofixRequest"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/AutofixRerun"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/autofixes/merge":{"post":{"operationId":"autofixes.merge","tags":["Autofixes"],"summary":"Merge the open pull request of an autofix","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeAutofixRequest"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Autofix"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/autofixes/close":{"post":{"operationId":"autofixes.close","tags":["Autofixes"],"summary":"Close the open pull request of an autofix with a comment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseAutofixRequest"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Autofix"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/autofixes/archive":{"post":{"operationId":"autofixes.archive","tags":["Autofixes"],"summary":"Archive autofixes","description":"Archived autofixes keep their history and leave every list. An autofix whose pull request is still open is closed on GitHub with a comment first; the daily retention sweep archives merged and closed ones on its own after 30 days.","requestBody":{"required":true,"description":"The autofixes to archive, by id or by age","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveAutofixesRequest"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/ArchiveAutofixesResponse"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/autofixes/request-changes":{"post":{"operationId":"autofixes.requestChanges","tags":["Autofixes"],"summary":"Ask Polylane for changes to the open pull request of an autofix; the ask lands on the run's thread","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestAutofixChangesRequest"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Autofix"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/autofixes/cancel":{"post":{"operationId":"autofixes.cancel","tags":["Autofixes"],"summary":"Cancel a running autofix before it opens a pull request","requestBody":{"required":true,"description":"The running autofix to cancel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelAutofixRequest"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/AutofixCancel"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/autofixes/close-reason":{"post":{"operationId":"autofixes.setCloseReason","tags":["Autofixes"],"summary":"Record why a closed autofix pull request was rejected","requestBody":{"required":true,"description":"The closed autofix and the stated reason","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAutofixCloseReasonRequest"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/AutofixCloseReason"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/deliverables/{workspaceId}/{id}":{"get":{"operationId":"deliverables.public.get","security":[],"tags":["Deliverables"],"summary":"Get a deliverable and its content","description":"Open to workspace members, to holders of a pull request guest link (Bearer header) minted for the pull request the deliverable belongs to, and to anyone when the deliverable is public. Every refusal is a 404.","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^dlv_[0-9a-z]{24}$","description":"ID of the deliverable","example":"dlv_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the deliverable","name":"id","in":"path"},{"schema":{"type":"string","description":"The commit whose walkthrough to return. The newest walkthrough is returned when that commit has none."},"required":false,"description":"The commit whose walkthrough to return. The newest walkthrough is returned when that commit has none.","name":"video","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/PublicDeliverable"}},"required":["message","success","error","result"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/deliverables/{workspaceId}/{id}/video":{"get":{"operationId":"deliverables.public.video","security":[],"tags":["Deliverables"],"summary":"Sign the walkthrough video of a deliverable again","description":"The same access rules as getting the deliverable. The player calls it before the signature expires.","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^dlv_[0-9a-z]{24}$","description":"ID of the deliverable","example":"dlv_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the deliverable","name":"id","in":"path"},{"schema":{"type":"string","description":"The commit whose walkthrough to sign."},"required":false,"description":"The commit whose walkthrough to sign.","name":"video","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/DeliverableVideo"}},"required":["message","success","error","result"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/deliverables/{workspaceId}":{"get":{"operationId":"deliverables.list","tags":["Deliverables"],"summary":"List deliverables","description":"Filter by subjectId to find the deliverable of an autofix (its autofix id) or the analyses of a pull request (its change record id, newest first).","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","enum":["id","type","subjectId","headSha","title","status","visibility","ownerId","threadId","repositoryId","owner","repo","prNumber","created","updated"],"default":"created"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"type","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"subjectId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"headSha","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"status","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"visibility","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"threadId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"repositoryId","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"owner","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"repo","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"prNumber","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Deliverable"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/deliverables/{workspaceId}/{id}":{"patch":{"operationId":"deliverables.patch","tags":["Deliverables"],"summary":"Change who can open a deliverable","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^dlv_[0-9a-z]{24}$","description":"ID of the deliverable","example":"dlv_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the deliverable","name":"id","in":"path"}],"requestBody":{"required":true,"description":"Who can open the deliverable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliverablePatch"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"deliverable":{"$ref":"#/components/schemas/Deliverable"}},"required":["deliverable"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/issues/{workspaceId}/{id}/timeline":{"get":{"operationId":"issues.timeline.list","tags":["Issues"],"summary":"List timeline events for an issue","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^iss_[0-9a-z]{24}$","description":"ID of the issue","example":"iss_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the issue","name":"id","in":"path"},{"schema":{"type":"number","nullable":true,"minimum":0,"description":"Only events at or after this time, as epoch milliseconds","example":1756684800000},"required":false,"description":"Only events at or after this time, as epoch milliseconds","name":"from","in":"query"},{"schema":{"type":"number","nullable":true,"minimum":0,"description":"Only events at or before this time, as epoch milliseconds","example":1756771200000},"required":false,"description":"Only events at or before this time, as epoch milliseconds","name":"to","in":"query"},{"schema":{"type":"string","description":"Comma-separated event types to keep. Any entry outside this list is refused with a 400 naming the accepted types. Accepted: issue.detected, issue.re_detected, issue.severity_changed, issue.triaging, issue.triaged, issue.resolved, issue.investigation_linked, issue.investigation_unlinked, issue.correlated, issue.escalated, investigation.started, investigation.restarted, investigation.held, investigation.skipped, investigation.run_started, investigation.run_completed, autofix.started, autofix.branch_pushed, autofix.pr_opened, autofix.failed, autofix.merged, autofix.closed, note, milestone","example":"issue.triaged,autofix.failed"},"required":false,"description":"Comma-separated event types to keep. Any entry outside this list is refused with a 400 naming the accepted types. Accepted: issue.detected, issue.re_detected, issue.severity_changed, issue.triaging, issue.triaged, issue.resolved, issue.investigation_linked, issue.investigation_unlinked, issue.correlated, issue.escalated, investigation.started, investigation.restarted, investigation.held, investigation.skipped, investigation.run_started, investigation.run_completed, autofix.started, autofix.branch_pushed, autofix.pr_opened, autofix.failed, autofix.merged, autofix.closed, note, milestone","name":"types","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":200,"default":100},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc"},"required":false,"name":"order","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/IssueTimelineEventsList"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/issues/timeline":{"post":{"operationId":"issues.timeline.create","tags":["Issues"],"summary":"Append a user-authored timeline event to an issue","requestBody":{"required":true,"description":"The timeline event to add to an issue","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"issueId":{"type":"string","pattern":"^iss_[0-9a-z]{24}$","description":"ID of the issue","example":"iss_38mg3o4ibc92h8t2efn8csrh"},"type":{"type":"string","enum":["note","milestone"],"description":"User-authored event type"},"at":{"type":"string","nullable":true,"format":"date-time","description":"When the event happened (defaults to now)"},"title":{"type":"string","maxLength":200},"body":{"type":"string","maxLength":5000},"data":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}]}}},"required":["workspaceId","issueId","type"],"additionalProperties":false}}}},"responses":{"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/IssueTimelineEvent"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"issues.timeline.patch","tags":["Issues"],"summary":"Edit a user-authored issue timeline event","requestBody":{"required":true,"description":"Fields to update on a user-authored issue timeline event","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"issueId":{"type":"string","pattern":"^iss_[0-9a-z]{24}$","description":"ID of the issue","example":"iss_38mg3o4ibc92h8t2efn8csrh"},"eventId":{"type":"string","pattern":"^tle_[0-9a-z]{32}$","description":"ID of the timeline_event","example":"tle_d18564pxsvozx979j3532mii2kk7pmw6"},"title":{"type":"string","nullable":true,"maxLength":200},"body":{"type":"string","nullable":true,"maxLength":5000},"data":{"type":"object","nullable":true,"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}]}},"at":{"type":"string","nullable":true,"format":"date-time"},"type":{"type":"string","enum":["note","milestone"]}},"required":["workspaceId","issueId","eventId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/IssueTimelineEvent"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/issues/{workspaceId}/{id}/timeline/{eventId}":{"delete":{"operationId":"issues.timeline.del","tags":["Issues"],"summary":"Delete a user-authored issue timeline event","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^iss_[0-9a-z]{24}$","description":"ID of the issue","example":"iss_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the issue","name":"id","in":"path"},{"schema":{"type":"string","pattern":"^tle_[0-9a-z]{32}$","description":"ID of the timeline event","example":"tle_d18564pxsvozx979j3532mii2kk7pmw6"},"required":true,"description":"ID of the timeline event","name":"eventId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/IssueTimelineEvent"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/issues/{workspaceId}":{"get":{"operationId":"issues.list","tags":["Issues"],"summary":"List issues","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","enum":["polylane","datadog","honeycomb","sentry","cloudwatch","gcp","vercel","axiom","betterstack","openstatus","grafana","logfire","langsmith","braintrust","newrelic","linear","render","railway","cloudflare","github","triggerdev","posthog"]},"required":false,"name":"source","in":"query"},{"schema":{"type":"string","enum":["monitoring","threshold","defect","change_record","alert","automation","manual","exploration","scan","local_agent","trend"]},"required":false,"name":"origin","in":"query"},{"schema":{"type":"string","enum":["infra_node","cloud_account","integration","repository"],"description":"Scope issues to a resource kind"},"required":false,"description":"Scope issues to a resource kind","name":"resourceKind","in":"query"},{"schema":{"type":"string","description":"Scope issues to a specific resource id"},"required":false,"description":"Scope issues to a specific resource id","name":"resourceId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"integrationId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"provider","in":"query"},{"schema":{"type":"string"},"required":false,"name":"account","in":"query"},{"schema":{"type":"string"},"required":false,"name":"region","in":"query"},{"schema":{"type":"string"},"required":false,"name":"nodeType","in":"query"},{"schema":{"type":"string"},"required":false,"name":"checkId","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Only issues with one of these severities. Takes one value, a comma-separated list or a repeated key; prefix a value with '!' to exclude it."},"required":false,"description":"Only issues with one of these severities. Takes one value, a comma-separated list or a repeated key; prefix a value with '!' to exclude it.","name":"severity","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Only issues in one of these statuses. Takes one value, a comma-separated list or a repeated key; prefix a value with '!' to exclude it."},"required":false,"description":"Only issues in one of these statuses. Takes one value, a comma-separated list or a repeated key; prefix a value with '!' to exclude it.","name":"status","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Only issues in these current states, including resolved and not_triaged. Resolution takes precedence over triage. Takes one value, a comma-separated list or a repeated key; prefix a value with '!' to exclude it."},"required":false,"description":"Only issues in these current states, including resolved and not_triaged. Resolution takes precedence over triage. Takes one value, a comma-separated list or a repeated key; prefix a value with '!' to exclude it.","name":"state","in":"query"},{"schema":{"type":"string","enum":["code_defect","flaky_infra","external_client","expected_behavior","config_or_env","unknown"],"description":"Only issues whose latest cause verdict is this class."},"required":false,"description":"Only issues whose latest cause verdict is this class.","name":"causeClass","in":"query"},{"schema":{"type":"string","enum":["low","medium","high"],"description":"Only issues whose cause verdict carries this confidence."},"required":false,"description":"Only issues whose cause verdict carries this confidence.","name":"causeConfidence","in":"query"},{"schema":{"type":"string","description":"Only issues delegated to this parent issue — its duplicate group."},"required":false,"description":"Only issues delegated to this parent issue — its duplicate group.","name":"duplicateOfIssueId","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Exclude issues delegated to a parent issue as duplicates."},"required":false,"description":"Exclude issues delegated to a parent issue as duplicates.","name":"excludeDuplicates","in":"query"},{"schema":{"type":"integer","nullable":true,"description":"Only issues detected at or after this epoch millisecond."},"required":false,"description":"Only issues detected at or after this epoch millisecond.","name":"since","in":"query"},{"schema":{"type":"integer","nullable":true,"description":"Only issues detected at or before this epoch millisecond."},"required":false,"description":"Only issues detected at or before this epoch millisecond.","name":"until","in":"query"},{"schema":{"type":"integer","nullable":true,"description":"Only issues last seen at or after this epoch millisecond."},"required":false,"description":"Only issues last seen at or after this epoch millisecond.","name":"seenSince","in":"query"},{"schema":{"type":"integer","nullable":true,"description":"Only issues last seen before this epoch millisecond."},"required":false,"description":"Only issues last seen before this epoch millisecond.","name":"seenBefore","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Include archived issues. Every list leaves them out unless asked."},"required":false,"description":"Include archived issues. Every list leaves them out unless asked.","name":"includeArchived","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500},"required":false,"name":"limit","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"required":false,"name":"active","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Only unresolved issues whose automatic investigation is currently held back and has not been started."},"required":false,"description":"Only unresolved issues whose automatic investigation is currently held back and has not been started.","name":"held","in":"query"},{"schema":{"type":"string","maxLength":48,"description":"Case-insensitive title substring. Search is applied before pagination and counting."},"required":false,"description":"Case-insensitive title substring. Search is applied before pagination and counting.","name":"search","in":"query"},{"schema":{"type":"string","enum":["id","source","origin","originId","externalId","integrationId","checkId","checkRunId","resourceKind","resourceId","provider","account","region","nodeType","title","sourceSeverity","sourceStatus","severity","status","investigationThreadId","fingerprint","occurrenceCount","detectedAt","lastSeenAt","metricsComputedAt","triagedAt","resolvedAt"],"description":"Sort column. Providing any of orderBy/order/page/perPage switches to paged mode."},"required":false,"description":"Sort column. Providing any of orderBy/order/page/perPage switches to paged mode.","name":"orderBy","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"order","in":"query"},{"schema":{"type":"integer","minimum":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"perPage","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Issue"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/issues/search":{"post":{"operationId":"issues.search","tags":["Issues"],"summary":"Search issues","description":"Title matches first, then content matches by relevance; every result passes the filters.","parameters":[{"schema":{"type":"string","enum":["polylane","datadog","honeycomb","sentry","cloudwatch","gcp","vercel","axiom","betterstack","openstatus","grafana","logfire","langsmith","braintrust","newrelic","linear","render","railway","cloudflare","github","triggerdev","posthog"]},"required":false,"name":"source","in":"query"},{"schema":{"type":"string","enum":["monitoring","threshold","defect","change_record","alert","automation","manual","exploration","scan","local_agent","trend"]},"required":false,"name":"origin","in":"query"},{"schema":{"type":"string","enum":["infra_node","cloud_account","integration","repository"],"description":"Scope issues to a resource kind"},"required":false,"description":"Scope issues to a resource kind","name":"resourceKind","in":"query"},{"schema":{"type":"string","description":"Scope issues to a specific resource id"},"required":false,"description":"Scope issues to a specific resource id","name":"resourceId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"integrationId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"provider","in":"query"},{"schema":{"type":"string"},"required":false,"name":"account","in":"query"},{"schema":{"type":"string"},"required":false,"name":"region","in":"query"},{"schema":{"type":"string"},"required":false,"name":"nodeType","in":"query"},{"schema":{"type":"string"},"required":false,"name":"checkId","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Only issues with one of these severities. Takes one value, a comma-separated list or a repeated key; prefix a value with '!' to exclude it."},"required":false,"description":"Only issues with one of these severities. Takes one value, a comma-separated list or a repeated key; prefix a value with '!' to exclude it.","name":"severity","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Only issues in one of these statuses. Takes one value, a comma-separated list or a repeated key; prefix a value with '!' to exclude it."},"required":false,"description":"Only issues in one of these statuses. Takes one value, a comma-separated list or a repeated key; prefix a value with '!' to exclude it.","name":"status","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Only issues in these current states, including resolved and not_triaged. Resolution takes precedence over triage. Takes one value, a comma-separated list or a repeated key; prefix a value with '!' to exclude it."},"required":false,"description":"Only issues in these current states, including resolved and not_triaged. Resolution takes precedence over triage. Takes one value, a comma-separated list or a repeated key; prefix a value with '!' to exclude it.","name":"state","in":"query"},{"schema":{"type":"string","enum":["code_defect","flaky_infra","external_client","expected_behavior","config_or_env","unknown"],"description":"Only issues whose latest cause verdict is this class."},"required":false,"description":"Only issues whose latest cause verdict is this class.","name":"causeClass","in":"query"},{"schema":{"type":"string","enum":["low","medium","high"],"description":"Only issues whose cause verdict carries this confidence."},"required":false,"description":"Only issues whose cause verdict carries this confidence.","name":"causeConfidence","in":"query"},{"schema":{"type":"string","description":"Only issues delegated to this parent issue — its duplicate group."},"required":false,"description":"Only issues delegated to this parent issue — its duplicate group.","name":"duplicateOfIssueId","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Exclude issues delegated to a parent issue as duplicates."},"required":false,"description":"Exclude issues delegated to a parent issue as duplicates.","name":"excludeDuplicates","in":"query"},{"schema":{"type":"integer","nullable":true,"description":"Only issues detected at or after this epoch millisecond."},"required":false,"description":"Only issues detected at or after this epoch millisecond.","name":"since","in":"query"},{"schema":{"type":"integer","nullable":true,"description":"Only issues detected at or before this epoch millisecond."},"required":false,"description":"Only issues detected at or before this epoch millisecond.","name":"until","in":"query"},{"schema":{"type":"integer","nullable":true,"description":"Only issues last seen at or after this epoch millisecond."},"required":false,"description":"Only issues last seen at or after this epoch millisecond.","name":"seenSince","in":"query"},{"schema":{"type":"integer","nullable":true,"description":"Only issues last seen before this epoch millisecond."},"required":false,"description":"Only issues last seen before this epoch millisecond.","name":"seenBefore","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Include archived issues. Every list leaves them out unless asked."},"required":false,"description":"Include archived issues. Every list leaves them out unless asked.","name":"includeArchived","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"required":false,"name":"active","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Only unresolved issues whose automatic investigation is currently held back and has not been started."},"required":false,"description":"Only unresolved issues whose automatic investigation is currently held back and has not been started.","name":"held","in":"query"}],"requestBody":{"required":true,"description":"What to search issues for","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"prompt":{"type":"string","minLength":1,"maxLength":500,"description":"Text to match against each issue's indexed title and evidence."}},"required":["workspaceId","prompt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"array","items":{"$ref":"#/components/schemas/Issue"}}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/issues/{workspaceId}/stats":{"get":{"operationId":"issues.stats","tags":["Issues"],"summary":"Aggregate issue counts over a window (detected, resolved)","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"number","nullable":true},"required":false,"name":"from","in":"query"},{"schema":{"type":"number","nullable":true},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"detected":{"type":"number"},"detectedPrev":{"type":"number"},"resolved":{"type":"number"},"resolvedPrev":{"type":"number"},"daily":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"count":{"type":"number"}},"required":["date","count"]}},"resolvedDaily":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"count":{"type":"number"}},"required":["date","count"]}},"topResources":{"type":"array","items":{"type":"object","properties":{"resourceKind":{"type":"string"},"resourceId":{"type":"string"},"provider":{"type":"string","nullable":true},"account":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"nodeType":{"type":"string","nullable":true},"count":{"type":"number"},"worstSeverity":{"type":"string"}},"required":["resourceKind","resourceId","provider","account","region","nodeType","count","worstSeverity"]}}},"required":["detected","detectedPrev","resolved","resolvedPrev","daily","resolvedDaily","topResources"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/issues/investigate":{"post":{"operationId":"issues.investigate","tags":["Issues"],"summary":"Start a fix run on an issue","description":"Starts the issue's fix run thread, or sends the ask to the thread the issue already has (deduped: true), whether its last run is live or ended. An issue has one fix run thread.","requestBody":{"required":true,"description":"The issue to investigate","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","enum":["api","console_issue_page","console_issue_actions","console_scoped_problems","console_lineage","console_github_callout","console_fix_run_outcome","slack_incident_card"],"description":"The requesting surface. Omitted requests are attributed to the API. This is caller-reported attribution, not authorization."},"workspaceId":{"type":"string","description":"Workspace id"},"issueId":{"type":"string","description":"Issue id to investigate"}},"required":["workspaceId","issueId"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/InvestigateIssueResponse"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/issues/archive":{"post":{"operationId":"issues.archive","tags":["Issues"],"summary":"Archive issues","description":"Archived issues keep their history and leave every list; the daily retention sweep archives settled issues on its own after 30 days.","requestBody":{"required":true,"description":"The issues to archive, by id or by age within a scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveIssuesRequest"}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/ArchiveIssuesResponse"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/issues/{workspaceId}/{id}/links":{"get":{"operationId":"issues.links","tags":["Issues"],"summary":"Get the correlation cluster (linked duplicate/related issues) for an issue","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^iss_[0-9a-z]{24}$","description":"ID of the issue","example":"iss_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the issue","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"issueId":{"type":"string"},"issueIds":{"type":"array","items":{"type":"string"}},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string"},"target":{"type":"string"},"relationship":{"type":"string"},"confidence":{"type":"number"},"rationale":{"type":"string","nullable":true},"method":{"type":"string"},"occurrence":{"type":"number"},"createdAt":{"type":"number"}},"required":["id","source","target","relationship","confidence","rationale","method","occurrence","createdAt"]}},"issues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"severity":{"type":"string"},"status":{"type":"string"},"resolvedAt":{"type":"number","nullable":true},"resourceKind":{"type":"string","nullable":true},"resourceId":{"type":"string","nullable":true},"provider":{"type":"string","nullable":true},"account":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"nodeType":{"type":"string","nullable":true}},"required":["id","title","severity","status","resolvedAt","resourceKind","resourceId","provider","account","region","nodeType"]}}},"required":["issueId","issueIds","links","issues"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/issues/{workspaceId}/{id}/dispositions":{"get":{"operationId":"issues.dispositions","tags":["Issues"],"summary":"List the recorded action decisions for an issue","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^iss_[0-9a-z]{24}$","description":"ID of the issue","example":"iss_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the issue","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/IssueDispositionsListResult"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/issues/{workspaceId}/{id}":{"get":{"operationId":"issues.get","tags":["Issues"],"summary":"Get an issue","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^iss_[0-9a-z]{24}$","description":"ID of the issue","example":"iss_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the issue","name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"description":"Return metrics/logs/traces/analysis for this occurrence (1 = first). Defaults to the most recent."},"required":false,"description":"Return metrics/logs/traces/analysis for this occurrence (1 = first). Defaults to the most recent.","name":"occurrence","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/IssueWithDetails"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"issues.patch","tags":["Issues"],"summary":"Update an issue's status or severity","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^iss_[0-9a-z]{24}$","description":"ID of the issue","example":"iss_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the issue","name":"id","in":"path"}],"requestBody":{"required":true,"description":"Fields to update on an issue","content":{"application/json":{"schema":{"type":"object","properties":{"severity":{"type":"string","enum":["critical","high","medium","low","info"]},"status":{"type":"string","enum":["new","triaging","confirmed","dismissed","failed","skipped"]},"resolved":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Issue"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"issues.del","tags":["Issues"],"summary":"Delete an issue","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^iss_[0-9a-z]{24}$","description":"ID of the issue","example":"iss_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the issue","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^iss_[0-9a-z]{24}$","description":"ID of the issue","example":"iss_38mg3o4ibc92h8t2efn8csrh"},"_object":{"type":"string","enum":["issue"]}},"required":["id","_object"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/issue_triage_rules/{workspaceId}":{"get":{"operationId":"issue-triage-rules.list","tags":["Issues"],"summary":"List provider alert rules and their issue triage state","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"integrationId","in":"query"},{"schema":{"type":"string","enum":["integration","cloud_account"]},"required":true,"name":"kind","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/IssueTriageRulesListResult"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"issue-triage-rules.patch","tags":["Issues"],"summary":"Toggle automatic issue triage for a connection or an alert rule","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"}],"requestBody":{"required":true,"description":"Toggle automatic triage for a whole connection (root) or a single rule","content":{"application/json":{"schema":{"type":"object","properties":{"integrationId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["integration","cloud_account"]},"scope":{"type":"string","enum":["root","rule"]},"ruleExternalId":{"type":"string","minLength":1},"enabled":{"type":"boolean"}},"required":["integrationId","kind","scope","enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/IssueTriagePatchResult"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/issue_fingerprint_suppressions/{workspaceId}":{"get":{"operationId":"issue-fingerprint-suppressions.list","tags":["Issues"],"summary":"List suppressed alert signatures and their state","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"required":false,"name":"active","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/IssueFingerprintSuppressionsListResult"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"issue-fingerprint-suppressions.patch","tags":["Issues"],"summary":"Suppress or lift suppression for one alert signature","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"}],"requestBody":{"required":true,"description":"Suppress or lift suppression for one alert fingerprint","content":{"application/json":{"schema":{"type":"object","properties":{"fingerprint":{"type":"string","minLength":1},"suppressed":{"type":"boolean"},"issueId":{"type":"string"},"causeClass":{"type":"string","enum":["code_defect","flaky_infra","external_client","expected_behavior","config_or_env","unknown"]},"explanation":{"type":"string","maxLength":4000}},"required":["fingerprint","suppressed"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/IssueFingerprintSuppression"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/issue_dispositions/{workspaceId}":{"get":{"operationId":"issue-dispositions.list","tags":["Issues"],"summary":"List recorded action decisions across the workspace, newest first","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Only decisions recorded against this alert signature."},"required":false,"description":"Only decisions recorded against this alert signature.","name":"fingerprint","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/IssueDispositionsListResult"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/issue_flaky_fingerprints/{workspaceId}":{"get":{"operationId":"issue-flaky-fingerprints.list","tags":["Issues"],"summary":"List alert signatures tracked as flaky, most recently flaky first","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Only the tracking row for this alert signature."},"required":false,"description":"Only the tracking row for this alert signature.","name":"fingerprint","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/IssueFlakyFingerprintsListResult"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/checks/list":{"post":{"operationId":"checks.list","tags":["Anomaly checks"],"summary":"List anomaly check runs for a scope","requestBody":{"required":true,"description":"Scope and filters for the check runs to list","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","description":"ID of the workspace"},"resourceKind":{"type":"string","enum":["infra_node","cloud_account","integration"],"description":"Scope kind the check runs belong to"},"resourceId":{"type":"string","description":"Id of the scoped resource, cloud account, or integration"},"provider":{"type":"string"},"account":{"type":"string"},"region":{"type":"string"},"nodeType":{"type":"string"},"includeStable":{"type":"boolean","description":"Include runs where no active evaluation happened (default true)"},"since":{"type":"integer"},"until":{"type":"integer"},"limit":{"type":"integer","minimum":1,"maximum":1000}},"required":["workspaceId","resourceKind","resourceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CheckRun"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/checks/{workspaceId}/stats":{"get":{"operationId":"checks.stats","tags":["Anomaly Checks"],"summary":"Workspace-wide check-run counts over a window (total, healthy, stable, breached)","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"number","nullable":true},"required":false,"name":"from","in":"query"},{"schema":{"type":"number","nullable":true},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"total":{"type":"number"},"healthy":{"type":"number"},"stable":{"type":"number"},"breached":{"type":"number"},"resourcesChecked":{"type":"number"},"breaches":{"type":"array","items":{"type":"object","properties":{"resourceKind":{"type":"string"},"resourceId":{"type":"string"},"provider":{"type":"string","nullable":true},"account":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"nodeType":{"type":"string","nullable":true},"issueId":{"type":"string","nullable":true},"executedAt":{"type":"number"}},"required":["resourceKind","resourceId","provider","account","region","nodeType","issueId","executedAt"]}},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"resourceKind":{"type":"string","enum":["infra_node","cloud_account","integration"]},"resourceId":{"type":"string"},"provider":{"type":"string","nullable":true},"account":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"nodeType":{"type":"string","nullable":true},"status":{"type":"string","enum":["healthy","breached","stable"]},"checkRunId":{"type":"string","nullable":true},"issueId":{"type":"string","nullable":true},"executedAt":{"type":"number"}},"required":["id","resourceKind","resourceId","provider","account","region","nodeType","status","checkRunId","issueId","executedAt"]},"description":"Individual check runs in the window, oldest first, capped at 500"}},"required":["total","healthy","stable","breached","resourcesChecked","breaches","items"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/checks/get":{"post":{"operationId":"checks.get","tags":["Anomaly checks"],"summary":"Get an anomaly check run","requestBody":{"required":true,"description":"Scope and id of the check run to fetch","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","description":"ID of the workspace"},"resourceKind":{"type":"string","enum":["infra_node","cloud_account","integration"],"description":"Scope kind the check runs belong to"},"resourceId":{"type":"string","description":"Id of the scoped resource, cloud account, or integration"},"provider":{"type":"string"},"account":{"type":"string"},"region":{"type":"string"},"nodeType":{"type":"string"},"id":{"type":"string","description":"ID of the check_run"}},"required":["workspaceId","resourceKind","resourceId","id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/CheckRunWithSignals"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/checks/trigger":{"post":{"operationId":"checks.trigger","tags":["Anomaly checks"],"summary":"Trigger a new anomaly check evaluation for a scope","requestBody":{"required":true,"description":"Scope to evaluate now","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","description":"ID of the workspace"},"resourceKind":{"type":"string","enum":["infra_node","cloud_account","integration"],"description":"Scope kind the check runs belong to"},"resourceId":{"type":"string","description":"Id of the scoped resource, cloud account, or integration"},"provider":{"type":"string"},"account":{"type":"string"},"region":{"type":"string"},"nodeType":{"type":"string"}},"required":["workspaceId","resourceKind","resourceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/CheckRunTriggerResult"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/lineage/{workspaceId}":{"get":{"operationId":"lineage.get","tags":["Issues"],"summary":"Get the lineage of an issue, investigation, autofix, or pull request","description":"Returns the chain around any entity in it: origin, issue, investigation, autofix, and pull request, plus the issue's escalations. An issue's origin can be a check, an alert, a change, or an exploration thread. A pr_change_record anchor resolves its own chain (analyzed pull request, record, review thread, autofix, pull request), and an autofix anchor resolves whichever origin it has (issue, investigation, pull request analysis record, chat thread, or connected repository).","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","enum":["check_run","issue","thread","autofix","pull_request","escalation","pr_change_record"],"description":"Which chain entity the id refers to"},"required":true,"description":"Which chain entity the id refers to","name":"entity","in":"query"},{"schema":{"type":"string","description":"Id of the entity (required unless entity is pull_request)"},"required":false,"description":"Id of the entity (required unless entity is pull_request)","name":"id","in":"query"},{"schema":{"type":"string","description":"Repository owner (pull_request only)"},"required":false,"description":"Repository owner (pull_request only)","name":"owner","in":"query"},{"schema":{"type":"string","description":"Repository name (pull_request only)"},"required":false,"description":"Repository name (pull_request only)","name":"repo","in":"query"},{"schema":{"type":"integer","nullable":true,"description":"Pull request number (pull_request only)"},"required":false,"description":"Pull request number (pull_request only)","name":"prNumber","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Lineage"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Service Unavailable"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/escalations/{workspaceId}":{"get":{"operationId":"escalations.list","tags":["Escalations"],"summary":"List escalations","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","enum":["id","source","kind","headline","count","firstAt","lastAt","clearedAt","clearedBy"],"default":"lastAt"},"required":false,"name":"orderBy","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"perPage","in":"query"},{"schema":{"type":"number","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"type":"string","enum":["open","cleared","all"],"default":"all"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","description":"Case-insensitive substring match against headline, detail, and kind."},"required":false,"description":"Case-insensitive substring match against headline, detail, and kind.","name":"search","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"id","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"source","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"kind","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"severity","in":"query"},{"schema":{"$ref":"#/components/schemas/ListFilter"},"required":false,"name":"nodeIds","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Escalation"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/escalations/{workspaceId}/{id}":{"get":{"operationId":"escalations.get","tags":["Escalations"],"summary":"Get an escalation","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^ask_[0-9a-z]{24}$","description":"ID of the escalation","example":"ask_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the escalation","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Escalation"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"patch":{"operationId":"escalations.patch","tags":["Escalations"],"summary":"Update the fields of an escalation, including clearing or reopening it","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^ask_[0-9a-z]{24}$","description":"ID of the escalation","example":"ask_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the escalation","name":"id","in":"path"}],"requestBody":{"required":true,"description":"The escalation properties to update","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","minLength":1},"headline":{"type":"string","minLength":1},"detail":{"type":"string","nullable":true},"action":{"type":"string","nullable":true,"minLength":1},"cleared":{"type":"boolean","description":"true clears the escalation (it stops suppressing and leaves the open list); false reopens it"},"addNodeIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":20,"description":"Resources to add to the escalation, as node ids in any spelling; one it already concerns is left as is"},"removeNodeIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":20,"description":"Resources to remove from the escalation, as node ids in any spelling; a later occurrence on that resource adds it again"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Escalation"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Conflict"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}},"delete":{"operationId":"escalations.del","tags":["Escalations"],"summary":"Delete an escalation","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^ask_[0-9a-z]{24}$","description":"ID of the escalation","example":"ask_38mg3o4ibc92h8t2efn8csrh"},"required":true,"description":"ID of the escalation","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"id":{"type":"string","pattern":"^ask_[0-9a-z]{24}$","description":"ID of the escalation","example":"ask_38mg3o4ibc92h8t2efn8csrh"},"_object":{"type":"string","enum":["escalation"]}},"required":["id","_object"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/escalations":{"post":{"operationId":"escalations.post","tags":["Escalations"],"summary":"Create an escalation","requestBody":{"required":true,"description":"The escalation to create","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"source":{"type":"string","enum":["investigation","triage","automation","credentials","connect","autofix"]},"kind":{"type":"string","minLength":1},"headline":{"type":"string","minLength":1},"detail":{"type":"string","nullable":true},"action":{"type":"string","nullable":true,"minLength":1},"dedupeKey":{"type":"string","nullable":true},"ref":{"type":"object","properties":{"issueId":{"type":"string","example":"iss_38mg3o4ibc92h8t2efn8csrh"},"threadId":{"type":"string","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"integrationId":{"type":"string","example":"int_34gky74ibc92h8t2efn8csrh"}},"additionalProperties":false},"nodeIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":20,"description":"The resources the escalation concerns, as node ids in any spelling another Polylane tool returned. Left out, it takes the resource of the issue its ref names."}},"required":["workspaceId","source","kind","headline"],"additionalProperties":false}}}},"responses":{"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Resource created"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Escalation"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/signals/{workspaceId}":{"get":{"operationId":"signals.list","tags":["Signals"],"summary":"List the signals Polylane monitors for the workspace: provider queries on each cloud account or integration, written against the telemetry it carries","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","description":"Only the signals of this cloud account or integration"},"required":false,"description":"Only the signals of this cloud account or integration","name":"connectionId","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Signal"}},"count":{"type":"number","minimum":0,"description":"Number of items available"}},"required":["items","count"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"429":{"description":"Slow down","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Slow down"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/signal_discovery/{workspaceId}":{"get":{"operationId":"signals.discovery.get","tags":["Signals"],"summary":"When signal discovery last started and last finished for the workspace","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/SignalDiscoveryStatus"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"429":{"description":"Slow down","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Slow down"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/signal_discovery":{"post":{"operationId":"signals.discovery.start","tags":["Signals"],"summary":"Discover the workspace's signals now","requestBody":{"required":true,"description":"The workspace to discover signals for","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/SignalDiscoveryStart"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"429":{"description":"Slow down","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Slow down"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/signals/{workspaceId}/{id}":{"get":{"operationId":"signals.get","tags":["Signals"],"summary":"Get one signal with its query and why it matters","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","pattern":"^sig_[a-z0-9]{8,40}$","description":"The signal's id","example":"sig_0a1b2c3d4e5f"},"required":true,"description":"The signal's id","name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Signal"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"429":{"description":"Slow down","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Slow down"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/billing/subscriptions/{id}":{"get":{"operationId":"billing.subscriptions.get","tags":["Billing"],"summary":"Get the subscription for a workspace","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/Subscription"}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/billing/checkout":{"post":{"operationId":"billing.checkout.create","tags":["Billing"],"summary":"Create a Stripe Checkout session","x-polylane-banned-from":["private","autofix","fix_run"],"requestBody":{"required":true,"description":"Checkout session inputs.","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"plan":{"type":"string","enum":["starter","team","business","scale","premium","ultimate"]},"billingCycle":{"type":"string","enum":["monthly","annual"]},"enableOverage":{"type":"boolean","default":false},"successUrl":{"type":"string","maxLength":2048,"description":"Loopback URL Stripe returns to after payment (CLI flows). Requires cancelUrl."},"cancelUrl":{"type":"string","maxLength":2048,"description":"Loopback URL Stripe returns to when the customer backs out (CLI flows). Requires successUrl."},"returnTo":{"type":"string","enum":["onboarding/github","onboarding/slack","onboarding/cloud"],"description":"Workspace page Stripe returns to instead of the billing page, for a checkout started during onboarding.","example":"onboarding/github"},"source":{"type":"string","maxLength":64,"description":"The surface the upgrade started from, as a dotted slug such as console.plan_limit_banner.","example":"console.upgrade_modal"},"dimension":{"type":"string","maxLength":64,"description":"The plan limit that led to the upgrade, such as maxNormalizedTokens.","example":"maxNormalizedTokens"}},"required":["workspaceId","plan","billingCycle"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/billing/portal":{"post":{"operationId":"billing.portal.create","tags":["Billing"],"summary":"Create a Stripe billing portal session","x-polylane-banned-from":["private","autofix","fix_run"],"requestBody":{"required":true,"description":"Portal session inputs.","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}},"required":["message","success","error","result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/public/billing/plans":{"get":{"operationId":"billing.plans.list","tags":["Billing"],"summary":"List all billing plans and overage policy","security":[],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/PlanCatalog"}},"required":["message","success","error","result"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/billing/change-plan":{"post":{"operationId":"billing.change_plan.create","tags":["Billing"],"summary":"Change the workspace subscription plan in place","x-polylane-banned-from":["private","autofix","fix_run"],"requestBody":{"required":true,"description":"In-place plan change for an existing subscription.","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"newPlan":{"type":"string","enum":["starter","team","business","scale","premium","ultimate"]},"newBillingCycle":{"type":"string","enum":["monthly","annual"]},"source":{"type":"string","maxLength":64,"description":"The surface the plan change started from, as a dotted slug such as console.billing_page.","example":"console.upgrade_page"},"dimension":{"type":"string","maxLength":64,"description":"The plan limit that led to the change, such as maxNormalizedTokens.","example":"maxNormalizedTokens"}},"required":["workspaceId","newPlan","newBillingCycle"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"plan":{"type":"string","enum":["free","starter","team","business","scale","premium","ultimate","enterprise"]},"billingCycle":{"type":"string","enum":["monthly","annual"]},"currentPeriodEnd":{"type":"number","nullable":true},"status":{"type":"string","enum":["applied","payment_required"],"description":"applied: the plan is paid for and takes effect. payment_required: the upgrade waits on its invoice; the workspace keeps its current plan until the invoice is paid."},"invoiceUrl":{"type":"string","nullable":true,"description":"Stripe's hosted page for the invoice that completes a payment_required upgrade."}},"required":["plan","billingCycle","currentPeriodEnd","status","invoiceUrl"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/billing/upgrade-intents":{"post":{"operationId":"billing.upgrade_intents.create","tags":["Billing"],"summary":"Record where a member was prompted to upgrade","x-polylane-banned-from":["private","autofix","fix_run"],"requestBody":{"required":true,"description":"An upgrade prompt or plan picker view to attribute a later upgrade to.","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"kind":{"type":"string","enum":["prompt_shown","page_viewed"],"description":"prompt_shown when an upgrade prompt opened, page_viewed when the plan picker rendered."},"source":{"type":"string","maxLength":64,"description":"The surface the prompt or page was reached from, as a dotted slug such as console.plan_limit_banner.","example":"console.upgrade_modal"},"dimension":{"type":"string","maxLength":64,"description":"The plan limit that triggered it, such as maxNormalizedTokens, or unknown.","example":"maxNormalizedTokens"},"current":{"type":"number","description":"Usage on the dimension when the prompt opened."},"limit":{"type":"number","description":"The plan limit on the dimension when the prompt opened."},"requiredPlan":{"type":"string","maxLength":32,"description":"The plan the prompt named as the one that lifts the limit."}},"required":["workspaceId","kind","source","dimension"]}}}},"responses":{"202":{"description":"Request accepted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Request accepted"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"type":"object","properties":{"kind":{"type":"string","enum":["prompt_shown","page_viewed"]},"source":{"type":"string"},"dimension":{"type":"string"}},"required":["kind","source","dimension"]}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/agent_tools/{workspaceId}":{"get":{"operationId":"agent_tools.search","tags":["Agent Tools"],"summary":"Discover agent tools available to the workspace and fetch their schemas","parameters":[{"schema":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"required":true,"description":"ID of the workspace","name":"workspaceId","in":"path"},{"schema":{"type":"string","description":"Keywords to search tool names, summaries, and descriptions"},"required":false,"description":"Keywords to search tool names, summaries, and descriptions","name":"query","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":25,"description":"Maximum number of tools to return (1-25, default 10)"},"required":false,"description":"Maximum number of tools to return (1-25, default 10)","name":"limit","in":"query"}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/AgentToolSearchResult"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Payment Required"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"429":{"description":"Slow down","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Slow down"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/agent_tools/run":{"post":{"operationId":"agent_tools.run","tags":["Agent Tools"],"summary":"Run an agent tool by name","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","description":"Workspace id"},"toolName":{"type":"string","description":"Exact tool name from the search results"},"params":{"type":"object","additionalProperties":{"nullable":true},"description":"The tool's arguments, per its schema"}},"required":["workspaceId","toolName"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/AgentToolRunResult"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Payment Required"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"429":{"description":"Slow down","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Slow down"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}},"/v1/agent_tools/run_code":{"post":{"operationId":"agent_tools.run_code","tags":["Agent Tools"],"summary":"Run TypeScript against the agent tools namespace in one call","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","description":"Workspace id"},"code":{"type":"string","description":"Parameterless async arrow calling tools.<name>(args) and returning a result"}},"required":["workspaceId","code"]}}}},"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"message":{"type":"string","enum":["Successful request"]}},"required":["message"]},"success":{"type":"boolean","enum":[true]},"error":{"nullable":true},"result":{"$ref":"#/components/schemas/AgentToolRunResult"}},"required":["message","success","error","result"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Bad Request"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Payment Required"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Forbidden"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Not found"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"429":{"description":"Slow down","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Slow down"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","enum":["Internal error"]},"detail":{"type":"string"}},"required":["message"]},"success":{"type":"boolean","enum":[false]},"message":{"nullable":true}},"required":["error","success","message"]}}}}}}}},"components":{"schemas":{"User":{"type":"object","properties":{"id":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"source":{"type":"string","enum":["google","email","github","cli"]},"githubId":{"type":"string","nullable":true},"googleId":{"type":"string","nullable":true},"forename":{"type":"string","example":"John"},"username":{"type":"string","example":"johndoe"},"surname":{"type":"string","nullable":true,"example":"Doe"},"email":{"type":"string","format":"email"},"domain":{"type":"string","minLength":3,"example":"gmail.com"},"personal":{"type":"boolean"},"emailVerified":{"type":"boolean"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["user"]}},"required":["id","source","githubId","googleId","forename","username","surname","email","domain","personal","emailVerified","created","updated","_object"],"additionalProperties":false},"ListFilter":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"A filter parameter takes one value for an exact match, or a list that matches any of its values (OR). Prefix a value with '!' to exclude it.","x-polylane-list-filter":{"match":"any","negationPrefix":"!"}},"UserEnrichmentWithDossier":{"allOf":[{"$ref":"#/components/schemas/UserEnrichment"},{"type":"object","nullable":true,"properties":{"dossier":{"type":"string","nullable":true,"description":"The full markdown dossier for this enrichment run"}},"required":["dossier"],"additionalProperties":false}]},"UserEnrichment":{"type":"object","properties":{"id":{"type":"string","pattern":"^uenr_[0-9a-z]{24}$","description":"ID of the user_enrichment","example":"uenr_38mg3o4ibc92h8t2efn8csrh"},"userId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$"},"status":{"type":"string","enum":["queued","running","complete","failed"]},"trigger":{"type":"string","enum":["signup","manual","refresh","backfill"]},"additionalContext":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"error":{"type":"string","nullable":true},"role":{"type":"string","nullable":true},"seniority":{"type":"string","nullable":true,"enum":["founder","exec","lead","ic","student","unknown",null]},"persona":{"type":"string","nullable":true,"enum":["pete-the-indie-hacker","max-the-product-engineer","laura-the-founding-cto","marcus-the-platform-engineer","unknown",null]},"companyName":{"type":"string","nullable":true},"companyUrl":{"type":"string","nullable":true},"companySize":{"type":"string","nullable":true},"companyStage":{"type":"string","nullable":true,"enum":["bootstrap","pre_seed","seed","series_a_plus","public","unknown",null]},"industry":{"type":"string","nullable":true},"icpFit":{"type":"number","nullable":true},"expansionScore":{"type":"number","nullable":true},"buyingRole":{"type":"string","nullable":true,"enum":["economic_buyer","champion","influencer","end_user","unknown",null]},"revOpportunity":{"type":"string","nullable":true,"enum":["free","solo_paid","team","scale","enterprise",null]},"revEstimate":{"type":"number","nullable":true},"teamSizeEstimate":{"type":"number","nullable":true},"paysForTools":{"type":"array","nullable":true,"items":{"type":"string"}},"suggestedIntegrations":{"type":"array","nullable":true,"items":{"type":"string"}},"expansionTriggers":{"type":"array","nullable":true,"items":{"type":"string"}},"outreachTiming":{"type":"string","nullable":true,"enum":["now","within_week","within_month","on_trigger","nurture",null]},"outreachAngle":{"type":"string","nullable":true},"confidence":{"type":"string","nullable":true,"enum":["low","medium","high",null]},"stack":{"type":"array","nullable":true,"items":{"type":"string"}},"primaryCloud":{"type":"string","nullable":true,"enum":["aws","gcp","azure","cloudflare","vercel","fly","render","planetscale","supabase","modal","kubernetes","other","unknown",null]},"sources":{"type":"array","nullable":true,"items":{"type":"string"}},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"completed":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","userId","status","trigger","additionalContext","model","error","role","seniority","persona","companyName","companyUrl","companySize","companyStage","industry","icpFit","expansionScore","buyingRole","revOpportunity","revEstimate","teamSizeEstimate","paysForTools","suggestedIntegrations","expansionTriggers","outreachTiming","outreachAngle","confidence","stack","primaryCloud","sources","created","updated","completed"],"additionalProperties":false},"Notification Settings":{"type":"object","properties":{"preferences":{"type":"object","additionalProperties":{"type":"object","properties":{"web":{"type":"boolean"},"email":{"type":"boolean"},"slack":{"type":"boolean"}},"required":["web","email"],"additionalProperties":false}},"globalChannels":{"type":"object","properties":{"web":{"type":"boolean","description":"Receive notifications via the web console"},"email":{"type":"boolean","description":"Receive notifications via email"}},"required":["web","email"],"additionalProperties":false},"updates":{"type":"object","properties":{"digest":{"type":"boolean","description":"Receive weekly digest"},"product":{"type":"boolean","description":"Receive product updates"},"security":{"type":"boolean","description":"Receive security updates"}},"required":["digest","product","security"],"additionalProperties":false}},"required":["preferences","globalChannels","updates"],"additionalProperties":false},"User Profile":{"type":"object","nullable":true,"properties":{"role":{"type":"object","properties":{"id":{"type":"string","enum":["content_creator","researcher","student","knowledge_worker","entrepreneur","designer","developer","marketer","consultant","journalist","librarian","educator","other"]},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},"origin":{"type":"object","properties":{"id":{"type":"string","enum":["producthunt","friend_colleague","twitter","linkedin","reddit","hacker_news","youtube","podcast","blog_article","search","ai_recommendation","newsletter","conference_event","chrome_extension_store","other"]},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},"objective":{"type":"object","properties":{"id":{"type":"string","enum":["research_organization","content_curation","knowledge_management","team_collaboration","ai_discovery","reading_list","project_resources","competitive_intelligence","learning_development","replace_browser_bookmarks","content_planning","other"]},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false}},"required":["role","origin","objective"],"additionalProperties":false},"User Instructions":{"type":"object","properties":{"instructions":{"type":"string","maxLength":10000}},"required":["instructions"],"additionalProperties":false},"Api Key":{"type":"object","properties":{"id":{"type":"string","pattern":"^(?:polylane|nominal)_[0-9a-z]{64}$","description":"ID of the api_key","example":"polylane_hciswovf778y8r43gby4n332ey4u1oa9tjsnnxrmdncd7oaotb7vy7tpi97hyg2u"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"ownerId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"name":{"type":"string","minLength":4,"maxLength":256,"description":"Name of the API key"},"scopes":{"type":"array","items":{"type":"string","enum":["workspaces:read","workspaces:write","workspaces:delete","workspace_members:read","workspace_members:write","workspace_members:delete","billing:read","billing:write","subscriptions:read","subscriptions:write","subscriptions:purchase","threads:read","threads:write","threads:delete","repositories:read","repositories:write","repositories:delete","ratings:write","messages:read","messages:write","messages:delete","integrations:read","integrations:write","integrations:delete","cloud_accounts:read","cloud_accounts:write","cloud_accounts:delete","memories:read","memories:write","memories:delete","cloud_infra:read","cloud_infra:write","cloud_infra:delete","analytics:read","analytics:export","audit_logs:read","audit_logs:export","api_keys:read","api_keys:write","api_keys:delete","telemetry_tokens:read","telemetry_tokens:write","telemetry_tokens:delete","autofixes:read","autofixes:write","autofixes:delete","teams:read","teams:write","teams:delete","labels:read","labels:write","labels:delete","oauth_clients:read","oauth_clients:write","oauth_clients:delete","agent_tools:read","agent_tools:write","issues:read","issues:write","issues:delete","pages:read","pages:delete","deliverables:read","deliverables:write"],"description":"Permission scope label","example":"workspaces:read"}},"lastActive":{"type":"string","nullable":true,"format":"date-time"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["api_key"]}},"required":["id","workspaceId","ownerId","name","scopes","lastActive","created","updated","_object"],"additionalProperties":false},"Telemetry Token":{"type":"object","properties":{"id":{"type":"string","pattern":"^tt_id_[0-9a-z]{64}$","description":"ID of the telemetry_token","example":"tt_id_hciswovf778y8r43gby4n332ey4u1oa9tjsnnxrmdncd7oaotb7vy7tpi97hyg2u"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"token":{"type":"string","pattern":"^tt_[0-9a-z]{64}$","description":"ID of the telemetry_token_token","example":"tt_twz7duqh2vntphgam51681qxfgu5j21uvc31fi4g63kgu8ofbh1khzobzi3wwzdk"},"ownerId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"name":{"type":"string","minLength":4,"maxLength":256,"description":"Name of the telemetry token"},"source":{"type":"string","nullable":true,"enum":["integration","cloud_account",null],"description":"Source that created this token","example":"integration"},"sourceResourceId":{"type":"string","nullable":true,"description":"ID of the resource that created this token","example":"integration_abc123"},"provider":{"type":"string","nullable":true,"enum":["github","slack","datadog","honeycomb","axiom","betterstack","openstatus","sentry","mcp","vercel","grafana","logfire","langsmith","braintrust","newrelic",null],"description":"Integration provider that created this token","example":"sentry"},"lastActive":{"type":"string","nullable":true,"format":"date-time"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["telemetry_token"]}},"required":["id","workspaceId","token","ownerId","name","source","sourceResourceId","provider","lastActive","created","updated","_object"],"additionalProperties":false},"Workspace":{"type":"object","properties":{"id":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"ownerId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"createdBy":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"lastEditedBy":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"slug":{"type":"string","minLength":4,"maxLength":1024,"pattern":"^[a-z0-9_]+(?:-[a-z0-9_]+)*$","example":"acme"},"domain":{"type":"string","nullable":true,"pattern":"^[a-z0-9_]+(?:-[a-z0-9_]+)*$","example":"acme.com"},"autoJoinEnabled":{"type":"string","nullable":true,"format":"date-time","description":"When automatic joining by email domain was turned on. Null means it is off."},"description":{"type":"string","nullable":true,"maxLength":2000},"name":{"type":"string","minLength":4,"maxLength":128,"example":"Acme Inc"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"llmProvider":{"type":"string","enum":["recommended","openai","anthropic","custom"]},"llmProviderBaseUrl":{"type":"string","nullable":true},"llmProviderApiKey":{"type":"string","nullable":true},"llmModelTiers":{"$ref":"#/components/schemas/CustomModelTiers"},"llmProviderAuthHeader":{"type":"string","nullable":true},"llmProviderModelsUrl":{"type":"string","nullable":true},"lastHumanInteractionAt":{"type":"string","nullable":true,"format":"date-time","description":"When a person last used the workspace outside the console: a message they sent, an autofix pull request they merged, or a reply to the monitoring pause email."},"dormancyWarnedAt":{"type":"string","nullable":true,"format":"date-time","description":"When the owners were told background monitoring pauses unless someone uses the workspace. Null means no warning is standing."},"dormantAt":{"type":"string","nullable":true,"format":"date-time","description":"When background monitoring and scheduled checks were paused for lack of human interaction. Null means they are running."},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["workspace"]}},"required":["id","ownerId","createdBy","lastEditedBy","slug","domain","autoJoinEnabled","description","name","created","updated","llmProvider","llmProviderBaseUrl","llmProviderApiKey","llmModelTiers","llmProviderAuthHeader","llmProviderModelsUrl","lastHumanInteractionAt","dormancyWarnedAt","dormantAt","_object"],"additionalProperties":false},"CustomModelTiers":{"type":"object","nullable":true,"properties":{"premium":{"type":"string","maxLength":200},"standard":{"type":"string","maxLength":200},"cheap":{"type":"string","maxLength":200},"code":{"type":"string","maxLength":200},"embeddings":{"type":"string","maxLength":200},"reranker":{"type":"string","maxLength":200}},"additionalProperties":false},"PlanCatalogCapabilities":{"type":"object","properties":{"overage":{"type":"boolean"},"customLlmConfig":{"type":"boolean"},"domainJoin":{"type":"boolean"},"customGateway":{"type":"boolean"},"fleet":{"type":"boolean"}},"required":["overage","customLlmConfig","domainJoin","customGateway","fleet"],"additionalProperties":false},"Public Workspace":{"type":"object","properties":{"id":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"name":{"type":"string","minLength":4,"maxLength":128,"example":"Acme Inc"},"description":{"type":"string","nullable":true,"maxLength":2000},"slug":{"type":"string","minLength":3,"maxLength":1024,"pattern":"^[a-z0-9_]+(?:-[a-z0-9_]+)*$","example":"acme"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["workspace"]}},"required":["id","name","description","slug","_object"],"additionalProperties":false},"AdminWorkspace":{"allOf":[{"$ref":"#/components/schemas/Workspace"},{"type":"object","properties":{"monitoringPausedAt":{"type":"number","nullable":true,"description":"When an operator paused per-resource monitoring for the workspace, as epoch milliseconds; null means monitoring is running."}},"required":["monitoringPausedAt"],"additionalProperties":false}]},"PlanLimits":{"type":"object","properties":{"maxCloudAccounts":{"type":"number","description":"Max connected cloud accounts"},"maxNormalizedTokens":{"type":"number","description":"Monthly normalized token budget"},"maxWorkspaceMembers":{"type":"number","description":"Max members in workspace"},"maxInvestigationsPerDay":{"type":"number","default":-1,"description":"Max investigations started per rolling 24h"},"includedAutofixesPerMonth":{"type":"number","default":-1,"description":"Autofixes included per billing month"},"maxPrAnalysesPerMonth":{"type":"number","default":-1,"description":"Max PR analyses per billing month"}},"required":["maxCloudAccounts","maxNormalizedTokens","maxWorkspaceMembers"],"additionalProperties":false},"Usage":{"type":"object","properties":{"normalizedTokens":{"type":"number","description":"Cost-weighted token usage for the current billing period"}},"required":["normalizedTokens"],"additionalProperties":false},"UsageResetGrant":{"type":"object","properties":{"id":{"type":"string"},"awardedAt":{"type":"number","description":"When an operator awarded the reset, epoch milliseconds"},"expiresAt":{"type":"number","description":"When the reset stops being redeemable, epoch milliseconds"}},"required":["id","awardedAt","expiresAt"],"additionalProperties":false},"PlanLimitsUpdate":{"type":"object","properties":{"maxCloudAccounts":{"type":"number","nullable":true,"description":"Max connected cloud accounts; null returns the dimension to the plan catalog"},"maxNormalizedTokens":{"type":"number","nullable":true,"description":"Monthly normalized token budget; null returns the dimension to the plan catalog"},"maxWorkspaceMembers":{"type":"number","nullable":true,"description":"Max members in workspace; null returns the dimension to the plan catalog"},"maxInvestigationsPerDay":{"type":"number","nullable":true,"description":"Max investigations started per rolling 24h; null returns the dimension to the plan catalog"},"includedAutofixesPerMonth":{"type":"number","nullable":true,"description":"Autofixes included per billing month; null returns the dimension to the plan catalog"},"maxPrAnalysesPerMonth":{"type":"number","nullable":true,"description":"Max PR analyses per billing month; null returns the dimension to the plan catalog"}},"additionalProperties":false},"WorkspaceEnrichmentWithDossier":{"allOf":[{"$ref":"#/components/schemas/WorkspaceEnrichment"},{"type":"object","nullable":true,"properties":{"dossier":{"type":"string","nullable":true,"description":"The full markdown dossier for this enrichment run"}},"required":["dossier"],"additionalProperties":false}]},"WorkspaceEnrichment":{"type":"object","properties":{"id":{"type":"string","pattern":"^wenr_[0-9a-z]{24}$","description":"ID of the workspace_enrichment","example":"wenr_38mg3o4ibc92h8t2efn8csrh"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"status":{"type":"string","enum":["queued","running","complete","failed"]},"trigger":{"type":"string","enum":["signup","manual","refresh","backfill"]},"additionalContext":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"error":{"type":"string","nullable":true},"companyName":{"type":"string","nullable":true},"companyUrl":{"type":"string","nullable":true},"companySize":{"type":"string","nullable":true},"companyStage":{"type":"string","nullable":true,"enum":["bootstrap","pre_seed","seed","series_a_plus","public","unknown",null]},"industry":{"type":"string","nullable":true},"engineeringTeamSize":{"type":"number","nullable":true},"stack":{"type":"array","nullable":true,"items":{"type":"string"}},"primaryCloud":{"type":"string","nullable":true,"enum":["aws","gcp","azure","cloudflare","vercel","fly","render","planetscale","supabase","modal","kubernetes","other","unknown",null]},"detectedTools":{"type":"array","nullable":true,"items":{"type":"string"}},"connectedProviders":{"type":"array","nullable":true,"items":{"type":"string"}},"unconnectedSupported":{"type":"array","nullable":true,"items":{"type":"string"}},"icpFit":{"type":"number","nullable":true},"expansionScore":{"type":"number","nullable":true},"revOpportunity":{"type":"string","nullable":true,"enum":["free","solo_paid","team","scale","enterprise",null]},"revEstimate":{"type":"number","nullable":true},"seatPotential":{"type":"number","nullable":true},"recommendedPlan":{"type":"string","nullable":true},"expansionTriggers":{"type":"array","nullable":true,"items":{"type":"string"}},"nextContactAt":{"type":"string","nullable":true,"format":"date-time"},"contactReason":{"type":"string","nullable":true},"outreachAngle":{"type":"string","nullable":true},"confidence":{"type":"string","nullable":true,"enum":["low","medium","high",null]},"sources":{"type":"array","nullable":true,"items":{"type":"string"}},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"completed":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","workspaceId","status","trigger","additionalContext","model","error","companyName","companyUrl","companySize","companyStage","industry","engineeringTeamSize","stack","primaryCloud","detectedTools","connectedProviders","unconnectedSupported","icpFit","expansionScore","revOpportunity","revEstimate","seatPotential","recommendedPlan","expansionTriggers","nextContactAt","contactReason","outreachAngle","confidence","sources","created","updated","completed"],"additionalProperties":false},"WorkspaceMonitoring":{"type":"object","properties":{"monitoringPausedAt":{"type":"number","nullable":true,"description":"When an operator paused per-resource monitoring for the workspace, as epoch milliseconds; null means monitoring is running."}},"required":["monitoringPausedAt"],"additionalProperties":false},"WorkspaceSignalDiscovery":{"type":"object","properties":{"signalDiscoveryPausedAt":{"type":"number","nullable":true,"description":"When an operator paused signal discovery for the workspace, as epoch milliseconds; null means discovery is running."}},"required":["signalDiscoveryPausedAt"],"additionalProperties":false},"AutofixSettings":{"type":"object","properties":{"autofix":{"$ref":"#/components/schemas/AutofixConfig"}},"required":["autofix"]},"AutofixConfig":{"type":"object","properties":{"disabledAt":{"type":"string","nullable":true,"format":"date-time","description":"When set, Polylane does not open new autofix pull requests on any repository in the workspace"},"reviewBotLogin":{"type":"string","nullable":true,"description":"GitHub login whose review is requested on every autofix pull request, for example an automated reviewer's account; null requests no bot review"},"commitAuthoring":{"type":"string","enum":["bot","user"],"description":"Who the commits Polylane pushes are attributed to: 'user' (the default) commits as the teammate who asked for the change, or the person who installed the GitHub App, or the workspace owner, with Polylane as co-author, which is what deploy platforms that only build team members' commits (Vercel) accept; 'bot' commits as the Polylane GitHub App"},"draftPullRequests":{"type":"boolean","description":"Open new Polylane autofix pull requests as drafts in this workspace; existing pull requests keep their current state"},"repositoryPacing":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/RepositoryPacing"},"description":"Per-repository pacing keyed by lowercase owner/repo. Each setting inherits the workspace value unless set. PATCH merges supplied entries with existing ones, and a null entry removes the repository's overrides."},"weekendPacingEnabledAt":{"type":"string","nullable":true,"format":"date-time","description":"When set, weekend pacing is on for every repository that does not override it. On by default; null turns it off, and the selected severities are retained"},"autoFixSeverities":{"type":"array","items":{"type":"string","enum":["critical","high","medium","low","info"]},"maxItems":5,"description":"Severities of investigated issues whose fixes Polylane may submit automatically; person-requested fixes are unaffected"},"weekendSeverities":{"type":"array","items":{"type":"string","enum":["critical","high","medium","low","info"]},"maxItems":5,"description":"Severities investigated automatically on Saturday and Sunday in UTC"}},"required":["disabledAt","reviewBotLogin","commitAuthoring","draftPullRequests","repositoryPacing","weekendPacingEnabledAt","autoFixSeverities","weekendSeverities"],"additionalProperties":false},"RepositoryPacing":{"type":"object","nullable":true,"properties":{"investigationSlackSeverities":{"type":"array","nullable":true,"items":{"type":"string","enum":["critical","high","medium","low","info"]},"maxItems":5,"description":"Issue severities whose fix runs open a Slack Issue channel for this repository; null inherits the Slack integration's selection, an empty list keeps the repository out"},"weekendPacing":{"type":"string","enum":["inherit","on","off"],"description":"Whether weekend pacing applies to this repository: 'inherit' follows the workspace, 'on' and 'off' override it"},"weekendSeverities":{"type":"array","nullable":true,"items":{"type":"string","enum":["critical","high","medium","low","info"]},"maxItems":5,"description":"Severities worked automatically on Saturday and Sunday in UTC; null inherits the workspace value"}},"required":["weekendPacing","weekendSeverities"],"additionalProperties":false},"PatchAutofixConfig":{"type":"object","properties":{"disabledAt":{"type":"string","nullable":true,"format":"date-time","description":"When set, Polylane does not open new autofix pull requests on any repository in the workspace"},"reviewBotLogin":{"type":"string","nullable":true,"description":"GitHub login whose review is requested on every autofix pull request, for example an automated reviewer's account; null requests no bot review"},"commitAuthoring":{"type":"string","enum":["bot","user"],"description":"Who the commits Polylane pushes are attributed to: 'user' (the default) commits as the teammate who asked for the change, or the person who installed the GitHub App, or the workspace owner, with Polylane as co-author, which is what deploy platforms that only build team members' commits (Vercel) accept; 'bot' commits as the Polylane GitHub App"},"draftPullRequests":{"type":"boolean","description":"Open new Polylane autofix pull requests as drafts in this workspace; existing pull requests keep their current state"},"repositoryPacing":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/RepositoryPacing"},"description":"Per-repository pacing keyed by lowercase owner/repo. Each setting inherits the workspace value unless set. PATCH merges supplied entries with existing ones, and a null entry removes the repository's overrides."},"weekendPacingEnabledAt":{"type":"string","nullable":true,"format":"date-time","description":"When set, weekend pacing is on for every repository that does not override it. On by default; null turns it off, and the selected severities are retained"},"autoFixSeverities":{"type":"array","items":{"type":"string","enum":["critical","high","medium","low","info"]},"maxItems":5,"description":"Severities of investigated issues whose fixes Polylane may submit automatically; person-requested fixes are unaffected"},"weekendSeverities":{"type":"array","items":{"type":"string","enum":["critical","high","medium","low","info"]},"maxItems":5,"description":"Severities investigated automatically on Saturday and Sunday in UTC"}},"additionalProperties":false},"EscalationsSettings":{"type":"object","properties":{"escalations":{"$ref":"#/components/schemas/EscalationsConfig"}},"required":["escalations"]},"EscalationsConfig":{"type":"object","properties":{"alertSeverities":{"type":"array","items":{"type":"string","enum":["critical","high","medium","low"]},"maxItems":4,"description":"Severities of new escalations Polylane announces right away, in the Slack notifications channel and by email. The daily digest lists every open escalation."}},"required":["alertSeverities"],"additionalProperties":false},"InvestigationsSettings":{"type":"object","properties":{"investigations":{"$ref":"#/components/schemas/InvestigationsConfig"}},"required":["investigations"]},"InvestigationsConfig":{"type":"object","properties":{"autoInvestigateSeverities":{"type":"array","items":{"type":"string","enum":["critical","high","medium","low","info"]},"maxItems":5,"description":"Severities of confirmed issues Polylane investigates automatically. Other issues are triaged and held until a person starts the investigation."}},"required":["autoInvestigateSeverities"],"additionalProperties":false},"DigestSettings":{"type":"object","properties":{"weeklyDigestDisabledAt":{"type":"number","nullable":true,"description":"When the weekly digest was disabled for this workspace, or null if enabled"}},"required":["weeklyDigestDisabledAt"]},"PrReviewsSettings":{"type":"object","properties":{"prReviews":{"$ref":"#/components/schemas/PrReviewsConfig"}},"required":["prReviews"]},"PrReviewsConfig":{"type":"object","properties":{"disabledAt":{"type":"string","nullable":true,"format":"date-time","description":"When set, Polylane does not assess production impact for pull requests on any repository in the workspace"},"guestLinksDisabledAt":{"type":"string","nullable":true,"format":"date-time","description":"When set, new review threads are visible to workspace members only, pull request comments link the member view, and existing guest links are revoked"},"guestLinksGeneration":{"type":"integer","minimum":0,"description":"Revocation generation for pull request guest links; each disablement invalidates earlier generations"},"videosDisabledAt":{"type":"string","nullable":true,"format":"date-time","description":"When set, Polylane does not record narrated walkthrough videos for the pull requests it opens"},"botAuthors":{"type":"string","enum":["on_request","all","selected"],"description":"Which bot-opened pull requests Polylane assesses on every push: none until someone asks (on_request), every bot (all), or only the bots in automaticBotLogins (selected)"},"automaticBotLogins":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":50,"description":"GitHub logins of the bots whose pull requests are assessed automatically when botAuthors is selected, such as dependabot[bot]"}},"required":["disabledAt","guestLinksDisabledAt","guestLinksGeneration","videosDisabledAt","botAuthors","automaticBotLogins"],"additionalProperties":false},"PatchPrReviewsConfig":{"type":"object","properties":{"disabledAt":{"type":"string","nullable":true,"format":"date-time","description":"When set, Polylane does not assess production impact for pull requests on any repository in the workspace"},"guestLinksDisabledAt":{"type":"string","nullable":true,"format":"date-time","description":"When set, new review threads are visible to workspace members only, pull request comments link the member view, and existing guest links are revoked"},"videosDisabledAt":{"type":"string","nullable":true,"format":"date-time","description":"When set, Polylane does not record narrated walkthrough videos for the pull requests it opens"},"botAuthors":{"type":"string","enum":["on_request","all","selected"],"description":"Which bot-opened pull requests Polylane assesses on every push: none until someone asks (on_request), every bot (all), or only the bots in automaticBotLogins (selected)"},"automaticBotLogins":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":50,"description":"GitHub logins of the bots whose pull requests are assessed automatically when botAuthors is selected, such as dependabot[bot]"}},"additionalProperties":false},"Invite":{"type":"object","properties":{"id":{"type":"string","pattern":"^inv_[0-9a-z]{64}$","description":"ID of the invite","example":"inv_gepzgu225yzyyv9mp485wbjwwrhwgvjwkammgcv5uzm1jorkgeqezkxz7x5ad1ha"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"token":{"type":"string","nullable":true},"createdBy":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"acceptedBy":{"type":"string","nullable":true,"pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"email":{"type":"string","format":"email"},"position":{"type":"string","enum":["owner","admin","member","read-only"]},"status":{"type":"string","enum":["pending","accepted","expired","revoked"]},"acceptedAt":{"type":"string","nullable":true,"format":"date-time"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["invite"]}},"required":["id","workspaceId","token","createdBy","acceptedBy","email","position","status","acceptedAt","created","updated","_object"],"additionalProperties":false},"Workspace Member":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"userId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","description":"ID of the user","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"invitedBy":{"type":"string","nullable":true,"pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","description":"ID of the user","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"forename":{"type":"string","example":"John"},"username":{"type":"string","example":"johndoe"},"email":{"type":"string","format":"email","example":"john@doe.com"},"surname":{"type":"string","nullable":true,"example":"Doe"},"position":{"type":"string","enum":["owner","admin","member","read-only"]},"scopes":{"type":"array","items":{"type":"string","enum":["workspaces:read","workspaces:write","workspaces:delete","workspace_members:read","workspace_members:write","workspace_members:delete","billing:read","billing:write","subscriptions:read","subscriptions:write","subscriptions:purchase","threads:read","threads:write","threads:delete","repositories:read","repositories:write","repositories:delete","ratings:write","messages:read","messages:write","messages:delete","integrations:read","integrations:write","integrations:delete","cloud_accounts:read","cloud_accounts:write","cloud_accounts:delete","memories:read","memories:write","memories:delete","cloud_infra:read","cloud_infra:write","cloud_infra:delete","analytics:read","analytics:export","audit_logs:read","audit_logs:export","api_keys:read","api_keys:write","api_keys:delete","telemetry_tokens:read","telemetry_tokens:write","telemetry_tokens:delete","autofixes:read","autofixes:write","autofixes:delete","teams:read","teams:write","teams:delete","labels:read","labels:write","labels:delete","oauth_clients:read","oauth_clients:write","oauth_clients:delete","agent_tools:read","agent_tools:write","issues:read","issues:write","issues:delete","pages:read","pages:delete","deliverables:read","deliverables:write"],"description":"Permission scope label","example":"workspaces:read"}},"lastActive":{"type":"string","nullable":true,"format":"date-time"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["workspace_member"]}},"required":["workspaceId","userId","invitedBy","forename","username","email","surname","position","scopes","lastActive","created","updated","_object"],"additionalProperties":false},"Join Via Guest Link":{"type":"object","properties":{"token":{"type":"string","minLength":1,"description":"The signed guest link token embedded in the PR comment"},"threadId":{"type":"string","minLength":1,"description":"The impact assessment thread the guest link was minted for"}},"required":["token","threadId"],"additionalProperties":false},"Session":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9]+$","description":"ID of the session","example":""},"userId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"expiresAt":{"type":"string","nullable":true,"format":"date-time"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["session"]}},"required":["id","userId","expiresAt","created","updated","_object"],"additionalProperties":false},"OAuth Client":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the OAuth client","example":"oauth_client_efw4pgjae0n4vq2i5l98cozm"},"name":{"type":"string","minLength":4,"description":"The name of the OAuth client","example":"My Application"},"description":{"type":"string","nullable":true,"description":"A description of the OAuth client","example":"A sample OAuth application"},"email":{"type":"string","description":"Contact email for the OAuth client","example":"contact@example.com"},"redirectUris":{"type":"array","items":{"type":"string","format":"uri"},"description":"Valid redirect URIs for this client","example":["https://example.com/callback"]},"scopes":{"type":"array","items":{"type":"string","enum":["workspaces:read","workspaces:write","workspaces:delete","workspace_members:read","workspace_members:write","workspace_members:delete","billing:read","billing:write","subscriptions:read","subscriptions:write","subscriptions:purchase","threads:read","threads:write","threads:delete","repositories:read","repositories:write","repositories:delete","ratings:write","messages:read","messages:write","messages:delete","integrations:read","integrations:write","integrations:delete","cloud_accounts:read","cloud_accounts:write","cloud_accounts:delete","memories:read","memories:write","memories:delete","cloud_infra:read","cloud_infra:write","cloud_infra:delete","analytics:read","analytics:export","audit_logs:read","audit_logs:export","api_keys:read","api_keys:write","api_keys:delete","telemetry_tokens:read","telemetry_tokens:write","telemetry_tokens:delete","autofixes:read","autofixes:write","autofixes:delete","teams:read","teams:write","teams:delete","labels:read","labels:write","labels:delete","oauth_clients:read","oauth_clients:write","oauth_clients:delete","agent_tools:read","agent_tools:write","issues:read","issues:write","issues:delete","pages:read","pages:delete","deliverables:read","deliverables:write"],"description":"Permission scope label","example":"workspaces:read"},"description":"Allowed scopes for this client","example":["profile","email"]},"logoUrl":{"type":"string","nullable":true,"format":"uri","description":"URL of the client's logo","example":"https://example.com/logo.png"},"websiteUrl":{"type":"string","nullable":true,"format":"uri","description":"URL of the client's website","example":"https://example.com"},"privacyPolicyUrl":{"type":"string","nullable":true,"format":"uri","description":"URL of the client's privacy policy","example":"https://example.com/privacy"},"termsOfServiceUrl":{"type":"string","nullable":true,"format":"uri","description":"URL of the client's terms of service","example":"https://example.com/terms"},"isActive":{"type":"boolean","description":"Whether the client is active","example":true},"created":{"type":"string","nullable":true,"format":"date-time","description":"When the client was created","example":"2026-10-30T10:47:19.321Z"},"updated":{"type":"string","nullable":true,"format":"date-time","description":"When the client was last updated","example":"2026-10-30T10:47:19.321Z"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["oauth_client"]}},"required":["id","name","description","email","redirectUris","scopes","logoUrl","websiteUrl","privacyPolicyUrl","termsOfServiceUrl","isActive","created","updated","_object"]},"OAuth Client With Secret":{"allOf":[{"$ref":"#/components/schemas/OAuth Client"},{"type":"object","properties":{"clientSecret":{"type":"string","description":"The client secret. Only returned on creation and rotation; store it securely as it cannot be retrieved again.","example":"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2"}},"required":["clientSecret"]}]},"Email":{"type":"object","properties":{"id":{"type":"string","pattern":"^email_[0-9a-z]{24}$","description":"ID of the email","example":"email_38mg3o4ibc92h8t2efn8csrh"},"userId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","description":"ID of the user","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"from":{"type":"string"},"to":{"type":"string"},"subject":{"type":"string","nullable":true},"body":{"type":"string","nullable":true},"emailId":{"type":"string","nullable":true},"template":{"type":"string","nullable":true},"replyTo":{"type":"string","nullable":true},"params":{"type":"object","nullable":true,"additionalProperties":{"type":"string"}},"direction":{"type":"string","enum":["inbound","outbound"]},"receivedAt":{"type":"string","nullable":true,"format":"date-time"},"repliedAt":{"type":"string","nullable":true,"format":"date-time"},"created":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["email"]}},"required":["id","userId","from","to","subject","body","emailId","template","replyTo","params","direction","receivedAt","repliedAt","created","_object"],"additionalProperties":false},"Team":{"type":"object","properties":{"id":{"type":"string","pattern":"^team_[0-9a-z]{24}$","description":"ID of the team","example":"team_38mg3o4ibc92h8t2efn8csrh"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"name":{"type":"string","description":"Team name"},"slug":{"type":"string","description":"URL-friendly team identifier"},"description":{"type":"string","nullable":true,"description":"Team description"},"color":{"type":"string","nullable":true,"description":"Hex color for UI badges"},"icon":{"type":"string","nullable":true,"description":"Icon identifier"},"createdBy":{"type":"string","description":"User who created the team"},"created":{"type":"string","nullable":true,"format":"date-time","description":"Creation timestamp"},"updated":{"type":"string","nullable":true,"format":"date-time","description":"Last update timestamp"},"_object":{"type":"string","enum":["team"]}},"required":["id","workspaceId","name","slug","description","color","icon","createdBy","created","updated","_object"],"additionalProperties":false},"TeamMember":{"type":"object","properties":{"teamId":{"type":"string","pattern":"^team_[0-9a-z]{24}$","description":"ID of the team","example":"team_38mg3o4ibc92h8t2efn8csrh"},"userId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6","description":"User ID"},"addedBy":{"type":"string","description":"User who added this member"},"created":{"type":"string","nullable":true,"format":"date-time","description":"When the member was added"},"_object":{"type":"string","enum":["team_member"]}},"required":["teamId","userId","addedBy","created","_object"],"additionalProperties":false},"Label":{"type":"object","properties":{"id":{"type":"string","pattern":"^lbl_[0-9a-z]{24}$","description":"ID of the label","example":"lbl_38mg3o4ibc92h8t2efn8csrh"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"name":{"type":"string","description":"Label name"},"color":{"type":"string","description":"Hex color code"},"description":{"type":"string","nullable":true,"description":"Label description"},"createdBy":{"type":"string","description":"User who created the label"},"created":{"type":"string","nullable":true,"format":"date-time","description":"Creation timestamp"},"updated":{"type":"string","nullable":true,"format":"date-time","description":"Last update timestamp"},"_object":{"type":"string","enum":["label"]}},"required":["id","workspaceId","name","color","description","createdBy","created","updated","_object"],"additionalProperties":false},"RepositoryEnvironment":{"type":"object","properties":{"id":{"type":"string","pattern":"^renv_[0-9a-z]{24}$","description":"ID of the repository_environment","example":"renv_38mg3o4ibc92h8t2efn8csrh"},"repositoryId":{"type":"string","pattern":"^repo_[0-9a-z]{24}$","description":"Repository this environment belongs to","example":"repo_38mg3o4ibc92h8t2efn8csrh"},"containerImage":{"type":"string","description":"Container base image name"},"preinstalledPackages":{"$ref":"#/components/schemas/PreinstalledPackages"},"setupScriptMode":{"type":"string","enum":["automatic","manual"],"description":"Automatic or manual dependency installation"},"setupScript":{"type":"string","nullable":true,"description":"Bash setup script run after repo clone (manual mode)"},"maintenanceScript":{"type":"string","nullable":true,"description":"Bash script run when a cached container is resumed"},"prReviewCheckDisabledAt":{"type":"string","nullable":true,"format":"date-time","description":"When null, the impact assessment posts a GitHub check that fails on production concerns, so branch protection can block merging; set to disable the check"},"prReviewsDisabledAt":{"type":"string","nullable":true,"format":"date-time","description":"When set, Polylane does not assess production impact for pull requests on this repository"},"prReviewMaxAutoRounds":{"type":"integer","nullable":true,"description":"How many pushes to a pull request are assessed automatically before Polylane pauses and waits to be asked; null uses the default of 10"},"autofixDisabledAt":{"type":"string","nullable":true,"format":"date-time","description":"When set, Polylane does not open new autofix pull requests on this repository"},"envVars":{"type":"object","additionalProperties":{"type":"string"},"description":"Environment variables for setup and agent execution"},"secrets":{"type":"object","additionalProperties":{"type":"string"},"description":"Encrypted secrets available only during setup"},"cachingEnabled":{"type":"boolean","description":"Whether to cache sandbox state after setup"},"cacheBackupId":{"type":"string","nullable":true,"description":"Backup ID of cached sandbox state"},"cacheCreatedAt":{"type":"string","nullable":true,"format":"date-time","description":"When the cache was created"},"cacheExpiresAt":{"type":"string","nullable":true,"format":"date-time","description":"When the cache expires"},"cacheInvalidated":{"type":"boolean","description":"Whether the cache was invalidated by a config change"},"status":{"type":"string","enum":["ready","setting_up","errored"],"description":"Setup status of the environment"},"errorReport":{"type":"string","nullable":true,"description":"Error report from failed setup"},"createdBy":{"type":"string","description":"User who created this configuration"},"lastEditedBy":{"type":"string","description":"User who last edited this configuration"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["repository_environment"]}},"required":["id","repositoryId","containerImage","preinstalledPackages","setupScriptMode","setupScript","maintenanceScript","prReviewCheckDisabledAt","prReviewsDisabledAt","prReviewMaxAutoRounds","autofixDisabledAt","envVars","secrets","cachingEnabled","cacheBackupId","cacheCreatedAt","cacheExpiresAt","cacheInvalidated","status","errorReport","createdBy","lastEditedBy","created","updated","_object"]},"PreinstalledPackages":{"type":"object","properties":{"python":{"type":"string","description":"Python version (e.g. '3.12')"},"node":{"type":"string","description":"Node.js version (e.g. '20')"},"ruby":{"type":"string","description":"Ruby version (e.g. '3.4.4')"},"rust":{"type":"string","description":"Rust version (e.g. '1.89.0')"},"go":{"type":"string","description":"Go version (e.g. '1.24.3')"},"bun":{"type":"string","description":"Bun version (e.g. '1.2.14')"},"php":{"type":"string","description":"PHP version (e.g. '8.4')"},"java":{"type":"string","description":"Java version (e.g. '21')"},"swift":{"type":"string","description":"Swift version (e.g. '6.1')"},"dotnet":{"type":"string","description":".NET SDK version (e.g. '9.0')"},"elixir":{"type":"string","description":"Elixir version (e.g. '1.18')"},"scala":{"type":"string","description":"Scala version (via sbt, e.g. '3.6')"},"flutter":{"type":"string","description":"Flutter SDK version (e.g. '3.32')"}},"description":"Runtime versions to pre-install in the sandbox"},"IntegrationPrReviewCounts":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"description":"Repositories connected to the integration"},"enabledCount":{"type":"integer","minimum":0,"description":"Repositories with production impact assessments enabled"}},"required":["total","enabledCount"]},"PrReviewsBulkResult":{"type":"object","properties":{"failed":{"type":"array","items":{"type":"object","properties":{"repositoryId":{"type":"string","pattern":"^repo_[0-9a-z]{24}$","description":"ID of the repository","example":"repo_38mg3o4ibc92h8t2efn8csrh"},"reason":{"type":"string","description":"Why this repository could not be updated"}},"required":["repositoryId","reason"]},"description":"Repositories that could not be updated"}},"required":["failed"]},"PrReviewRequest":{"type":"object","properties":{"status":{"type":"string","enum":["queued","running"],"description":"queued: a review starts shortly. running: a review of this pull request is already in progress."}},"required":["status"]},"RepositoryReviewerCandidates":{"type":"object","properties":{"owner":{"type":"string","description":"GitHub organization or account that owns the repository"},"membersAccess":{"type":"string","enum":["granted","missing","not_an_organization"],"description":"granted: candidates are the organization's members and teams. missing: the GitHub App installation has not accepted the Members permission yet, so candidates are the repository's collaborators only. not_an_organization: a personal account's repository, so candidates are its collaborators."},"candidates":{"type":"array","items":{"$ref":"#/components/schemas/RepositoryReviewerCandidate"}}},"required":["owner","membersAccess","candidates"]},"RepositoryReviewerCandidate":{"type":"object","properties":{"kind":{"type":"string","enum":["user","team"],"description":"A GitHub user, or a team of the organization that owns the repository"},"githubId":{"type":"string","description":"Numeric GitHub id of the user or team"},"login":{"type":"string","description":"GitHub login, or `org/team-slug` for a team"},"name":{"type":"string","nullable":true,"description":"Display name on GitHub, when it has one"},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar image URL"}},"required":["kind","githubId","login","name","avatarUrl"]},"RepositoryAutofixReviewers":{"type":"object","properties":{"repositoryId":{"type":"string","description":"Repository the reviewers belong to"},"reviewers":{"type":"array","items":{"$ref":"#/components/schemas/RepositoryAutofixReviewer"},"description":"People and teams Polylane asks to review each autofix pull request on this repository, together with the person who asked for the fix. When empty, Polylane asks the person who asked for the fix, else the owners of the affected resource or repository, else GitHub's suggested reviewers."}},"required":["repositoryId","reviewers"]},"RepositoryAutofixReviewer":{"type":"object","properties":{"kind":{"type":"string","enum":["user","team"],"description":"A GitHub user, or a team of the organization that owns the repository"},"githubId":{"type":"string","description":"Numeric GitHub id of the user or team"},"login":{"type":"string","description":"GitHub login, or `org/team-slug` for a team"},"name":{"type":"string","nullable":true,"description":"Display name on GitHub, when it has one"},"createdBy":{"type":"string","description":"User who added this reviewer"},"created":{"type":"string","nullable":true,"format":"date-time"}},"required":["kind","githubId","login","name","createdBy","created"]},"Repository":{"type":"object","properties":{"id":{"type":"string","pattern":"^repo_[0-9a-z]{24}$","description":"ID of the repository","example":"repo_38mg3o4ibc92h8t2efn8csrh"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"name":{"type":"string","description":"Name of the repository"},"owner":{"type":"string","description":"Owner of the repository"},"remoteId":{"type":"string","description":"ID of the repository as defined in the git provider"},"integrationId":{"type":"string","pattern":"^int_[0-9a-z]{24}$","description":"ID of the integration","example":"int_34gky74ibc92h8t2efn8csrh"},"description":{"type":"string","nullable":true,"description":"Description of the repository"},"provider":{"type":"string","enum":["github"],"description":"Git provider"},"keywords":{"type":"array","items":{"type":"string"}},"labels":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["ready","syncing","new","errored"],"description":"Sync status of the repository"},"metadata":{"type":"object","properties":{"provider":{"type":"string","enum":["github"]},"defaultBranch":{"type":"string"},"nodeId":{"type":"string"},"visibility":{"type":"string"},"private":{"type":"boolean"},"fullName":{"type":"string"},"id":{"type":"number"},"owner":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"homepage":{"type":"string","nullable":true},"topics":{"type":"array","items":{"type":"string"}},"languages":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"bytes":{"type":"number"}},"required":["name","bytes"]},"description":"Languages GitHub detects in the repository, by bytes of code, largest first"},"unavailableDetail":{"type":"string","nullable":true},"unavailableSource":{"type":"string","nullable":true,"enum":["webhook","reconcile","clone",null]},"pendingRename":{"type":"object","nullable":true,"properties":{"owner":{"type":"string"},"name":{"type":"string"}},"required":["owner","name"]}},"required":["provider","defaultBranch","nodeId","private","fullName","id","owner","name","url"],"description":"Metadata related to the repository"},"createdBy":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"lastEditedBy":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"lastSync":{"type":"string","nullable":true,"format":"date-time"},"disabled":{"type":"string","nullable":true,"format":"date-time"},"normalizedRemote":{"type":"string","nullable":true,"description":"Normalized GitHub origin remote (host/owner/name)"},"githubRepoId":{"type":"number","nullable":true,"description":"GitHub's numeric repository id, stable across owner and name changes"},"installationId":{"type":"number","nullable":true,"description":"GitHub App installation the repository is reached through"},"unavailableAt":{"type":"string","nullable":true,"format":"date-time","description":"When the repository stopped being reachable through GitHub, null while it is"},"unavailableReason":{"type":"string","nullable":true,"enum":["deleted","archived","removed_from_installation","unreachable",null],"description":"Why the repository is unavailable: deleted, archived, or removed on GitHub, or unreachable when a clone was refused"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["repository"]}},"required":["id","workspaceId","name","owner","remoteId","integrationId","description","provider","keywords","labels","status","metadata","createdBy","lastEditedBy","created","updated","lastSync","disabled","normalizedRemote","githubRepoId","installationId","unavailableAt","unavailableReason","_object"],"additionalProperties":false},"RepositoryInstrumentationReport":{"type":"object","properties":{"summary":{"type":"object","nullable":true,"properties":{"routesTotal":{"type":"number"},"routesInstrumented":{"type":"number"},"darkRoutes":{"type":"number"},"scannedSha":{"type":"string"},"computedAt":{"type":"number"}},"required":["routesTotal","routesInstrumented","darkRoutes","scannedSha","computedAt"]},"findings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ruleId":{"type":"string"},"severity":{"type":"string","enum":["warning","info"]},"title":{"type":"string"},"message":{"type":"string"},"remediation":{"type":"string"},"filePath":{"type":"string","nullable":true},"line":{"type":"number","nullable":true},"routes":{"type":"array","nullable":true,"items":{"type":"string"}},"dismissedAtMs":{"type":"number","nullable":true},"dismissedBy":{"type":"string","nullable":true}},"required":["id","ruleId","severity","title","message","remediation","filePath","line","routes","dismissedAtMs","dismissedBy"]}}},"required":["summary","findings"]},"RepositoryAdvisoryDismissal":{"type":"object","properties":{"id":{"type":"string"},"dismissedAtMs":{"type":"number","nullable":true},"dismissedBy":{"type":"string","nullable":true}},"required":["id","dismissedAtMs","dismissedBy"]},"PrChangeRecord":{"type":"object","properties":{"id":{"type":"string"},"repositoryId":{"type":"string"},"prNumber":{"type":"number"},"prTitle":{"type":"string"},"prAuthor":{"type":"string","nullable":true},"prUrl":{"type":"string"},"baseRef":{"type":"string"},"headRef":{"type":"string"},"headSha":{"type":"string"},"verdict":{"type":"string","enum":["fail","pass"]},"title":{"type":"string"},"tldr":{"type":"string"},"impactLevel":{"type":"string","enum":["none","low","moderate","high"]},"affectedResourceIds":{"type":"array","items":{"type":"string"}},"threadId":{"type":"string","nullable":true},"autofixId":{"type":"string","nullable":true},"commentId":{"type":"number","nullable":true},"commentedAtMs":{"type":"number","nullable":true},"dismissedAtMs":{"type":"number","nullable":true},"dismissedBy":{"type":"string","nullable":true},"resolvedAtMs":{"type":"number","nullable":true},"reviewingHeadSha":{"type":"string","nullable":true,"description":"The head Polylane is reviewing now; null once the review settled. While set, verdict, title, tldr and headSha describe the last completed review"},"reviewStartedAt":{"type":"string","nullable":true,"format":"date-time","description":"When the review of reviewingHeadSha started; null once it settled"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","repositoryId","prNumber","prTitle","prAuthor","prUrl","baseRef","headRef","headSha","verdict","title","tldr","impactLevel","affectedResourceIds","threadId","autofixId","commentId","commentedAtMs","dismissedAtMs","dismissedBy","resolvedAtMs","reviewingHeadSha","reviewStartedAt","created","updated"]},"PrChangeRecordDetail":{"allOf":[{"$ref":"#/components/schemas/PrChangeRecord"},{"type":"object","properties":{"comment":{"type":"string","nullable":true,"description":"The comment markdown posted for this analysis; null when no comment was produced"},"trajectories":{"type":"array","items":{"$ref":"#/components/schemas/PrChangeTrajectory"},"description":"The failure-mode trajectory ledger this review investigated; empty when the review predates trajectory recording"}},"required":["comment","trajectories"]}]},"PrChangeTrajectory":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["confirmed","plausible","refuted"]},"severity":{"type":"string","enum":["low","moderate","high"]},"likelihood":{"type":"string","enum":["likely","possible","unlikely"],"description":"Traffic-conditioned likelihood; absent on refuted trajectories"},"trigger":{"type":"string"},"observedRate":{"type":"string","description":"The arithmetic behind the likelihood bucket"},"trafficEvidence":{"type":"string","description":"The traffic reads the trajectory was scored against; absent on refuted trajectories"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/PrChangeTrajectoryStep"}},"refutation":{"type":"string","description":"Why the trajectory was ruled out; present on refuted trajectories"},"affectedResourceIds":{"type":"array","items":{"type":"string"}}},"required":["slug","title","status","severity","trigger","steps"]},"PrChangeTrajectoryStep":{"type":"object","properties":{"claim":{"type":"string"},"evidence":{"type":"string"}},"required":["claim","evidence"]},"PrChangeRecordDismissal":{"type":"object","properties":{"id":{"type":"string"},"dismissedAtMs":{"type":"number","nullable":true},"dismissedBy":{"type":"string","nullable":true}},"required":["id","dismissedAtMs","dismissedBy"]},"PrChangeRecordFix":{"type":"object","properties":{"id":{"type":"string"},"autofixId":{"type":"string"}},"required":["id","autofixId"]},"RepositoryWithPrReviews":{"allOf":[{"$ref":"#/components/schemas/Repository"},{"type":"object","properties":{"prReviewsEnabled":{"type":"boolean","description":"Whether production impact assessments are enabled for this repository"}},"required":["prReviewsEnabled"],"additionalProperties":false}]},"Repository Access Filter":{"anyOf":[{"type":"string","enum":["active","paused","unavailable","!active","!paused","!unavailable"]},{"type":"array","items":{"type":"string","enum":["active","paused","unavailable","!active","!paused","!unavailable"]}}],"description":"Only repositories in one of these access states: 'active', 'paused' by a person, or 'unavailable' on GitHub. Takes one state or a list; prefix a state with '!' to exclude it."},"AdminRepositoryScanQueued":{"type":"object","properties":{"queued":{"type":"boolean","enum":[true]},"repositoryId":{"type":"string"}},"required":["queued","repositoryId"]},"AdminFinetuningDataPurgeQueued":{"type":"object","properties":{"queued":{"type":"boolean","enum":[true]},"workspaceId":{"type":"string"}},"required":["queued","workspaceId"]},"AdminFinetuningObject":{"type":"object","properties":{"key":{"type":"string"},"size":{"type":"number"},"uploaded":{"type":"string"},"kind":{"type":"string","enum":["snapshot","diff","event","other"]}},"required":["key","size","uploaded","kind"]},"AdminFinetuningObjectContent":{"type":"object","properties":{"key":{"type":"string"},"size":{"type":"number"},"uploaded":{"type":"string"},"json":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"text":{"type":"string","nullable":true}},"required":["key","size","uploaded","json","text"]},"Integration":{"type":"object","properties":{"id":{"type":"string","pattern":"^int_[0-9a-z]{24}$","description":"ID of the integration","example":"int_34gky74ibc92h8t2efn8csrh"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"name":{"type":"string","minLength":4,"maxLength":256,"description":"Name of the integration"},"installationId":{"type":"string","description":"Installation ID of the integration"},"externalId":{"type":"string","nullable":true,"description":"External ID of the integration"},"type":{"$ref":"#/components/schemas/Integration Type"},"metadata":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["slack"]},"data":{"type":"object","properties":{"teamId":{"type":"string"},"teamName":{"type":"string"},"teamDomain":{"type":"string"},"teamIcon":{"type":"string"},"appId":{"type":"string"},"botUserId":{"type":"string"},"botScope":{"type":"string"},"authedUserId":{"type":"string"},"installedAt":{"type":"number"},"botTokenCipher":{"type":"string"},"userTokenCipher":{"type":"string"},"enterpriseId":{"type":"string"},"enterpriseName":{"type":"string"},"notificationsChannelId":{"type":"string"},"notificationsChannelName":{"type":"string"},"notificationsDisabledAt":{"type":"number"},"proactive":{"type":"object","properties":{"mentionOnlyChannels":{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"channelName":{"type":"string"},"disabledAt":{"type":"number"},"disabledBy":{"type":"string"}},"required":["channelId","disabledAt","disabledBy"]}}},"required":["mentionOnlyChannels"]},"issueChannels":{"type":"object","properties":{"enabledAt":{"type":"number","nullable":true},"severities":{"type":"array","items":{"type":"string","enum":["critical","high","medium","low","info"]}},"inviteSlackUserIds":{"type":"array","items":{"type":"string"}}},"required":["enabledAt","severities"]}},"required":["teamId","teamName","appId","botUserId","botScope","authedUserId","installedAt","botTokenCipher"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["github"]},"installationId":{"type":"string"},"installation":{"nullable":true},"prReviewsDisabledAt":{"type":"number","nullable":true},"suspendedAt":{"type":"number","nullable":true},"installedBy":{"type":"object","properties":{"githubId":{"type":"string"},"login":{"type":"string"}},"required":["githubId"]}},"required":["type","installationId"]},{"type":"object","properties":{"type":{"type":"string","enum":["datadog"]},"site":{"type":"string"},"apiKey":{"type":"string"},"appKey":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"organizationName":{"type":"string"},"webhookName":{"type":"string"},"telemetryToken":{"type":"string"}},"required":["type","site","apiKey","appKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["honeycomb"]},"region":{"type":"string","enum":["us","eu"]},"apiKey":{"type":"string"},"teamSlug":{"type":"string"},"environmentSlug":{"type":"string"},"teamName":{"type":"string"},"environmentName":{"type":"string"},"recipientId":{"type":"string"},"telemetryToken":{"type":"string"},"managementApiKeyId":{"type":"string"},"managementApiKeySecret":{"type":"string"}},"required":["type","region","apiKey","teamSlug","environmentSlug"]},{"type":"object","properties":{"type":{"type":"string","enum":["axiom"]},"region":{"type":"string","enum":["us-east-1","eu-central-1"]},"apiToken":{"type":"string"},"notifierId":{"type":"string"},"telemetryToken":{"type":"string"}},"required":["type","region","apiToken"]},{"type":"object","properties":{"type":{"type":"string","enum":["betterstack"]},"apiToken":{"type":"string"},"teamName":{"type":"string"},"uptimeApiToken":{"type":"string"},"telemetryApiToken":{"type":"string"},"webhookId":{"type":"string"},"telemetryToken":{"type":"string"},"queryUsername":{"type":"string"},"queryPassword":{"type":"string"}},"required":["type","apiToken"]},{"type":"object","properties":{"type":{"type":"string","enum":["openstatus"]},"apiKey":{"type":"string"},"workspaceSlug":{"type":"string"},"plan":{"type":"string"},"notificationId":{"type":"string"},"telemetryToken":{"type":"string"}},"required":["type","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["depot"]},"apiToken":{"type":"string"},"organizationId":{"type":"string"},"githubAccount":{"type":"string"}},"required":["type","apiToken"]},{"type":"object","properties":{"type":{"type":"string","enum":["incident_io"]},"apiKey":{"type":"string"},"keyName":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"workflowId":{"type":"string"},"secretId":{"type":"string"},"webhookSecret":{"type":"string"},"alertSourceId":{"type":"string"},"alertSourceToken":{"type":"string"},"alertEventsUrl":{"type":"string"},"escalationSeverity":{"type":"string","enum":["critical","high","medium","low"]},"setupFailures":{"type":"array","items":{"type":"string","enum":["investigation_webhook","escalation_alerts"]}}},"required":["type","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["grafana"]},"stackUrl":{"type":"string"},"serviceAccountToken":{"type":"string"},"orgName":{"type":"string"},"telemetryToken":{"type":"string"},"contactPointUid":{"type":"string"}},"required":["type","stackUrl","serviceAccountToken"]},{"type":"object","properties":{"type":{"type":"string","enum":["logfire"]},"region":{"type":"string","enum":["us","eu"]},"apiKey":{"type":"string"},"organizationApiKey":{"type":"string"},"projectName":{"type":"string"},"organizationName":{"type":"string"},"projectUrl":{"type":"string"},"projectId":{"type":"string"},"telemetryToken":{"type":"string"},"channelId":{"type":"string"},"channelUrl":{"type":"string"}},"required":["type","region","apiKey","projectName"]},{"type":"object","properties":{"type":{"type":"string","enum":["langsmith"]},"region":{"type":"string","enum":["us","eu","apac"]},"apiKey":{"type":"string"},"workspaceId":{"type":"string"},"workspaceName":{"type":"string"},"organizationId":{"type":"string"},"organizationName":{"type":"string"},"telemetryToken":{"type":"string"},"webhookUrl":{"type":"string"}},"required":["type","region","apiKey","workspaceId","workspaceName"]},{"type":"object","properties":{"type":{"type":"string","enum":["braintrust"]},"apiKey":{"type":"string"},"apiUrl":{"type":"string"},"organizationId":{"type":"string"},"organizationName":{"type":"string"},"telemetryToken":{"type":"string"},"webhookUrl":{"type":"string"}},"required":["type","apiKey","apiUrl","organizationId","organizationName"]},{"type":"object","properties":{"type":{"type":"string","enum":["newrelic"]},"region":{"type":"string","enum":["us","eu"]},"apiKey":{"type":"string"},"accountId":{"type":"integer"},"accountName":{"type":"string"},"userEmail":{"type":"string"},"telemetryToken":{"type":"string"},"webhookUrl":{"type":"string"}},"required":["type","region","apiKey","accountId","accountName"]},{"type":"object","properties":{"type":{"type":"string","enum":["sentry"]},"organizationSlug":{"type":"string"},"organizationName":{"type":"string"},"installationUuid":{"type":"string"},"sentryAppId":{"type":"number"},"accessTokenCipher":{"type":"string"},"refreshTokenCipher":{"type":"string"},"expiresAt":{"type":"number"},"telemetryToken":{"type":"string"}},"required":["type","organizationSlug","installationUuid","accessTokenCipher","refreshTokenCipher","expiresAt"]},{"type":"object","properties":{"type":{"type":"string","enum":["posthog"]},"region":{"type":"string","enum":["US","EU"]},"baseUrl":{"type":"string"},"teamId":{"type":"number"},"projectName":{"type":"string"},"organizationId":{"type":"string"},"organizationName":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"scopedTeams":{"type":"array","items":{"type":"number"}},"clientId":{"type":"string"},"refreshTokenCipher":{"type":"string"},"accessTokenCipher":{"type":"string"},"accessTokenExpiresAt":{"type":"number"},"webhookSecretCipher":{"type":"string"},"webhookId":{"type":"string"}},"required":["type","region","baseUrl","teamId","projectName","organizationId","organizationName","scopes","scopedTeams","clientId","refreshTokenCipher","accessTokenCipher","accessTokenExpiresAt"]},{"type":"object","properties":{"type":{"type":"string","enum":["mcp"]},"url":{"type":"string"},"transport":{"type":"string","enum":["http","sse"]},"authMethod":{"type":"string","enum":["bearer","oauth"]},"authHeaderCipher":{"type":"string"},"oauth":{"type":"object","properties":{"clientInfo":{"type":"object","properties":{"issuer":{"type":"string"},"clientId":{"type":"string"},"clientSecretCipher":{"type":"string"},"clientIdIssuedAt":{"type":"number"},"clientSecretExpiresAt":{"type":"number"},"redirectUri":{"type":"string"},"tokenEndpointAuthMethod":{"type":"string"}},"required":["clientId","redirectUri"]},"tokens":{"type":"object","properties":{"issuer":{"type":"string"},"accessTokenCipher":{"type":"string"},"refreshTokenCipher":{"type":"string"},"tokenType":{"type":"string"},"expiresAt":{"type":"number"},"scope":{"type":"string"}},"required":["accessTokenCipher"]},"discovery":{"type":"object","properties":{"authorizationServerUrl":{"type":"string"},"resourceMetadataUrl":{"type":"string"},"authorizationServerMetadata":{"anyOf":[{"type":"object","properties":{"issuer":{"type":"string"},"authorization_endpoint":{"type":"string","format":"uri"},"token_endpoint":{"type":"string","format":"uri"},"registration_endpoint":{"type":"string","format":"uri"},"scopes_supported":{"type":"array","items":{"type":"string"}},"response_types_supported":{"type":"array","items":{"type":"string"}},"response_modes_supported":{"type":"array","items":{"type":"string"}},"grant_types_supported":{"type":"array","items":{"type":"string"}},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}},"token_endpoint_auth_signing_alg_values_supported":{"type":"array","items":{"type":"string"}},"service_documentation":{"type":"string","format":"uri"},"revocation_endpoint":{"type":"string","format":"uri"},"revocation_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}},"revocation_endpoint_auth_signing_alg_values_supported":{"type":"array","items":{"type":"string"}},"introspection_endpoint":{"type":"string"},"introspection_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}},"introspection_endpoint_auth_signing_alg_values_supported":{"type":"array","items":{"type":"string"}},"code_challenge_methods_supported":{"type":"array","items":{"type":"string"}},"client_id_metadata_document_supported":{"type":"boolean"}},"required":["issuer","authorization_endpoint","token_endpoint","response_types_supported"],"additionalProperties":{"nullable":true}},{"type":"object","properties":{"issuer":{"type":"string"},"authorization_endpoint":{"type":"string","format":"uri"},"token_endpoint":{"type":"string","format":"uri"},"userinfo_endpoint":{"type":"string","format":"uri"},"jwks_uri":{"type":"string","format":"uri"},"registration_endpoint":{"type":"string","format":"uri"},"scopes_supported":{"type":"array","items":{"type":"string"}},"response_types_supported":{"type":"array","items":{"type":"string"}},"response_modes_supported":{"type":"array","items":{"type":"string"}},"grant_types_supported":{"type":"array","items":{"type":"string"}},"acr_values_supported":{"type":"array","items":{"type":"string"}},"subject_types_supported":{"type":"array","items":{"type":"string"}},"id_token_signing_alg_values_supported":{"type":"array","items":{"type":"string"}},"id_token_encryption_alg_values_supported":{"type":"array","items":{"type":"string"}},"id_token_encryption_enc_values_supported":{"type":"array","items":{"type":"string"}},"userinfo_signing_alg_values_supported":{"type":"array","items":{"type":"string"}},"userinfo_encryption_alg_values_supported":{"type":"array","items":{"type":"string"}},"userinfo_encryption_enc_values_supported":{"type":"array","items":{"type":"string"}},"request_object_signing_alg_values_supported":{"type":"array","items":{"type":"string"}},"request_object_encryption_alg_values_supported":{"type":"array","items":{"type":"string"}},"request_object_encryption_enc_values_supported":{"type":"array","items":{"type":"string"}},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}},"token_endpoint_auth_signing_alg_values_supported":{"type":"array","items":{"type":"string"}},"display_values_supported":{"type":"array","items":{"type":"string"}},"claim_types_supported":{"type":"array","items":{"type":"string"}},"claims_supported":{"type":"array","items":{"type":"string"}},"service_documentation":{"type":"string"},"claims_locales_supported":{"type":"array","items":{"type":"string"}},"ui_locales_supported":{"type":"array","items":{"type":"string"}},"claims_parameter_supported":{"type":"boolean"},"request_parameter_supported":{"type":"boolean"},"request_uri_parameter_supported":{"type":"boolean"},"require_request_uri_registration":{"type":"boolean"},"op_policy_uri":{"type":"string","format":"uri"},"op_tos_uri":{"type":"string","format":"uri"},"client_id_metadata_document_supported":{"type":"boolean"},"code_challenge_methods_supported":{"type":"array","items":{"type":"string"}}},"required":["issuer","authorization_endpoint","token_endpoint","jwks_uri","response_types_supported","subject_types_supported","id_token_signing_alg_values_supported"]}]},"resourceMetadata":{"type":"object","properties":{"resource":{"type":"string","format":"uri"},"authorization_servers":{"type":"array","items":{"type":"string","format":"uri"}},"jwks_uri":{"type":"string","format":"uri"},"scopes_supported":{"type":"array","items":{"type":"string"}},"bearer_methods_supported":{"type":"array","items":{"type":"string"}},"resource_signing_alg_values_supported":{"type":"array","items":{"type":"string"}},"resource_name":{"type":"string"},"resource_documentation":{"type":"string"},"resource_policy_uri":{"type":"string","format":"uri"},"resource_tos_uri":{"type":"string","format":"uri"},"tls_client_certificate_bound_access_tokens":{"type":"boolean"},"authorization_details_types_supported":{"type":"array","items":{"type":"string"}},"dpop_signing_alg_values_supported":{"type":"array","items":{"type":"string"}},"dpop_bound_access_tokens_required":{"type":"boolean"}},"required":["resource"],"additionalProperties":{"nullable":true}}},"required":["authorizationServerUrl"]},"scope":{"type":"string"}}},"extraHeadersCipher":{"type":"string"},"serverInfo":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"},"protocolVersion":{"type":"string"}}},"toolsSnapshot":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"inputSchema":{"type":"object","additionalProperties":{"nullable":true}}},"required":["name"]}},"toolsSnapshotRefreshedAt":{"type":"number"},"enabledTools":{"type":"array","items":{"type":"string"}}},"required":["type","url","transport"]},{"type":"object","properties":{"type":{"type":"string","enum":["devin"]},"devinOrgId":{"type":"string"},"apiKey":{"type":"string"}},"required":["type","devinOrgId","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["cursor"]},"cursorUserId":{"type":"string"},"apiKey":{"type":"string"},"mcpApiKeyId":{"type":"string"},"mcpApiKeyToken":{"type":"string"},"mcpInjectionDisabledAt":{"type":"number","nullable":true}},"required":["type","cursorUserId","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["factory"]},"apiKey":{"type":"string"}},"required":["type","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["conductor"]},"apiKey":{"type":"string"}},"required":["type","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["capy"]},"apiKey":{"type":"string"}},"required":["type","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["amp"]},"apiKey":{"type":"string"}},"required":["type","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["mixpanel"]},"region":{"type":"string","enum":["us","eu","in"]},"serviceAccountUsername":{"type":"string"},"serviceAccountSecret":{"type":"string"},"projectId":{"type":"number"},"mixpanelWorkspaceId":{"type":"number"},"projectName":{"type":"string"},"organizationName":{"type":"string"}},"required":["type","region","serviceAccountUsername","serviceAccountSecret","projectId"]},{"type":"object","properties":{"type":{"type":"string","enum":["amplitude"]},"region":{"type":"string","enum":["us","eu"]},"apiKey":{"type":"string"},"secretKey":{"type":"string"}},"required":["type","region","apiKey","secretKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["linear"]},"apiKey":{"type":"string"},"organizationId":{"type":"string"},"organizationName":{"type":"string"},"organizationUrlKey":{"type":"string"},"connectedUserName":{"type":"string"},"connectedUserEmail":{"type":"string"},"webhookId":{"type":"string"},"webhookSecret":{"type":"string"}},"required":["type","apiKey","organizationId"]},{"type":"object","properties":{"type":{"type":"string","enum":["coding_agent"]},"machineFingerprint":{"type":"string"},"repoRemotes":{"type":"array","items":{"type":"string"}},"clientName":{"type":"string"},"clientVersion":{"type":"string"},"lastSeen":{"type":"number","nullable":true},"supersededBy":{"type":"string"},"supersededAt":{"type":"number"}},"required":["type","machineFingerprint","repoRemotes","lastSeen"]},{"type":"object","properties":{"type":{"type":"string","enum":["circleci"]},"apiKey":{"type":"string"},"organizationId":{"type":"string"},"organizationSlug":{"type":"string"}},"required":["type","apiKey","organizationId","organizationSlug"]},{"nullable":true}],"description":"Metadata related to the integration"},"createdBy":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"ownerId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"lastEditedBy":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"visibility":{"type":"string","enum":["public","private","unlisted","workspace","workspace_and_guests","workspace_and_github_org","private_and_guests","team","team_and_guests","custom","internal"],"description":"Visibility level"},"guests":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Guest email addresses"},"labels":{"type":"array","items":{"type":"string"},"description":"Integration labels"},"initialised":{"type":"string","nullable":true,"format":"date-time"},"disabled":{"type":"string","nullable":true,"format":"date-time"},"lastFailureAt":{"type":"string","nullable":true,"format":"date-time"},"anomalyChecksDisabled":{"type":"string","nullable":true,"format":"date-time","description":"When anomaly checks were disabled for this integration, or null if enabled"},"anomalyCheckIntervalMinutes":{"type":"number","nullable":true,"description":"How often anomaly checks run for this integration, in minutes. Null means the default interval."},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["integration"]}},"required":["id","workspaceId","name","installationId","externalId","type","metadata","createdBy","ownerId","lastEditedBy","visibility","guests","labels","initialised","disabled","lastFailureAt","anomalyChecksDisabled","anomalyCheckIntervalMinutes","created","updated","_object"],"additionalProperties":false},"Integration Type":{"type":"string","enum":["github","slack","datadog","honeycomb","axiom","betterstack","openstatus","depot","incident_io","grafana","logfire","langsmith","braintrust","newrelic","sentry","mcp","devin","cursor","factory","conductor","capy","amp","mixpanel","posthog","amplitude","linear","coding_agent","circleci"],"description":"Integration type"},"SlackIssueChannels":{"type":"object","properties":{"enabledAt":{"type":"number","nullable":true,"description":"When set, a new fix run at a selected severity opens a public Slack channel on this team that the run manages; null turns Issue channels off and keeps the severities"},"severities":{"type":"array","items":{"type":"string","enum":["critical","high","medium","low","info"]},"maxItems":5,"description":"Issue severities whose fix runs open a channel; a repository's own selection in its settings wins"},"inviteSlackUserIds":{"type":"array","items":{"type":"string","pattern":"^[UW][A-Z0-9]{2,}$"},"maxItems":100,"description":"Slack member ids that each new Issue channel invites; when never set, the person who installed the app"}},"additionalProperties":false},"AdminSubmittedPr":{"type":"object","properties":{"id":{"type":"string"},"integrationId":{"type":"string"},"repositoryId":{"type":"string","nullable":true},"owner":{"type":"string"},"repo":{"type":"string"},"prNumber":{"type":"number"},"prUrl":{"type":"string"},"title":{"type":"string"},"source":{"type":"string","enum":["autofix","conductor","capy","amp","factory","devin","cursor","automation","onboarding","improvement","agent_tool"]},"sourceId":{"type":"string","nullable":true},"headSha":{"type":"string","nullable":true},"diffR2Key":{"type":"string","nullable":true},"bodyR2Key":{"type":"string","nullable":true},"createdAtMs":{"type":"number"},"mergedAtMs":{"type":"number","nullable":true},"closedAtMs":{"type":"number","nullable":true}},"required":["id","integrationId","repositoryId","owner","repo","prNumber","prUrl","title","source","sourceId","headSha","diffR2Key","bodyR2Key","createdAtMs","mergedAtMs","closedAtMs"]},"AdminPostedPrComment":{"type":"object","properties":{"id":{"type":"string"},"integrationId":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"},"prNumber":{"type":"number"},"githubCommentId":{"type":"number"},"kind":{"type":"string","enum":["sticky_verdict","connect_cloud_stub","inline_review","improvement_announce","clarification_reply","improvement_close","stale_close","stale_reminder","autofix_commit_reply","autofix_followup","executor_attribution","covering_pr","automation_comment","automation_issue_comment","agent_tool_comment","agent_tool_review","comment_reply"]},"verdict":{"type":"string","nullable":true,"enum":["has_production_impact","no_production_impact","issue_fixed","not_reviewed",null]},"url":{"type":"string"},"postedAtMs":{"type":"number"},"supersededAtMs":{"type":"number","nullable":true},"reactionsDispatchAttempts":{"type":"number"},"reactionsEnqueuedAtMs":{"type":"number","nullable":true},"reactionsStartedAtMs":{"type":"number","nullable":true},"reactionsCompletedAtMs":{"type":"number","nullable":true},"reactionsStopReason":{"type":"string","nullable":true,"enum":["integration_unavailable","comment_unavailable","dispatch_failed",null]},"reactionsStopGithubStatus":{"type":"number","nullable":true}},"required":["id","integrationId","owner","repo","prNumber","githubCommentId","kind","verdict","url","postedAtMs","supersededAtMs","reactionsDispatchAttempts","reactionsEnqueuedAtMs","reactionsStartedAtMs","reactionsCompletedAtMs","reactionsStopReason","reactionsStopGithubStatus"]},"AdminSubmittedPrDiff":{"type":"object","properties":{"id":{"type":"string"},"diffR2Key":{"type":"string"},"size":{"type":"number"},"diff":{"type":"string"}},"required":["id","diffR2Key","size","diff"]},"AdminSubmittedPrBody":{"type":"object","properties":{"id":{"type":"string"},"bodyR2Key":{"type":"string"},"size":{"type":"number"},"body":{"type":"string"}},"required":["id","bodyR2Key","size","body"]},"AdminPrCommentReaction":{"type":"object","properties":{"id":{"type":"string"},"postedCommentId":{"type":"string"},"integrationId":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"},"prNumber":{"type":"number"},"containerType":{"type":"string","enum":["pull_request","issue"]},"prUrl":{"type":"string"},"prTitle":{"type":"string","nullable":true},"prState":{"type":"string","nullable":true,"enum":["open","closed","merged",null]},"prHeadSha":{"type":"string","nullable":true},"prCreatedAtMs":{"type":"number","nullable":true},"prMergedAtMs":{"type":"number","nullable":true},"prClosedAtMs":{"type":"number","nullable":true},"prAdditions":{"type":"number","nullable":true},"prDeletions":{"type":"number","nullable":true},"prChangedFiles":{"type":"number","nullable":true},"prLanguage":{"type":"string","nullable":true},"githubCommentId":{"type":"number"},"kind":{"type":"string","enum":["sticky_verdict","connect_cloud_stub","inline_review","improvement_announce","clarification_reply","improvement_close","stale_close","stale_reminder","autofix_commit_reply","autofix_followup","executor_attribution","covering_pr","automation_comment","automation_issue_comment","agent_tool_comment","agent_tool_review","comment_reply"]},"verdict":{"type":"string","nullable":true,"enum":["has_production_impact","no_production_impact","issue_fixed","not_reviewed",null]},"commentUrl":{"type":"string"},"commentPostedAtMs":{"type":"number"},"captureSequence":{"type":"number"},"lastAttemptAtMs":{"type":"number"},"lastAttemptStatus":{"type":"string","enum":["collected","missing","failed"]},"lastGithubStatus":{"type":"number","nullable":true},"capturesAttempted":{"type":"number"},"capturesCollected":{"type":"number"},"capturesSinceChange":{"type":"number"},"lastCapturedAtMs":{"type":"number","nullable":true},"lastChangedAtMs":{"type":"number","nullable":true},"commentAgeMs":{"type":"number","nullable":true},"totalCount":{"type":"number","nullable":true},"previousTotalCount":{"type":"number","nullable":true},"plusOne":{"type":"number","nullable":true},"minusOne":{"type":"number","nullable":true},"laugh":{"type":"number","nullable":true},"confused":{"type":"number","nullable":true},"heart":{"type":"number","nullable":true},"hooray":{"type":"number","nullable":true},"eyes":{"type":"number","nullable":true},"rocket":{"type":"number","nullable":true},"reactors":{"type":"array","nullable":true,"items":{"type":"object","properties":{"login":{"type":"string"},"reaction":{"type":"string","enum":["plusOne","minusOne","laugh","confused","heart","hooray","eyes","rocket"]}},"required":["login","reaction"]}},"submittedPrId":{"type":"string","nullable":true},"submittedPrSource":{"type":"string","nullable":true,"enum":["autofix","conductor","capy","amp","factory","devin","cursor","automation","onboarding","improvement","agent_tool",null]},"autofixId":{"type":"string","nullable":true},"autofixExecutor":{"type":"string","nullable":true},"autofixTrigger":{"type":"string","nullable":true}},"required":["id","postedCommentId","integrationId","owner","repo","prNumber","containerType","prUrl","prTitle","prState","prHeadSha","prCreatedAtMs","prMergedAtMs","prClosedAtMs","prAdditions","prDeletions","prChangedFiles","prLanguage","githubCommentId","kind","verdict","commentUrl","commentPostedAtMs","captureSequence","lastAttemptAtMs","lastAttemptStatus","lastGithubStatus","capturesAttempted","capturesCollected","capturesSinceChange","lastCapturedAtMs","lastChangedAtMs","commentAgeMs","totalCount","previousTotalCount","plusOne","minusOne","laugh","confused","heart","hooray","eyes","rocket","reactors","submittedPrId","submittedPrSource","autofixId","autofixExecutor","autofixTrigger"]},"AdminPrCommentReactionSummaryRow":{"type":"object","properties":{"kind":{"type":"string","enum":["sticky_verdict","connect_cloud_stub","inline_review","improvement_announce","clarification_reply","improvement_close","stale_close","stale_reminder","autofix_commit_reply","autofix_followup","executor_attribution","covering_pr","automation_comment","automation_issue_comment","agent_tool_comment","agent_tool_review","comment_reply"]},"comments":{"type":"number"},"collected":{"type":"number"},"lastMissing":{"type":"number"},"lastFailed":{"type":"number"},"stillMoving":{"type":"number"},"totalCount":{"type":"number"},"plusOne":{"type":"number"},"minusOne":{"type":"number"},"laugh":{"type":"number"},"confused":{"type":"number"},"heart":{"type":"number"},"hooray":{"type":"number"},"eyes":{"type":"number"},"rocket":{"type":"number"}},"required":["kind","comments","collected","lastMissing","lastFailed","stillMoving","totalCount","plusOne","minusOne","laugh","confused","heart","hooray","eyes","rocket"]},"AdminIntegrationPullRequest":{"type":"object","properties":{"owner":{"type":"string"},"repo":{"type":"string"},"prNumber":{"type":"number"},"containerType":{"type":"string","enum":["pull_request","issue"]},"url":{"type":"string"},"title":{"type":"string"},"body":{"type":"string","nullable":true},"author":{"type":"string","nullable":true},"state":{"type":"string","nullable":true,"enum":["open","closed","merged",null]},"headSha":{"type":"string","nullable":true},"additions":{"type":"number","nullable":true},"deletions":{"type":"number","nullable":true},"changedFiles":{"type":"number","nullable":true},"createdAtMs":{"type":"number","nullable":true},"mergedAtMs":{"type":"number","nullable":true},"closedAtMs":{"type":"number","nullable":true},"diff":{"type":"string","nullable":true},"diffTruncated":{"type":"boolean"},"diffTotalChars":{"type":"number"},"source":{"type":"string","enum":["github","archived"]},"submittedPr":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"source":{"type":"string","enum":["autofix","conductor","capy","amp","factory","devin","cursor","automation","onboarding","improvement","agent_tool"]},"sourceId":{"type":"string","nullable":true},"createdAtMs":{"type":"number"}},"required":["id","source","sourceId","createdAtMs"]}},"required":["owner","repo","prNumber","containerType","url","title","body","author","state","headSha","additions","deletions","changedFiles","createdAtMs","mergedAtMs","closedAtMs","diff","diffTruncated","diffTotalChars","source","submittedPr"]},"AdminIntegrationPullRequestComment":{"type":"object","properties":{"postedCommentId":{"type":"string"},"githubCommentId":{"type":"number"},"target":{"type":"string","enum":["issue_comment","review_comment","review"]},"body":{"type":"string","nullable":true},"author":{"type":"string","nullable":true},"updatedAtMs":{"type":"number","nullable":true}},"required":["postedCommentId","githubCommentId","target","body","author","updatedAtMs"]},"AdminPrCommentReactionsBackfill":{"type":"object","properties":{"dryRun":{"type":"boolean"},"queued":{"type":"array","items":{"type":"string"}},"workspaces":{"type":"array","items":{"type":"object","properties":{"workspaceId":{"type":"string"},"comments":{"type":"number"},"pullRequests":{"type":"number"},"preview":{"type":"array","items":{"type":"object","properties":{"postedCommentId":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"},"prNumber":{"type":"number"},"kind":{"type":"string","enum":["sticky_verdict","connect_cloud_stub","inline_review","improvement_announce","clarification_reply","improvement_close","stale_close","stale_reminder","autofix_commit_reply","autofix_followup","executor_attribution","covering_pr","automation_comment","automation_issue_comment","agent_tool_comment","agent_tool_review","comment_reply"]},"url":{"type":"string"},"postedAtMs":{"type":"number"}},"required":["postedCommentId","owner","repo","prNumber","kind","url","postedAtMs"]}}},"required":["workspaceId","comments","pullRequests","preview"]}},"totals":{"type":"object","properties":{"workspaces":{"type":"number"},"comments":{"type":"number"},"pullRequests":{"type":"number"}},"required":["workspaces","comments","pullRequests"]}},"required":["dryRun","queued","workspaces","totals"]},"AdminPrCommentReactionsBackfillRequest":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"Run for this workspace only; every workspace when omitted","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"dryRun":{"type":"boolean","default":true,"description":"List the comments a run would read and change nothing"}}},"Slack Channel Detail":{"type":"object","properties":{"channelId":{"type":"string"},"channelName":{"type":"string"}},"required":["channelId"]},"Slack Channel Proactive Mode Detail":{"type":"object","properties":{"channelId":{"type":"string"},"mentionOnly":{"type":"boolean"}},"required":["channelId","mentionOnly"]},"Slack Channel Proactive Mode":{"type":"object","properties":{"mentionOnly":{"type":"boolean"}},"required":["mentionOnly"],"additionalProperties":false},"Grouped Infrastructure Statistics":{"allOf":[{"type":"object","additionalProperties":{"nullable":true}},{"type":"object","properties":{"count":{"type":"number"}},"required":["count"],"additionalProperties":false}]},"Infrastructure Node":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"data":{"type":"object","additionalProperties":{"nullable":true}},"alternateNames":{"type":"array","items":{"type":"string"},"description":"Alternate names discovered from observability providers (service names, dataset names, etc.)"},"createdBy":{"type":"string"},"lastEditedBy":{"type":"string"},"updated":{"type":"string","nullable":true,"format":"date-time"},"created":{"type":"string","nullable":true,"format":"date-time"},"id":{"type":"string","description":"The ID of the node in the cloud account"},"provider":{"type":"string","description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","x-shared-enum":"cloudProvider"},"account":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud account the node is part of"},"region":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud region the node is part of"},"type":{"type":"string","description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","x-shared-enum":"nodeType"},"category":{"type":"string","enum":["compute","storage","database","networking","messaging","security","observability","code","identity","configuration","environment","external","other"],"description":"Broad functional category derived from the resource type"},"tier":{"type":"number","nullable":true,"description":"Monitoring tier (1-4), or null when not yet classified"},"tierSource":{"type":"string","nullable":true,"enum":["agent","manual",null],"description":"Whether the tier was assigned automatically or set manually"},"tierUpdatedAt":{"type":"string","nullable":true,"description":"When the tier was last updated"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["infra_node"]}},"required":["workspaceId","data","alternateNames","createdBy","lastEditedBy","updated","created","id","provider","account","region","type","category","_object"],"additionalProperties":false},"Infrastructure Node Composite ID":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the node in the cloud account"},"provider":{"type":"string","description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","x-shared-enum":"cloudProvider"},"account":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud account the node is part of"},"region":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud region the node is part of"},"type":{"type":"string","description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","x-shared-enum":"nodeType"}},"required":["id","provider","account","region","type"],"additionalProperties":false},"ResourceAdvisory":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string","enum":["observability","resilience","security","data-protection","lifecycle"]},"severity":{"type":"string","enum":["warning","info"]},"title":{"type":"string"},"message":{"type":"string"},"remediation":{"type":"string"},"fixability":{"type":"string","enum":["in-place","guidance"]},"dismissedAtMs":{"type":"number","nullable":true,"description":"When this advisory was ignored for this resource, or null if active"},"dismissedBy":{"type":"string","nullable":true}},"required":["id","category","severity","title","message","remediation","fixability","dismissedAtMs","dismissedBy"]},"Infrastructure Edge":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"source":{"$ref":"#/components/schemas/Infrastructure Node Composite ID"},"target":{"$ref":"#/components/schemas/Infrastructure Node Composite ID"},"properties":{"type":"object","additionalProperties":{"nullable":true}},"relationship":{"type":"string","enum":["connects_to","publishes_to","contains","is_tailed","uses","defines","encrypts","serves","invokes","triggers","assumes","impersonates","accesses","manages","runs_on","controls","deploys_to","owns","monitors","allows_traffic_from"]},"discoveredVia":{"type":"string","enum":["infrastructure_sweep","asset_inventory","environment_variables","traces","agent","manual","repository","integration","local_agent"]},"createdBy":{"type":"string"},"lastEditedBy":{"type":"string"},"updated":{"type":"string","nullable":true,"format":"date-time"},"created":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["infra_edge"]}},"required":["workspaceId","source","target","properties","relationship","discoveredVia","createdBy","lastEditedBy","updated","created","_object"],"additionalProperties":false},"Get Node Edges Parameters":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"id":{"type":"string","description":"The ID of the node in the cloud account"},"provider":{"type":"string","description":"Cloud provider name. Must be a value listed in the `cloudProvider` enum (see <enums> in the system prompt).","x-shared-enum":"cloudProvider"},"account":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud account the node is part of"},"region":{"type":"string","pattern":"^[a-zA-Z0-9]+(?:[_\\-:.#][a-zA-Z0-9]+)*$","description":"The cloud region the node is part of"},"type":{"type":"string","description":"Identifies the kind of cloud resource. Must be a value listed in the `nodeType` enum (see the <enums> section in the system prompt or the `enums` field of a searchToolCatalog response).","x-shared-enum":"nodeType"},"orderBy":{"type":"string","enum":["source","target","relationship","discovered_via","created_by","last_edited_by","created","updated"],"description":"Column to order edges by"},"orderDirection":{"type":"string","enum":["ASC","DESC"],"description":"Sort direction"}},"required":["workspaceId","id","provider","account","region","type"],"additionalProperties":false},"Infrastructure Blast Radius":{"type":"object","properties":{"summary":{"type":"object","properties":{"reached":{"type":"array","items":{"type":"object","properties":{"compositeId":{"type":"string","description":"Composite ID of the reached node"},"name":{"type":"string"},"type":{"type":"string"},"tier":{"type":"number","nullable":true},"hops":{"type":"number"},"via":{"type":"string","enum":["connects_to","publishes_to","contains","is_tailed","uses","defines","encrypts","serves","invokes","triggers","assumes","impersonates","accesses","manages","runs_on","controls","deploys_to","owns","monitors","allows_traffic_from"],"description":"The relationship the fault crossed to reach this node"},"from":{"type":"string","description":"Composite ID of the node the fault arrived from"},"volume":{"type":"object","nullable":true,"properties":{"metric":{"type":"string"},"mean":{"type":"number"}},"required":["metric","mean"],"additionalProperties":false,"description":"Observed request-like volume; null means unmeasured, never zero"}},"required":["compositeId","name","type","tier","hops","via","from","volume"],"additionalProperties":false}},"reachedVolume":{"type":"number"},"totalVolume":{"type":"number"},"trafficShare":{"type":"number","nullable":true},"unmeasuredReachedCount":{"type":"number"},"truncated":{"type":"boolean"},"semanticsVersion":{"type":"number"}},"required":["reached","reachedVolume","totalVolume","trafficShare","unmeasuredReachedCount","truncated","semanticsVersion"],"additionalProperties":false},"reachedParams":{"type":"array","items":{"$ref":"#/components/schemas/Infrastructure Node Composite ID"},"description":"Composite-ID params for each reached node, in reach order"}},"required":["summary","reachedParams"],"additionalProperties":false},"Calculation":{"type":"object","properties":{"alias":{"type":"string"},"calculation":{"type":"string"},"aggregates":{"type":"array","items":{"$ref":"#/components/schemas/Aggregate"}},"series":{"type":"array","items":{"type":"object","properties":{"time":{"type":"string","format":"date-time"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Aggregate"}}},"required":["time","data"],"additionalProperties":false}},"volumeSeries":{"type":"boolean"}},"required":["calculation","aggregates","series"],"additionalProperties":false},"Aggregate":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["key","value"],"additionalProperties":false}},"groupKey":{"type":"string"},"value":{"type":"number"},"count":{"type":"number"}},"required":["groups","groupKey","value","count"],"additionalProperties":false},"NodeLogTemplates":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"fingerprint":{"type":"string"},"template":{"type":"string"},"severity":{"type":"string","enum":["ERROR","WARN","INFO","DEBUG","UNKNOWN"]},"sample":{"type":"string"},"firstSeenMs":{"type":"number"},"lastSeenMs":{"type":"number"},"totalCount":{"type":"number"},"ewmaRatePerHour":{"type":"number"},"observedRuns":{"type":"number"}},"required":["fingerprint","template","severity","sample","firstSeenMs","lastSeenMs","totalCount","ewmaRatePerHour","observedRuns"]}}},"required":["templates"]},"AdvisoryDismissal":{"type":"object","properties":{"nodeCompositeId":{"type":"string"},"advisoryId":{"type":"string"},"dismissedAt":{"type":"number","nullable":true,"description":"When the advisory was ignored, or null after a restore"},"dismissedBy":{"type":"string","nullable":true}},"required":["nodeCompositeId","advisoryId","dismissedAt","dismissedBy"]},"AdminWorkspaceAdvisories":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["resource","repository"]},"category":{"type":"string","enum":["observability","resilience","security","data-protection","lifecycle"]},"severity":{"type":"string","enum":["warning","info"]},"fixability":{"type":"string","enum":["in-place","guidance"]},"title":{"type":"string"},"message":{"type":"string"},"count":{"type":"number"},"resources":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"account":{"type":"string"},"region":{"type":"string"},"type":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"severity":{"type":"string","enum":["warning","info"]}},"required":["provider","account","region","type","id","name","title","severity"]}},"repositories":{"type":"array","items":{"type":"object","properties":{"repositoryId":{"type":"string"},"owner":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"url":{"type":"string","nullable":true}},"required":["repositoryId","owner","name","provider","url"]}}},"required":["id","kind","category","severity","fixability","title","message","count","resources"]}},"coverage":{"type":"object","properties":{"totalNodes":{"type":"number"},"monitorableNodes":{"type":"number"},"monitoredNodes":{"type":"number"},"minimalNodes":{"type":"number"},"observabilityGapNodes":{"type":"number"}},"required":["totalNodes","monitorableNodes","monitoredNodes","minimalNodes","observabilityGapNodes"]},"dismissed":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"title":{"type":"string"},"category":{"type":"string","enum":["observability","resilience","security","data-protection","lifecycle"]},"severity":{"type":"string","enum":["warning","info"]},"resource":{"type":"object","properties":{"provider":{"type":"string"},"account":{"type":"string"},"region":{"type":"string"},"type":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"severity":{"type":"string","enum":["warning","info"]}},"required":["provider","account","region","type","id","name","title","severity"]},"dismissedAtMs":{"type":"number"},"dismissedBy":{"type":"string"}},"required":["ruleId","title","category","severity","resource","dismissedAtMs","dismissedBy"]}},"repositoryDismissed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ruleId":{"type":"string"},"title":{"type":"string"},"severity":{"type":"string","enum":["warning","info"]},"filePath":{"type":"string","nullable":true},"repository":{"type":"object","properties":{"repositoryId":{"type":"string"},"owner":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"url":{"type":"string","nullable":true}},"required":["repositoryId","owner","name","provider","url"]},"dismissedAtMs":{"type":"number"},"dismissedBy":{"type":"string","nullable":true}},"required":["id","ruleId","title","severity","filePath","repository","dismissedAtMs","dismissedBy"]}}},"required":["groups","coverage","dismissed","repositoryDismissed"]},"GcpConnectionRequest":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"requestId":{"type":"string","pattern":"^gcpconn_[0-9a-z]{24}$","description":"ID of the gcp_connection_request","example":"gcpconn_38mg3o4ibc92h8t2efn8csrh"},"projectId":{"type":"string","pattern":"^[a-z][a-z0-9-]{4,28}[a-z0-9]$","description":"Google Cloud project ID"},"subject":{"type":"string"},"issuerUrl":{"type":"string","format":"uri"},"pushEndpoint":{"type":"string","format":"uri"},"resourcePrefix":{"type":"string"},"status":{"type":"string","enum":["pending","active","revoked","expired"]},"cloudAccountId":{"type":"string","nullable":true,"pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"},"projectNumber":{"type":"string","nullable":true},"pushSubject":{"type":"string","nullable":true},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"registeredAt":{"type":"string","nullable":true},"blueprintRef":{"type":"string","nullable":true,"description":"Blueprint release the dashboard setup last applied, or null when it is not recorded"},"setupMethod":{"type":"string","enum":["dashboard","script"]},"investigateAlertsAt":{"type":"string","nullable":true},"alertSubscriptionCheckedAt":{"type":"string","nullable":true},"alertSubscriptionError":{"type":"string","nullable":true}},"required":["workspaceId","requestId","projectId","subject","issuerUrl","pushEndpoint","resourcePrefix","status","cloudAccountId","projectNumber","pushSubject","createdBy","createdAt","expiresAt","registeredAt","blueprintRef","setupMethod"],"additionalProperties":false},"CreateGcpConnectionRequest":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"projectId":{"type":"string","pattern":"^[a-z][a-z0-9-]{4,28}[a-z0-9]$","description":"Google Cloud project ID"},"investigateAlerts":{"type":"boolean","default":true},"idempotencyKey":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"}},"required":["workspaceId","projectId","idempotencyKey"],"additionalProperties":false},"ActivateGcpConnection":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"requestId":{"type":"string","pattern":"^gcpconn_[0-9a-z]{24}$","description":"ID of the gcp_connection_request","example":"gcpconn_38mg3o4ibc92h8t2efn8csrh"},"projectNumber":{"type":"string","pattern":"^\\d{6,20}$"},"verificationMode":{"type":"string","enum":["immediate","poll"],"default":"immediate","description":"Poll mode can return 202 while access propagates; repeat activation until registered. Immediate mode completes verification or returns its error."}},"required":["workspaceId","requestId","projectNumber"],"additionalProperties":false},"Cloud Account Repository":{"type":"object","properties":{"id":{"type":"string","pattern":"^car_[0-9a-z]{24}$","description":"ID of the cloud_account_repo","example":"car_7xk9m2p4qw8n5j3v6h1t0y9r"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"cloudAccountId":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"},"repositoryId":{"type":"string","pattern":"^repo_[0-9a-z]{24}$","description":"ID of the repository","example":"repo_38mg3o4ibc92h8t2efn8csrh"},"reasoning":{"type":"string","description":"Why this repository is connected to this cloud account"},"confidence":{"type":"string","enum":["definitive","strong","moderate","weak","speculative"],"description":"Confidence level of the connection"},"source":{"type":"string","enum":["auto","manual"],"description":"How this connection was created"},"sourceWorkflowId":{"type":"string","nullable":true},"sourceWorkflowName":{"type":"string","nullable":true},"confirmed":{"type":"string","nullable":true,"format":"date-time"},"confirmedBy":{"type":"string","nullable":true},"repositoryOwner":{"type":"string"},"repositoryName":{"type":"string"},"repositoryProvider":{"type":"string"},"createdBy":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"lastEditedBy":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["cloud_account_repo"]}},"required":["id","workspaceId","cloudAccountId","repositoryId","reasoning","confidence","source","sourceWorkflowId","sourceWorkflowName","confirmed","confirmedBy","repositoryOwner","repositoryName","repositoryProvider","createdBy","lastEditedBy","created","updated","_object"],"additionalProperties":false},"Cloud Account":{"type":"object","properties":{"id":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"alias":{"type":"string","minLength":4,"maxLength":256,"description":"Alias of the cloud account"},"provider":{"$ref":"#/components/schemas/Cloud Provider"},"status":{"type":"string","enum":["ready","syncing","new"],"description":"Sync status"},"account":{"type":"string","description":"Cloud account"},"region":{"type":"string","description":"Cloud region"},"regions":{"type":"array","nullable":true,"items":{"type":"string"},"description":"AWS only: regions scanned on each sync. Null means every region enabled on the account, resolved at sync time."},"metadata":{"oneOf":[{"type":"object","properties":{"provider":{"type":"string","enum":["cloudflare"]},"token":{"type":"string"},"readOnly":{"type":"boolean"},"createMonitoringAlarms":{"type":"string","nullable":true},"webhookDestinationId":{"type":"string"},"webhookSecret":{"type":"string"},"notificationPolicyId":{"type":"string"},"alertIds":{"type":"array","items":{"type":"string"}},"previewEnvironmentsEnabled":{"type":"string","nullable":true}},"required":["provider"]},{"type":"object","properties":{"provider":{"type":"string","enum":["aws"]},"connectionMode":{"type":"string","enum":["cloudformation","customer_managed"]},"roleArn":{"type":"string"},"externalParameter":{"type":"string"},"stackName":{"type":"string"},"serviceToken":{"type":"string"},"bucketName":{"type":"string"},"topicArn":{"type":"string"},"cloudTrailName":{"type":"string"},"createMonitoringAlarms":{"type":"string","nullable":true},"subscribeToAlarms":{"type":"string","nullable":true},"regionTopicArns":{"type":"object","additionalProperties":{"type":"string"}}},"required":["provider","roleArn","externalParameter","bucketName","topicArn","cloudTrailName","createMonitoringAlarms","subscribeToAlarms"]},{"type":"object","properties":{"provider":{"type":"string","enum":["vercel"]},"configurationId":{"type":"string"},"accessToken":{"type":"string"},"authType":{"type":"string","enum":["access_token"]},"type":{"type":"string","enum":["personal","team"]},"teamId":{"type":"string"},"userId":{"type":"string"},"apiKey":{"type":"string"},"apiKeyConfiguredAt":{"type":"string","nullable":true},"previewEnvironmentsEnabled":{"type":"string","nullable":true},"id":{"type":"string"},"setup":{"type":"object","properties":{"teamId":{"type":"string"},"userId":{"type":"string"},"configurationId":{"type":"string"},"next":{"type":"string"},"team":{"type":"object","additionalProperties":{"nullable":true}},"user":{"type":"object","additionalProperties":{"nullable":true}}},"required":["userId","configurationId","next"]}},"required":["provider","configurationId","accessToken","authType","type","userId","setup"]},{"type":"object","properties":{"provider":{"type":"string","enum":["fly"]},"token":{"type":"string"},"orgSlug":{"type":"string"}},"required":["provider","orgSlug"]},{"type":"object","properties":{"provider":{"type":"string","enum":["render"]},"apiKey":{"type":"string"},"ownerId":{"type":"string"},"ownerType":{"type":"string","enum":["user","team"]},"webhookId":{"type":"string"},"webhookSecret":{"type":"string"}},"required":["provider","ownerId","ownerType"]},{"type":"object","properties":{"provider":{"type":"string","enum":["planetscale"]},"apiKey":{"type":"string"},"organization":{"type":"string"},"authType":{"type":"string","enum":["service_token","oauth"]},"refreshToken":{"type":"string"},"accessTokenExpiresAt":{"type":"number"}},"required":["provider","organization"]},{"type":"object","properties":{"provider":{"type":"string","enum":["supabase"]},"apiKey":{"type":"string"},"organization":{"type":"string"},"authType":{"type":"string","enum":["access_token","oauth"]},"refreshToken":{"type":"string"},"accessTokenExpiresAt":{"type":"number"}},"required":["provider","organization"]},{"type":"object","properties":{"provider":{"type":"string","enum":["turso"]},"apiKey":{"type":"string"},"organization":{"type":"string"}},"required":["provider","organization"]},{"type":"object","properties":{"provider":{"type":"string","enum":["neon"]},"apiKey":{"type":"string"},"orgId":{"type":"string"},"orgName":{"type":"string"},"previewEnvironmentsEnabled":{"type":"string","nullable":true}},"required":["provider","orgId"]},{"type":"object","properties":{"provider":{"type":"string","enum":["gcp"]},"projectId":{"type":"string"},"projectNumber":{"type":"string"},"connectionRequestId":{"type":"string","pattern":"^gcpconn_[0-9a-z]{24}$","description":"ID of the gcp_connection_request","example":"gcpconn_38mg3o4ibc92h8t2efn8csrh"}},"required":["provider","projectId","projectNumber","connectionRequestId"]},{"type":"object","properties":{"provider":{"type":"string","enum":["modal"]},"apiKey":{"type":"string"},"workspace":{"type":"string"},"workspaceId":{"type":"string"}},"required":["provider","workspace"]},{"type":"object","properties":{"provider":{"type":"string","enum":["railway"]},"apiKey":{"type":"string"},"workspaceId":{"type":"string"},"workspaceName":{"type":"string"},"authType":{"type":"string","enum":["workspace_token","oauth"]},"refreshToken":{"type":"string"},"accessTokenExpiresAt":{"type":"number"},"ephemeralEnvironmentsEnabled":{"type":"string","nullable":true}},"required":["provider","workspaceId"]},{"type":"object","properties":{"provider":{"type":"string","enum":["convex"]},"apiKey":{"type":"string"},"teamId":{"type":"string"},"teamSlug":{"type":"string"},"previewEnvironmentsEnabled":{"type":"string","nullable":true}},"required":["provider","teamId"]},{"type":"object","properties":{"provider":{"type":"string","enum":["clickhouse"]},"keyId":{"type":"string"},"keySecret":{"type":"string"},"organizationId":{"type":"string"},"organizationName":{"type":"string"}},"required":["provider","organizationId"]},{"type":"object","properties":{"provider":{"type":"string","enum":["triggerdev"]},"apiKey":{"type":"string"},"projectRef":{"type":"string"},"envSlug":{"type":"string"},"envId":{"type":"string"},"projectName":{"type":"string"},"organizationName":{"type":"string"},"organizationSlug":{"type":"string"},"projectSlug":{"type":"string"},"webhookSecret":{"type":"string"}},"required":["provider","projectRef","envSlug"]},{"type":"object","properties":{"provider":{"type":"string","enum":["kubernetes"]},"connectionMode":{"type":"string","enum":["agent"]},"clusterName":{"type":"string"},"distribution":{"type":"string"},"clusterUid":{"type":"string"},"agentNamespace":{"type":"string"},"tunnelId":{"type":"string"},"tunnelHostname":{"type":"string"},"dnsRecordId":{"type":"string"},"dnsZoneId":{"type":"string"},"shimSecret":{"type":"string"},"agentVersion":{"type":"string"},"kubernetesVersion":{"type":"string"},"chartVersion":{"type":"string"},"lastRegisteredAt":{"type":"string"},"agentConnectionStatus":{"type":"string","enum":["connected","disconnected","waiting"]},"agentLastSeenAt":{"type":"string"},"cfAccountId":{"type":"string"}},"required":["provider","connectionMode"]}],"description":"Metadata related to the cloud provider"},"createdBy":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"ownerId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"lastEditedBy":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"visibility":{"type":"string","enum":["public","private","unlisted","workspace","workspace_and_guests","workspace_and_github_org","private_and_guests","team","team_and_guests","custom","internal"],"description":"Visibility level"},"guests":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Guest email addresses"},"labels":{"type":"array","items":{"type":"string"},"description":"Cloud account labels"},"initialised":{"type":"string","nullable":true,"format":"date-time"},"lastSync":{"type":"string","nullable":true,"format":"date-time"},"lastFailureAt":{"type":"string","nullable":true,"format":"date-time"},"resyncRequestedAt":{"type":"string","nullable":true,"format":"date-time","description":"When a resync was requested while a sync was in progress, or null if none is pending"},"syncReservedAt":{"type":"string","nullable":true,"format":"date-time","description":"When the most recent sync of this account was reserved to start, or null if none has started yet"},"anomalyChecksDisabled":{"type":"string","nullable":true,"format":"date-time","description":"When anomaly checks were disabled for this account, or null if enabled"},"readOnly":{"type":"string","nullable":true,"format":"date-time","description":"When this account was set to read-only, or null if writes are allowed. While set, all write calls against the provider API are refused."},"anomalyCheckIntervalMinutes":{"type":"number","nullable":true,"description":"How often anomaly checks run for this account, in minutes. Null means the default interval. Cloud resources in this account inherit this interval unless overridden."},"syncPausedAt":{"type":"string","nullable":true,"format":"date-time","description":"When syncing was paused for this account, or null if syncing is active. An operator sets it through the admin route, and a sync sets it when the provider permanently rejects the account's credential. While set, every sync run for this account is skipped."},"syncPauseReason":{"type":"string","nullable":true,"enum":["provider_rejection"],"description":"The reason for an automatic sync pause, or null for an operator pause or active sync."},"repositoryDiscoveryCompletedAt":{"type":"string","nullable":true,"format":"date-time","description":"When repository discovery last completed for this account, or null if it has not run yet."},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["cloud_account"]}},"required":["id","workspaceId","alias","provider","status","account","region","regions","metadata","createdBy","ownerId","lastEditedBy","visibility","guests","labels","initialised","lastSync","lastFailureAt","resyncRequestedAt","syncReservedAt","anomalyChecksDisabled","readOnly","anomalyCheckIntervalMinutes","syncPausedAt","syncPauseReason","repositoryDiscoveryCompletedAt","created","updated","_object"],"additionalProperties":false},"Cloud Provider":{"type":"string","enum":["aws","vercel","cloudflare","fly","render","planetscale","supabase","turso","neon","gcp","modal","railway","convex","clickhouse","triggerdev","kubernetes","code","oci","external","openstatus","depot","circleci","incident_io","unknown"],"description":"Cloud provider"},"GcpSetup":{"type":"object","properties":{"id":{"type":"string","pattern":"^gcpsetup_[0-9a-z]{24}$","description":"ID of the gcp_setup","example":"gcpsetup_38mg3o4ibc92h8t2efn8csrh"},"status":{"type":"string","enum":["authorization_required","project_required","installing","deployment_failed","attention_required","verifying","connected","cancelled"]},"step":{"type":"string","nullable":true,"enum":["apis","installer","permissions","deployment",null]},"error":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"projectNumber":{"type":"string","nullable":true},"blueprintRef":{"type":"string","nullable":true},"investigateAlerts":{"type":"boolean"},"requestId":{"type":"string","nullable":true,"pattern":"^gcpconn_[0-9a-z]{24}$","description":"ID of the gcp_connection_request","example":"gcpconn_38mg3o4ibc92h8t2efn8csrh"},"cloudAccountId":{"type":"string","nullable":true,"pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"},"update":{"type":"object","nullable":true,"properties":{"cloudAccountId":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"},"fromBlueprintRef":{"type":"string","nullable":true}},"required":["cloudAccountId","fromBlueprintRef"],"additionalProperties":false},"deployment":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"state":{"type":"string","nullable":true},"consoleUrl":{"type":"string","format":"uri"}},"required":["name","state","consoleUrl"],"additionalProperties":false},"createdAt":{"type":"string"},"confirmedAt":{"type":"string","nullable":true},"registeredAt":{"type":"string","nullable":true}},"required":["id","status","step","error","projectId","projectNumber","blueprintRef","investigateAlerts","requestId","cloudAccountId","update","deployment","createdAt","confirmedAt","registeredAt"],"additionalProperties":false},"ConnectGcpAccount":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"provider":{"type":"string","enum":["gcp"]},"projectId":{"type":"string","pattern":"^[a-z][a-z0-9-]{4,28}[a-z0-9]$","description":"Google Cloud project ID"},"investigateAlerts":{"type":"boolean","default":true}},"required":["workspaceId","provider","projectId"],"additionalProperties":false},"AwsConnectionRequest":{"type":"object","properties":{"requestId":{"type":"string","pattern":"^cloudformation_[0-9a-z]{24}$","description":"ID of the cloudformation_template","example":"cloudformation_38mg3o4ibc92h8t2efn8csrh"},"externalId":{"type":"string","pattern":"^cloudformation_[0-9a-z]{24}$","description":"External ID required when Polylane assumes the customer role","example":"cloudformation_38mg3o4ibc92h8t2efn8csrh"},"awsAccountId":{"type":"string","pattern":"^\\d{12}$","description":"Twelve-digit AWS account ID","example":"123456789012"},"region":{"type":"string","pattern":"^[a-z]{2}(?:-gov)?-[a-z]+-\\d$","description":"Handshake region where the CloudTrail trail and SNS topic must live","example":"us-east-1"},"regions":{"type":"array","nullable":true,"items":{"type":"string","pattern":"^[a-z]{2}(?:-gov)?-[a-z]+-\\d$","description":"AWS region","example":"us-east-1"}},"trustedPrincipal":{"$ref":"#/components/schemas/AwsTrustedPrincipal"},"subscriptionEndpoint":{"type":"string","format":"uri","description":"HTTPS endpoint the customer-managed SNS subscription must target"},"status":{"type":"string","enum":["pending","registered"]},"cloudAccountId":{"type":"string","nullable":true,"pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"}},"required":["requestId","externalId","awsAccountId","region","regions","trustedPrincipal","subscriptionEndpoint","status","cloudAccountId"],"additionalProperties":false},"AwsTrustedPrincipal":{"type":"object","properties":{"accountId":{"type":"string","pattern":"^\\d{12}$","description":"Polylane AWS account ID","example":"123456789012"},"arn":{"type":"string","description":"AWS principal ARN to place in the customer role trust policy"}},"required":["accountId","arn"],"additionalProperties":false},"CreateAwsConnectionRequest":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"idempotencyKey":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$","description":"Opaque caller-stable idempotency key. Reusing it with identical account and regions returns the same request; reusing it with different inputs returns 409.","example":"terraform:workspace_abc:123456789012:all-regions"},"awsAccountId":{"type":"string","pattern":"^\\d{12}$","description":"Twelve-digit AWS account ID","example":"123456789012"},"regions":{"type":"array","nullable":true,"items":{"type":"string","pattern":"^[a-z]{2}(?:-gov)?-[a-z]+-\\d$","description":"AWS region","example":"us-east-1"},"minItems":1,"maxItems":30,"description":"Regions Polylane may scan. Null means every enabled region."}},"required":["workspaceId","idempotencyKey","awsAccountId","regions"],"additionalProperties":false},"AwsConnectionActivation":{"type":"object","properties":{"requestId":{"type":"string","pattern":"^cloudformation_[0-9a-z]{24}$","description":"ID of the cloudformation_template","example":"cloudformation_38mg3o4ibc92h8t2efn8csrh"},"cloudAccountId":{"type":"string","pattern":"^acc_[0-9a-z]{24}$","description":"ID of the cloud_account","example":"acc_34gky74ibc92h8t2efn8csrh"},"provisioningStatus":{"type":"string","enum":["registered"],"description":"Registration is durable and initial sync has been queued; this does not mean initial sync is complete."}},"required":["requestId","cloudAccountId","provisioningStatus"],"additionalProperties":false},"ActivateAwsConnection":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"requestId":{"type":"string","pattern":"^cloudformation_[0-9a-z]{24}$","description":"ID of the cloudformation_template","example":"cloudformation_38mg3o4ibc92h8t2efn8csrh"},"roleArn":{"type":"string","minLength":20,"maxLength":2048,"pattern":"^arn:(?:aws|aws-us-gov|aws-cn):iam::\\d{12}:role\\/.+$","example":"arn:aws:iam::123456789012:role/polylane-read"},"bucketName":{"type":"string","minLength":3,"maxLength":63,"example":"acme-cloudtrail-logs"},"topicArn":{"type":"string","maxLength":2048,"pattern":"^arn:(?:aws|aws-us-gov|aws-cn):sns:[a-z0-9-]+:\\d{12}:[A-Za-z0-9_-]+$","example":"arn:aws:sns:us-east-1:123456789012:polylane-cloudtrail"},"topicSubscriptionArn":{"type":"string","maxLength":2048,"pattern":"^arn:(?:aws|aws-us-gov|aws-cn):sns:[a-z0-9-]+:\\d{12}:[A-Za-z0-9_-]+:[0-9a-f-]{36}$","description":"Confirmed HTTPS subscription ARN for the request's subscriptionEndpoint","example":"arn:aws:sns:us-east-1:123456789012:polylane-cloudtrail:12345678-1234-1234-1234-123456789012"},"cloudTrailName":{"type":"string","minLength":3,"maxLength":128,"example":"polylane-cloudtrail"},"region":{"type":"string","pattern":"^[a-z]{2}(?:-gov)?-[a-z]+-\\d$","description":"AWS region","example":"us-east-1"}},"required":["workspaceId","requestId","roleArn","bucketName","topicArn","topicSubscriptionArn","cloudTrailName","region"],"additionalProperties":false},"Feedback":{"type":"object","properties":{"id":{"type":"string","pattern":"^fdbk_[0-9a-z]{32}$","description":"ID of the feedback","example":"fdbk_d18564pxsvozx979j3532mii2kk7pmw6"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"userId":{"type":"string","nullable":true,"pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$"},"text":{"type":"string"},"title":{"type":"string"},"context":{"type":"string","nullable":true},"environment":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"screenshotFileId":{"type":"string","nullable":true,"pattern":"^file_[0-9a-z]{24}$"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"archived":{"type":"string","nullable":true,"format":"date-time"},"resolved":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["feedback"]}},"required":["id","workspaceId","userId","text","title","context","environment","screenshotFileId","created","updated","archived","resolved","_object"],"additionalProperties":false},"IntegrationInterest":{"type":"object","properties":{"id":{"type":"string","pattern":"^ireq_[0-9a-z]{24}$","description":"ID of the integration_interest","example":"ireq_38mg3o4ibc92h8t2efn8csrh"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"provider":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9._-]+$","description":"The catalog type of the integration the request is for","example":"gcp"},"userId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"}},"_object":{"type":"string","enum":["integration_interest"]}},"required":["id","workspaceId","provider","userId","created","updated","_object"],"additionalProperties":false},"FailedToolCall":{"type":"object","properties":{"id":{"type":"string","pattern":"^ftc_[0-9a-z]{32}$","description":"ID of the failed_tool_call","example":"ftc_x7k9m2n5p8q3v6w4j1s7h9d2f5g8t1r3"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"userId":{"type":"string","nullable":true,"pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$"},"name":{"type":"string","description":"Name of the tool that failed"},"agent":{"type":"string","description":"Agent name that made the call"},"input":{"type":"object","additionalProperties":{"nullable":true},"description":"Tool input parameters"},"error":{"type":"object","additionalProperties":{"nullable":true},"description":"Error object with message, stack, code"},"workflowId":{"type":"string","nullable":true,"description":"Workflow ID if called from workflow"},"threadId":{"type":"string","nullable":true,"pattern":"^thrd_[0-9a-z]{24}$","description":"Thread ID if called from thread"},"context":{"$ref":"#/components/schemas/FailedToolCallContext"},"title":{"type":"string","description":"Auto-generated summary of failure"},"text":{"type":"string","description":"Detailed error description"},"environment":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"System environment at time of failure"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"archived":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["failed_tool_call"]}},"required":["id","workspaceId","userId","name","agent","input","error","workflowId","threadId","context","title","text","environment","created","updated","archived","_object"],"additionalProperties":false},"FailedToolCallContext":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["thread"]},"threadId":{"type":"string"},"requestId":{"type":"string"}},"required":["type","threadId"]},{"type":"object","properties":{"type":{"type":"string","enum":["workflow"]},"workflowId":{"type":"string"},"requestId":{"type":"string"}},"required":["type","workflowId"]},{"type":"object","properties":{"type":{"type":"string","enum":["api"]},"requestId":{"type":"string"}},"required":["type","requestId"]},{"type":"object","properties":{"type":{"type":"string","enum":["background"]},"jobId":{"type":"string"}},"required":["type"]},{"nullable":true}],"description":"Type-safe context with discriminated union"},"Rating":{"type":"object","properties":{"id":{"type":"string","pattern":"^rating_[0-9a-z]{32}$","description":"ID of the rating","example":"rating_d18564pxsvozx979j3532mii2kk7pmw6"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"threadId":{"type":"string","nullable":true,"pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"version":{"type":"string","nullable":true},"accountId":{"type":"string","nullable":true},"resourceId":{"type":"string"},"resource":{"type":"string","enum":["message","incident"]},"userId":{"type":"string"},"type":{"type":"string","enum":["implicit","explicit"]},"logId":{"type":"string","nullable":true},"score":{"type":"number"},"status":{"type":"string","enum":["new","resolved","closed","wontfix"]},"metadata":{"type":"object","nullable":true,"properties":{"reason":{"type":"string","nullable":true},"details":{"type":"string","nullable":true}},"additionalProperties":false},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["rating"]}},"required":["id","workspaceId","threadId","version","accountId","resourceId","resource","userId","type","logId","score","status","metadata","created","updated","_object"],"additionalProperties":false},"Page":{"type":"object","properties":{"id":{"type":"string","pattern":"^page_[0-9a-z]{40}$","description":"ID of the page","example":"page_38mg3o4ibc92h8t2efn8csrhd18564pxsvozx979"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"kind":{"type":"string","enum":["pr_analysis","autofix_run","issue_disposition"]},"title":{"type":"string"},"source":{"type":"string"},"sourceUrl":{"type":"string","nullable":true},"url":{"type":"string"},"deleted":{"type":"string","nullable":true,"format":"date-time"},"deletedBy":{"type":"string","nullable":true},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["page"]}},"required":["id","workspaceId","kind","title","source","sourceUrl","url","deleted","deletedBy","created","updated","_object"],"additionalProperties":false},"MemoryDirectory":{"type":"object","properties":{"commit":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/MemoryDirectoryEntry"}}},"required":["commit","entries"]},"MemoryDirectoryEntry":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["tree","blob","exec"]}},"required":["name","type"]},"MemoryFile":{"type":"object","properties":{"path":{"type":"string"},"content":{"type":"string"},"sha":{"type":"string","description":"Pass this as expectedSha when saving, so a change made in between is not overwritten"}},"required":["path","content","sha"]},"MemoryCommits":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MemoryCommit"}}},"required":["items"]},"MemoryCommit":{"type":"object","properties":{"hash":{"type":"string"},"subject":{"type":"string"},"authorName":{"type":"string"},"committedAt":{"type":"number"}},"required":["hash","subject","authorName","committedAt"]},"MemoryWritten":{"type":"object","properties":{"path":{"type":"string"},"commit":{"type":"string"},"sha":{"type":"string"}},"required":["path","commit","sha"]},"MemoryWriteBody":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":512,"description":"The markdown file to create or replace, for example topics/billing.md"},"content":{"type":"string","maxLength":262144},"expectedSha":{"type":"string","nullable":true,"minLength":40,"maxLength":40,"description":"The sha of the file when it was read, or null to create a file that must not exist yet"}},"required":["path","content","expectedSha"],"additionalProperties":false},"MemoryDeleted":{"type":"object","properties":{"path":{"type":"string"},"commit":{"type":"string"}},"required":["path","commit"]},"Thread":{"type":"object","properties":{"id":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"parentThreadId":{"type":"string","nullable":true,"pattern":"^thrd_[0-9a-z]{24}$","description":"Parent thread ID if this is a sub-agent thread"},"agentName":{"type":"string","nullable":true,"description":"Fun agent name for this thread"},"name":{"type":"string","minLength":4,"maxLength":256,"description":"Name of the thread"},"summary":{"type":"string","nullable":true,"description":"Summary of the thread"},"context":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["repository","cloud_account","integration","thread","infrastructure_node","anomaly","issue","change_record","pull_request"]},"label":{"type":"string"}},"required":["id","type"]}},"automation":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"Automation metadata if this thread was created by an automation execution"},"investigation":{"type":"object","nullable":true,"properties":{"issueId":{"type":"string"},"prompt":{"type":"string"},"status":{"type":"object","nullable":true,"properties":{"kind":{"type":"string","enum":["needs_human_action","needs_decision","awaiting_change","failed","no_action_needed"]},"headline":{"type":"string"},"detail":{"type":"string"},"at":{"type":"number"},"messageId":{"type":"string","nullable":true},"escalationId":{"type":"string","nullable":true},"outcome":{"type":"string","nullable":true,"enum":["awaiting_external","left_on_issue",null]}},"required":["kind","headline","detail","at"],"description":"Out-of-loop investigation status: when set the investigation is parked (waiting on a human, decision, external change, or it failed) and re-investigation nudges are suppressed."},"diagnosis":{"type":"object","nullable":true,"properties":{"outcome":{"type":"string","enum":["diagnosed","resolved","inconclusive","false_positive","failed"]},"confidence":{"type":"string","enum":["low","medium","high"]},"causeClass":{"type":"string","nullable":true,"enum":["code_defect","flaky_infra","external_client","expected_behavior","config_or_env","unknown",null]},"at":{"type":"number"}},"required":["outcome","confidence","at"],"description":"The agent's technical verdict for the investigated issue, set after each turn is classified."},"observabilityAssessedAt":{"type":"number","nullable":true},"slackNarration":{"type":"object","properties":{"integrationId":{"type":"string"},"teamId":{"type":"string"},"channelName":{"type":"string"},"channelDescription":{"type":"string"}},"required":["integrationId","teamId","channelName"],"additionalProperties":false},"kickoffAt":{"type":"number","nullable":true,"description":"When the run's first turn was kicked; null until then."},"runStartedAt":{"type":"number","nullable":true,"description":"When the current run on this thread started, for a run after the first; null on the first run."},"runAutofixIds":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Earlier autofix rows the current run took over."},"nativeFallbackAt":{"type":"number","nullable":true,"description":"When the workspace's code agent failed this run's hand-off and the run took the fix over itself; null otherwise."}},"required":["issueId","prompt"],"description":"Investigation metadata if this thread is the fix run working an issue"},"metadata":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["slack"]},"integrationId":{"type":"string"},"teamId":{"type":"string"},"channelId":{"type":"string"},"channelType":{"type":"string","enum":["channel","group","mpim","im"]},"threadTs":{"type":"string"},"rootMessageTs":{"type":"string"},"investigationChannel":{"type":"boolean","enum":[true]},"dispatcher":{"type":"object","properties":{"scope":{"type":"string","enum":["channel","thread"]},"channelThreadId":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"attachedThreadId":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"}},"required":["scope"],"additionalProperties":false},"mutedAt":{"type":"number","nullable":true},"cardThreadId":{"type":"string","nullable":true}},"required":["type","integrationId","teamId","channelId","channelType","threadTs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["github"]},"owner":{"type":"string"},"repo":{"type":"string"},"pullNumber":{"type":"integer","nullable":true},"commentId":{"type":"integer","nullable":true},"htmlUrl":{"type":"string","nullable":true},"pageId":{"type":"string","nullable":true},"autofixId":{"type":"string","nullable":true}},"required":["type","owner","repo","pullNumber","commentId","htmlUrl"],"additionalProperties":false},{"nullable":true}],"description":"Source-specific metadata: the Slack thread or the GitHub pull request the thread came from. Discriminated by `type`.","nullable":true},"investigationSlackChannelKey":{"type":"string","nullable":true,"readOnly":true,"description":"Internal lookup key for a dedicated incident Slack channel"},"externalId":{"type":"string","nullable":true,"description":"External lookup key for threads created from external sources (e.g. Slack)."},"createdBy":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"ownerId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"lastEditedBy":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"visibility":{"type":"string","enum":["public","private","unlisted","workspace","workspace_and_guests","workspace_and_github_org","private_and_guests","team","team_and_guests","custom","internal"]},"origin":{"type":"string","enum":["web","web:recommendation","email","api","cli","mcp","extension:chrome","extension:firefox","extension:edge","extension:safari","oauth","admin","sub-agent","system","slack","github","anonymous","unknown"]},"originVersion":{"type":"string","nullable":true,"description":"Version of the client that created the thread (e.g. CLI or extension version), when supplied via the x-polylane-client-version header."},"source":{"type":"string","nullable":true,"enum":["share","topology","onboarding",null],"description":"Product surface the conversation was kicked off from: the topology page or the first run. Null when untracked."},"type":{"$ref":"#/components/schemas/Thread Type"},"guests":{"type":"array","nullable":true,"items":{"type":"string"}},"labels":{"type":"array","items":{"type":"string"}},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"runningSince":{"type":"string","nullable":true,"format":"date-time","description":"When the currently running turn started, or null when the thread is idle."},"awaitingAgentsSince":{"type":"string","nullable":true,"format":"date-time","description":"When the thread started waiting on sub-agent runs, or null when it is not waiting."},"waitingOnHumanSince":{"type":"string","nullable":true,"format":"date-time","description":"When the running turn parked on input only a person can provide (a question, approval, data request, connection, or browser action), or null when it is not waiting on one."},"escalatedSince":{"type":"string","nullable":true,"format":"date-time","description":"When the fix run parked on an escalation a person must answer, or null once that escalation is cleared or when the thread never escalated."},"fleet":{"type":"object","nullable":true,"properties":{"id":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"role":{"type":"string","enum":["coordinator","member"]},"handle":{"type":"string"},"joinedAt":{"type":"number"}},"required":["id","role","handle","joinedAt"],"additionalProperties":false,"description":"The fleet this thread leads or belongs to, or null for a thread outside a fleet."},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["thread"]}},"required":["id","workspaceId","parentThreadId","agentName","name","summary","context","automation","investigation","metadata","investigationSlackChannelKey","externalId","createdBy","ownerId","lastEditedBy","visibility","origin","originVersion","source","type","guests","labels","created","updated","runningSince","awaitingAgentsSince","waitingOnHumanSince","escalatedSince","fleet","_object"],"additionalProperties":false},"Thread Type":{"type":"string","enum":["chat","autofix","exploration","pr_review","signal_discovery","fix_run","pr_review_video","onboarding","memory_dream"],"description":"Kind of thread: chat, an autofix or fix run, an exploration sweep, a pull request impact assessment, or signal discovery."},"CustomInstruction":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"}},"required":["slug","name","description","instructions"]},"Thread State Filter":{"anyOf":[{"type":"string","enum":["running","awaiting_agents","completed","waiting_on_human","!running","!awaiting_agents","!completed","!waiting_on_human"]},{"type":"array","items":{"type":"string","enum":["running","awaiting_agents","completed","waiting_on_human","!running","!awaiting_agents","!completed","!waiting_on_human"]}}],"description":"Only threads in one of these run states (see Thread State). Takes one state or a list; prefix a state with '!' to exclude it."},"Thread State":{"type":"string","enum":["running","awaiting_agents","completed","waiting_on_human"],"description":"Only threads in this run state as well, whatever `state` selects. A list's fixed tab sends it, so a `state` filter narrows the tab instead of replacing it."},"ThreadParticipant":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"threadId":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"userId":{"type":"string","pattern":"^(system|usr_[0-9a-z]{32}|team_[0-9a-z]{24})$","example":"usr_8y34bjuxip8jcz73r1ohaf346kbvuvg6"},"role":{"type":"string","enum":["owner","editor","commenter","viewer"]},"addedBy":{"type":"string"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["thread_participant"]}},"required":["workspaceId","threadId","userId","role","addedBy","created","updated","_object"],"additionalProperties":false},"FleetBoard":{"type":"object","properties":{"fleetId":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"head":{"type":"string","nullable":true,"description":"The board's newest commit, or null before the first one"},"status":{"type":"string","enum":["open","closed"]},"brief":{"type":"object","nullable":true,"properties":{"path":{"type":"string","description":"Path of the file on the board, such as lanes/db.md"},"attributes":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"The file's frontmatter"},"body":{"type":"string","description":"The file's text after its frontmatter"}},"required":["path","attributes","body"]},"lanes":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Path of the file on the board, such as lanes/db.md"},"attributes":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"The file's frontmatter"},"body":{"type":"string","description":"The file's text after its frontmatter"}},"required":["path","attributes","body"]}},"findings":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Path of the file on the board, such as lanes/db.md"},"attributes":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"The file's frontmatter"},"body":{"type":"string","description":"The file's text after its frontmatter"}},"required":["path","attributes","body"]}},"requests":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Path of the file on the board, such as lanes/db.md"},"attributes":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"The file's frontmatter"},"body":{"type":"string","description":"The file's text after its frontmatter"}},"required":["path","attributes","body"]},"description":"Requests for more agents"},"posts":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Path of the file on the board, such as lanes/db.md"},"attributes":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"The file's frontmatter"},"body":{"type":"string","description":"The file's text after its frontmatter"}},"required":["path","attributes","body"]},"description":"The newest posts"},"members":{"type":"array","items":{"$ref":"#/components/schemas/FleetMember"}},"truncated":{"type":"boolean","description":"True when the board holds more files than the snapshot returns"}},"required":["fleetId","head","status","brief","lanes","findings","requests","posts","members","truncated"]},"FleetMember":{"type":"object","properties":{"threadId":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"handle":{"type":"string","description":"The name the agent signs its board posts with"},"role":{"type":"string","enum":["coordinator","member"]},"joinedAt":{"type":"number","description":"When the agent joined the fleet, in milliseconds since the epoch"}},"required":["threadId","handle","role","joinedAt"]},"ThreadContextSnapshot":{"type":"object","properties":{"messageId":{"type":"string","description":"The user message the attachment rode on"},"sourceId":{"type":"string","description":"The attached item's id, as carried by the message's source-document part"},"mediaType":{"type":"string","description":"The attached item's type: repository, cloud_account, issue, infrastructure_node, ..."},"title":{"type":"string","nullable":true,"description":"The label the composer showed for the item"},"fetchedAt":{"type":"string","description":"When the turn read the item, as an ISO timestamp"},"text":{"type":"string","description":"The text the agent read for this item, exactly as the turn rendered it"},"entity":{"nullable":true,"description":"The record the text was rendered from, as it stood at that moment; null for items that are text only"}},"required":["messageId","sourceId","mediaType","title","fetchedAt","text"]},"Public Thread":{"type":"object","properties":{"id":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"agentName":{"type":"string","nullable":true},"name":{"type":"string","minLength":4,"maxLength":256,"description":"Name of the thread"},"visibility":{"type":"string","enum":["public","private","unlisted","workspace","workspace_and_guests","workspace_and_github_org","private_and_guests","team","team_and_guests","custom","internal"]},"type":{"$ref":"#/components/schemas/Thread Type"},"source":{"type":"string","nullable":true,"enum":["share","topology","onboarding",null],"description":"Product surface the conversation was kicked off from. Null when untracked."},"automation":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"Automation metadata if this thread was created by an automation execution"},"investigation":{"type":"object","nullable":true,"properties":{"issueId":{"type":"string"},"prompt":{"type":"string"},"status":{"type":"object","nullable":true,"properties":{"kind":{"type":"string","enum":["needs_human_action","needs_decision","awaiting_change","failed","no_action_needed"]},"headline":{"type":"string"},"detail":{"type":"string"},"at":{"type":"number"},"messageId":{"type":"string","nullable":true},"escalationId":{"type":"string","nullable":true},"outcome":{"type":"string","nullable":true,"enum":["awaiting_external","left_on_issue",null]}},"required":["kind","headline","detail","at"],"description":"Out-of-loop investigation status: when set the investigation is parked (waiting on a human, decision, external change, or it failed) and re-investigation nudges are suppressed."},"diagnosis":{"type":"object","nullable":true,"properties":{"outcome":{"type":"string","enum":["diagnosed","resolved","inconclusive","false_positive","failed"]},"confidence":{"type":"string","enum":["low","medium","high"]},"causeClass":{"type":"string","nullable":true,"enum":["code_defect","flaky_infra","external_client","expected_behavior","config_or_env","unknown",null]},"at":{"type":"number"}},"required":["outcome","confidence","at"],"description":"The agent's technical verdict for the investigated issue, set after each turn is classified."},"observabilityAssessedAt":{"type":"number","nullable":true},"kickoffAt":{"type":"number","nullable":true,"description":"When the run's first turn was kicked; null until then."},"runStartedAt":{"type":"number","nullable":true,"description":"When the current run on this thread started, for a run after the first; null on the first run."},"runAutofixIds":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Earlier autofix rows the current run took over."},"nativeFallbackAt":{"type":"number","nullable":true,"description":"When the workspace's code agent failed this run's hand-off and the run took the fix over itself; null otherwise."}},"required":["issueId","prompt"],"description":"Investigation metadata if this thread is the fix run working an issue"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["thread"]}},"required":["id","workspaceId","agentName","name","visibility","type","source","automation","investigation","_object"],"additionalProperties":false},"Message":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_[0-9a-z]{32}$","description":"ID of the message","example":"msg_d18564pxsvozx979j3532mii2kk7pmw6"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"threadId":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"role":{"type":"string","enum":["user","assistant","system"]},"metadata":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"object","properties":{"sourceType":{"type":"string","enum":["url"]},"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"providerMetadata":{"type":"object","properties":{"nominal":{"type":"object","properties":{"description":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"filename":{"type":"string","nullable":true},"created":{"type":"number","nullable":true},"chunks":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string","nullable":true},"markdown":{"type":"string","nullable":true}},"additionalProperties":false}},"tags":{"type":"array","nullable":true,"items":{"type":"string"}},"type":{"type":"string","enum":["web"]}},"required":["type"],"additionalProperties":false}}}},"required":["sourceType","id","url"]}},"durationMs":{"type":"number"},"completedAt":{"type":"number"},"upgrade":{"type":"boolean"},"callout":{"type":"string","enum":["error","info","github_connection"]},"welcome":{"type":"boolean"}},"additionalProperties":false},"parts":{"type":"array","nullable":true,"items":{"nullable":true}},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"userId":{"type":"string","description":"ID of the user who sent this message"},"model":{"type":"string","description":"Model that produced this assistant message, as the provider reported it (a fallback names the model that actually ran)"},"provider":{"type":"string","description":"Provider the model call went through (AI SDK provider id, e.g. workersai.chat, anthropic.messages)"},"modelRole":{"type":"string","description":"Model role the call resolved (e.g. threadsChat, threadsAutofix, compaction); selects the model per workspace routing"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["message"]}},"required":["id","workspaceId","threadId","role","metadata","parts","createdAt","_object"],"additionalProperties":false},"Public Message":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_[0-9a-z]{32}$","description":"ID of the message","example":"msg_d18564pxsvozx979j3532mii2kk7pmw6"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"threadId":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"role":{"type":"string","enum":["user","assistant","system"]},"metadata":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"object","properties":{"sourceType":{"type":"string","enum":["url"]},"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"providerMetadata":{"type":"object","properties":{"nominal":{"type":"object","properties":{"description":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"filename":{"type":"string","nullable":true},"created":{"type":"number","nullable":true},"chunks":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string","nullable":true},"markdown":{"type":"string","nullable":true}},"additionalProperties":false}},"tags":{"type":"array","nullable":true,"items":{"type":"string"}},"type":{"type":"string","enum":["web"]}},"required":["type"],"additionalProperties":false}}}},"required":["sourceType","id","url"]}},"durationMs":{"type":"number"},"completedAt":{"type":"number"},"upgrade":{"type":"boolean"},"callout":{"type":"string","enum":["error","info","github_connection"]},"welcome":{"type":"boolean"}},"additionalProperties":false},"parts":{"type":"array","nullable":true,"items":{"nullable":true}},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"consumption":{"type":"object","properties":{"assistantMessageId":{"type":"string"},"partIndex":{"type":"number"},"stepIndex":{"type":"integer","minimum":0}},"required":["assistantMessageId","partIndex"],"additionalProperties":false},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["message"]}},"required":["id","workspaceId","threadId","role","metadata","parts","createdAt","_object"],"additionalProperties":false},"ArtifactListItem":{"type":"object","properties":{"id":{"type":"string","pattern":"^art_[0-9a-z]{32}$","description":"ID of the artifact","example":"art_d18564pxsvozx979j3532mii2kk7pmw6"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"threadId":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"type":{"$ref":"#/components/schemas/Artifact Type"},"title":{"type":"string","minLength":1,"maxLength":200,"description":"Title of the artifact"},"summary":{"type":"string","minLength":1,"maxLength":500,"description":"Summary of the artifact"},"status":{"$ref":"#/components/schemas/Artifact Status"},"currentVersion":{"type":"integer","minimum":0},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"createdBy":{"type":"string"},"messageId":{"type":"string"},"metadata":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["report"]},"repositories":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"}},"required":["provider","owner","repo"]}},"cloudResources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"account":{"type":"string"},"region":{"type":"string"},"type":{"type":"string"}},"required":["id","provider","account","region","type"]}},"investigationThreadId":{"type":"string"},"escalation":{"type":"object","properties":{"reason":{"type":"string","nullable":true,"enum":["repository_unreachable","iac_not_connected","external_cause","needs_human_action","producer_outside_reach","no_fix_needed","detector_false_alarm",null]},"escalationId":{"type":"string","nullable":true}},"required":["reason","escalationId"]}},"required":["type","repositories","cloudResources"]},{"type":"object","properties":{"type":{"type":"string","enum":["diagram"]},"format":{"type":"string"}},"required":["type","format"]},{"type":"object","properties":{"type":{"type":"string","enum":["chat.autofix"]},"autofixId":{"type":"string"},"childThreadId":{"type":"string","nullable":true},"parentThreadId":{"type":"string"},"repository":{"type":"object","properties":{"provider":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"}},"required":["provider","owner","repo"]},"integrationId":{"type":"string"},"branch":{"type":"string"},"baseBranch":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["started","branch_pushed","pr_opened","failed","skipped"]},"executor":{"type":"string","enum":["native","devin","cursor","factory","conductor","capy","amp"]},"devin":{"type":"object","properties":{"sessionId":{"type":"string"},"sessionUrl":{"type":"string"},"status":{"type":"string","enum":["new","claimed","running","exit","error","suspended","resuming"]},"statusDetail":{"type":"string"},"acusConsumed":{"type":"number"}},"required":["sessionId","sessionUrl","status"]},"cursor":{"type":"object","properties":{"sessionId":{"type":"string"},"sessionUrl":{"type":"string"},"runId":{"type":"string"},"status":{"type":"string","enum":["creating","running","finished","error","cancelled","expired"]},"statusDetail":{"type":"string"}},"required":["sessionId","sessionUrl","status"]},"factory":{"type":"object","properties":{"sessionId":{"type":"string"},"sessionUrl":{"type":"string"},"computerId":{"type":"string"},"status":{"type":"string","enum":["creating","running","finished","error","expired"]},"statusDetail":{"type":"string"}},"required":["sessionId","sessionUrl","status"]},"conductor":{"type":"object","properties":{"sessionId":{"type":"string"},"sessionUrl":{"type":"string"},"workspaceId":{"type":"string"},"status":{"type":"string","enum":["creating","running","finished","error"]},"statusDetail":{"type":"string"}},"required":["sessionId","sessionUrl","status"]},"capy":{"type":"object","properties":{"sessionId":{"type":"string"},"sessionUrl":{"type":"string"},"status":{"type":"string","enum":["creating","running","finished","error","cancelled"]},"statusDetail":{"type":"string"}},"required":["sessionId","sessionUrl","status"]},"amp":{"type":"object","properties":{"sessionId":{"type":"string"},"sessionUrl":{"type":"string"},"status":{"type":"string","enum":["creating","running","finished","error"]},"statusDetail":{"type":"string"}},"required":["sessionId","sessionUrl","status"]},"commitSha":{"type":"string"},"prNumber":{"type":"number"},"prUrl":{"type":"string"},"filesChangedCount":{"type":"number"},"failureReason":{"type":"string"},"skippedReason":{"type":"string"},"skippedKind":{"type":"string"},"coveringPrNumber":{"type":"number"},"coveringPrUrl":{"type":"string"},"hypothesisId":{"type":"string"},"runId":{"type":"string"},"investigationThreadId":{"type":"string"}},"required":["type","autofixId","childThreadId","parentThreadId","repository","integrationId","branch","baseBranch","title","status"]},{"type":"object","properties":{"type":{"type":"string","enum":["chat.issue"]},"issueId":{"type":"string"},"parentThreadId":{"type":"string"},"investigationThreadId":{"type":"string","nullable":true},"title":{"type":"string"},"severity":{"type":"string","enum":["critical","high","medium","low","info"]},"origin":{"type":"string","enum":["chat","exploration"]},"deduped":{"type":"boolean"},"held":{"type":"boolean"}},"required":["type","issueId","parentThreadId","investigationThreadId","title","severity","origin","deduped"]},{"type":"object","properties":{"type":{"type":"string","enum":["github.pull_request"]},"integrationId":{"type":"string"},"repository":{"type":"object","properties":{"provider":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"}},"required":["provider","owner","repo"]},"number":{"type":"number"},"url":{"type":"string"},"state":{"type":"string","enum":["open","closed","merged","draft"]},"head":{"type":"string"},"base":{"type":"string"},"author":{"type":"string","nullable":true},"isUpdate":{"type":"boolean"}},"required":["type","integrationId","repository","number","url","state","head","base","author","isUpdate"]},{"type":"object","properties":{"type":{"type":"string","enum":["github.pr_comment"]},"kind":{"type":"string","enum":["review","reply"]},"repository":{"type":"object","properties":{"provider":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"}},"required":["provider","owner","repo"]},"pullNumber":{"type":"number"},"headSha":{"type":"string"},"verdict":{"type":"string","enum":["pass","fail"]},"impactLevel":{"type":"string","enum":["low","moderate","high"]},"affectedResourceIds":{"type":"array","items":{"type":"string"}},"charts":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"caption":{"type":"string"},"points":{"type":"array","items":{"type":"number"}}},"required":["title","points"]}},"logs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"source":{"type":"string"},"lines":{"type":"array","items":{"type":"string"}},"emphasize":{"type":"array","items":{"type":"number"}},"totalLines":{"type":"number"}},"required":["title","lines"]}},"integrationId":{"type":"string"},"commentId":{"type":"number"},"url":{"type":"string"}},"required":["type","repository","pullNumber","headSha","affectedResourceIds"]},{"type":"object","properties":{"type":{"type":"string","enum":["cloud.change_review"]},"impactLevel":{"type":"string","enum":["none","low","moderate","high"]},"category":{"type":"string","enum":["deployment","configuration","scaling","security","networking","data","teardown","discovery","mixed"]},"risks":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"detail":{"type":"string"},"severity":{"type":"string","enum":["low","medium","high"]},"resourceIds":{"type":"array","items":{"type":"string"}}},"required":["title","detail","severity","resourceIds"]}},"cloudResources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"account":{"type":"string"},"region":{"type":"string"},"type":{"type":"string"}},"required":["id","provider","account","region","type"]}}},"required":["type","impactLevel","category","risks"]},{"type":"object","properties":{"type":{"type":"string","enum":["monitoring.signals"]},"connectionKind":{"type":"string","enum":["cloud_account","integration"]},"connectionId":{"type":"string"},"signalCount":{"type":"number"},"droppedCount":{"type":"number"}},"required":["type","connectionKind","connectionId","signalCount","droppedCount"]},{"type":"object","properties":{"type":{"type":"string","enum":["github.issue"]},"integrationId":{"type":"string"},"repository":{"type":"object","properties":{"provider":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"}},"required":["provider","owner","repo"]},"number":{"type":"number"},"url":{"type":"string"},"state":{"type":"string","enum":["open","closed"]},"labels":{"type":"array","items":{"type":"string"}},"assignees":{"type":"array","items":{"type":"string"}},"author":{"type":"string","nullable":true},"isUpdate":{"type":"boolean"}},"required":["type","integrationId","repository","number","url","state","labels","assignees","author","isUpdate"]},{"type":"object","properties":{"type":{"type":"string","enum":["github.release"]},"integrationId":{"type":"string"},"repository":{"type":"object","properties":{"provider":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"}},"required":["provider","owner","repo"]},"releaseId":{"type":"number"},"tagName":{"type":"string"},"url":{"type":"string"},"draft":{"type":"boolean"},"prerelease":{"type":"boolean"}},"required":["type","integrationId","repository","releaseId","tagName","url","draft","prerelease"]},{"type":"object","properties":{"type":{"type":"string","enum":["github.branch"]},"integrationId":{"type":"string"},"repository":{"type":"object","properties":{"provider":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"}},"required":["provider","owner","repo"]},"branchName":{"type":"string"},"sha":{"type":"string"},"url":{"type":"string"},"fromRef":{"type":"string","nullable":true}},"required":["type","integrationId","repository","branchName","sha","url","fromRef"]},{"type":"object","properties":{"type":{"type":"string","enum":["github.commit"]},"integrationId":{"type":"string"},"repository":{"type":"object","properties":{"provider":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"}},"required":["provider","owner","repo"]},"sha":{"type":"string"},"url":{"type":"string"},"path":{"type":"string"},"message":{"type":"string"},"branch":{"type":"string"}},"required":["type","integrationId","repository","sha","url","path","message","branch"]},{"type":"object","properties":{"type":{"type":"string","enum":["aws.cloudwatch_alarm"]},"account":{"type":"string"},"region":{"type":"string"},"alarmName":{"type":"string"},"url":{"type":"string"},"metricName":{"type":"string"},"namespace":{"type":"string"},"threshold":{"type":"number"},"comparisonOperator":{"type":"string"},"isUpdate":{"type":"boolean"}},"required":["type","account","region","alarmName","url","metricName","namespace","threshold","comparisonOperator","isUpdate"]},{"type":"object","properties":{"type":{"type":"string","enum":["aws.cloudwatch_dashboard"]},"account":{"type":"string"},"region":{"type":"string"},"dashboardName":{"type":"string"},"url":{"type":"string"},"isUpdate":{"type":"boolean"}},"required":["type","account","region","dashboardName","url","isUpdate"]},{"type":"object","properties":{"type":{"type":"string","enum":["honeycomb.marker"]},"integrationId":{"type":"string"},"dataset":{"type":"string"},"markerId":{"type":"string"},"markerType":{"type":"string"},"message":{"type":"string"},"externalUrl":{"type":"string","nullable":true}},"required":["type","integrationId","dataset","markerId","markerType","message","externalUrl"]},{"type":"object","properties":{"type":{"type":"string","enum":["axiom.annotation"]},"integrationId":{"type":"string"},"annotationId":{"type":"string"},"annotationType":{"type":"string"},"title":{"type":"string"},"datasets":{"type":"array","items":{"type":"string"}},"externalUrl":{"type":"string","nullable":true}},"required":["type","integrationId","annotationId","annotationType","title","datasets","externalUrl"]},{"type":"object","properties":{"type":{"type":"string","enum":["mixpanel.annotation"]},"integrationId":{"type":"string"},"annotationId":{"type":"string"},"date":{"type":"string"},"annotationDescription":{"type":"string"},"projectId":{"type":"string"}},"required":["type","integrationId","annotationId","date","annotationDescription","projectId"]},{"type":"object","properties":{"type":{"type":"string","enum":["datadog.dashboard"]},"integrationId":{"type":"string"},"dashboardId":{"type":"string"},"title":{"type":"string"},"site":{"type":"string"},"url":{"type":"string"}},"required":["type","integrationId","dashboardId","title","site","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["datadog.monitor"]},"integrationId":{"type":"string"},"monitorId":{"type":"number"},"monitorName":{"type":"string"},"monitorType":{"type":"string"},"site":{"type":"string"},"url":{"type":"string"}},"required":["type","integrationId","monitorId","monitorName","monitorType","site","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["datadog.slo"]},"integrationId":{"type":"string"},"sloId":{"type":"string"},"sloName":{"type":"string"},"sloType":{"type":"string"},"site":{"type":"string"},"url":{"type":"string"}},"required":["type","integrationId","sloId","sloName","sloType","site","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["datadog.downtime"]},"integrationId":{"type":"string"},"downtimeId":{"type":"string"},"scope":{"type":"string"},"site":{"type":"string"}},"required":["type","integrationId","downtimeId","scope","site"]},{"type":"object","properties":{"type":{"type":"string","enum":["honeycomb.board"]},"integrationId":{"type":"string"},"boardId":{"type":"string"},"boardName":{"type":"string"},"url":{"type":"string"}},"required":["type","integrationId","boardId","boardName","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["honeycomb.trigger"]},"integrationId":{"type":"string"},"triggerId":{"type":"string"},"triggerName":{"type":"string"},"dataset":{"type":"string"}},"required":["type","integrationId","triggerId","triggerName","dataset"]},{"type":"object","properties":{"type":{"type":"string","enum":["honeycomb.slo"]},"integrationId":{"type":"string"},"sloId":{"type":"string"},"sloName":{"type":"string"},"dataset":{"type":"string"}},"required":["type","integrationId","sloId","sloName","dataset"]},{"type":"object","properties":{"type":{"type":"string","enum":["honeycomb.query_annotation"]},"integrationId":{"type":"string"},"annotationId":{"type":"string"},"queryId":{"type":"string"},"name":{"type":"string"},"dataset":{"type":"string"}},"required":["type","integrationId","annotationId","queryId","name","dataset"]},{"type":"object","properties":{"type":{"type":"string","enum":["axiom.dashboard"]},"integrationId":{"type":"string"},"dashboardId":{"type":"string"},"dashboardName":{"type":"string"}},"required":["type","integrationId","dashboardId","dashboardName"]},{"type":"object","properties":{"type":{"type":"string","enum":["axiom.monitor"]},"integrationId":{"type":"string"},"monitorId":{"type":"string"},"monitorName":{"type":"string"},"monitorType":{"type":"string"}},"required":["type","integrationId","monitorId","monitorName","monitorType"]},{"type":"object","properties":{"type":{"type":"string","enum":["axiom.view"]},"integrationId":{"type":"string"},"viewId":{"type":"string"},"viewName":{"type":"string"}},"required":["type","integrationId","viewId","viewName"]},{"type":"object","properties":{"type":{"type":"string","enum":["axiom.virtual_field"]},"integrationId":{"type":"string"},"virtualFieldId":{"type":"string"},"fieldName":{"type":"string"},"dataset":{"type":"string"}},"required":["type","integrationId","virtualFieldId","fieldName","dataset"]},{"type":"object","properties":{"type":{"type":"string","enum":["betterstack.monitor"]},"integrationId":{"type":"string"},"monitorId":{"type":"string"},"monitorName":{"type":"string"},"monitorType":{"type":"string"}},"required":["type","integrationId","monitorId","monitorName","monitorType"]},{"type":"object","properties":{"type":{"type":"string","enum":["betterstack.status_report"]},"integrationId":{"type":"string"},"statusReportId":{"type":"string"},"title":{"type":"string"},"statusPageId":{"type":"string"},"notified":{"type":"boolean"}},"required":["type","integrationId","statusReportId","title","statusPageId","notified"]},{"type":"object","properties":{"type":{"type":"string","enum":["openstatus.monitor"]},"integrationId":{"type":"string"},"monitorId":{"type":"string"},"monitorName":{"type":"string"},"monitorKind":{"type":"string"}},"required":["type","integrationId","monitorId","monitorName","monitorKind"]},{"type":"object","properties":{"type":{"type":"string","enum":["openstatus.status_report"]},"integrationId":{"type":"string"},"statusReportId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"pageId":{"type":"string"},"notified":{"type":"boolean"}},"required":["type","integrationId","statusReportId","title","status","pageId","notified"]},{"type":"object","properties":{"type":{"type":"string","enum":["linear.issue"]},"integrationId":{"type":"string"},"issueId":{"type":"string"},"identifier":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"required":["type","integrationId","issueId","identifier","title","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["sentry.alert_rule"]},"integrationId":{"type":"string"},"ruleId":{"type":"string"},"ruleName":{"type":"string"},"detectorIds":{"type":"array","items":{"type":"string"}},"projectSlug":{"type":"string"},"organizationSlug":{"type":"string"}},"required":["type","integrationId","ruleId","ruleName","organizationSlug"]},{"type":"object","properties":{"type":{"type":"string","enum":["sentry.metric_alert"]},"integrationId":{"type":"string"},"alertId":{"type":"string"},"alertName":{"type":"string"},"projectSlug":{"type":"string"},"organizationSlug":{"type":"string"}},"required":["type","integrationId","alertId","alertName","organizationSlug"]},{"type":"object","properties":{"type":{"type":"string","enum":["sentry.dashboard"]},"integrationId":{"type":"string"},"dashboardId":{"type":"string"},"dashboardName":{"type":"string"},"organizationSlug":{"type":"string"}},"required":["type","integrationId","dashboardId","dashboardName","organizationSlug"]},{"type":"object","properties":{"type":{"type":"string","enum":["issue.timeline"]},"issueId":{"type":"string"},"investigationThreadId":{"type":"string"}},"required":["type","issueId","investigationThreadId"]},{"nullable":true}]},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["artifact"]}},"required":["id","workspaceId","threadId","type","title","summary","status","currentVersion","created","updated","createdBy","messageId","metadata","_object"],"additionalProperties":false},"Artifact Type":{"type":"string","enum":["report","diagram","chat.autofix","chat.issue","github.pull_request","github.pr_comment","cloud.change_review","github.issue","github.release","github.branch","github.commit","aws.cloudwatch_alarm","aws.cloudwatch_dashboard","honeycomb.marker","axiom.annotation","mixpanel.annotation","datadog.dashboard","datadog.monitor","datadog.slo","datadog.downtime","honeycomb.board","honeycomb.trigger","honeycomb.slo","honeycomb.query_annotation","axiom.dashboard","axiom.monitor","axiom.view","axiom.virtual_field","betterstack.monitor","betterstack.status_report","openstatus.monitor","openstatus.status_report","linear.issue","sentry.alert_rule","sentry.metric_alert","sentry.dashboard","issue.timeline","monitoring.signals"],"description":"Kind of artifact"},"Artifact Status":{"type":"string","enum":["draft","final"],"description":"Lifecycle status of the artifact content"},"Artifact":{"type":"object","properties":{"id":{"type":"string","pattern":"^art_[0-9a-z]{32}$","description":"ID of the artifact","example":"art_d18564pxsvozx979j3532mii2kk7pmw6"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"threadId":{"type":"string","pattern":"^thrd_[0-9a-z]{24}$","description":"ID of the thread","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"type":{"$ref":"#/components/schemas/Artifact Type"},"title":{"type":"string","minLength":1,"maxLength":200,"description":"Title of the artifact"},"summary":{"type":"string","minLength":1,"maxLength":500,"description":"Summary of the artifact"},"status":{"$ref":"#/components/schemas/Artifact Status"},"currentVersion":{"type":"integer","minimum":0},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"createdBy":{"type":"string"},"messageId":{"type":"string"},"metadata":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["report"]},"repositories":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"}},"required":["provider","owner","repo"]}},"cloudResources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"account":{"type":"string"},"region":{"type":"string"},"type":{"type":"string"}},"required":["id","provider","account","region","type"]}},"investigationThreadId":{"type":"string"},"escalation":{"type":"object","properties":{"reason":{"type":"string","nullable":true,"enum":["repository_unreachable","iac_not_connected","external_cause","needs_human_action","producer_outside_reach","no_fix_needed","detector_false_alarm",null]},"escalationId":{"type":"string","nullable":true}},"required":["reason","escalationId"]}},"required":["type","repositories","cloudResources"]},{"type":"object","properties":{"type":{"type":"string","enum":["diagram"]},"format":{"type":"string"}},"required":["type","format"]},{"type":"object","properties":{"type":{"type":"string","enum":["chat.autofix"]},"autofixId":{"type":"string"},"childThreadId":{"type":"string","nullable":true},"parentThreadId":{"type":"string"},"repository":{"type":"object","properties":{"provider":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"}},"required":["provider","owner","repo"]},"integrationId":{"type":"string"},"branch":{"type":"string"},"baseBranch":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["started","branch_pushed","pr_opened","failed","skipped"]},"executor":{"type":"string","enum":["native","devin","cursor","factory","conductor","capy","amp"]},"devin":{"type":"object","properties":{"sessionId":{"type":"string"},"sessionUrl":{"type":"string"},"status":{"type":"string","enum":["new","claimed","running","exit","error","suspended","resuming"]},"statusDetail":{"type":"string"},"acusConsumed":{"type":"number"}},"required":["sessionId","sessionUrl","status"]},"cursor":{"type":"object","properties":{"sessionId":{"type":"string"},"sessionUrl":{"type":"string"},"runId":{"type":"string"},"status":{"type":"string","enum":["creating","running","finished","error","cancelled","expired"]},"statusDetail":{"type":"string"}},"required":["sessionId","sessionUrl","status"]},"factory":{"type":"object","properties":{"sessionId":{"type":"string"},"sessionUrl":{"type":"string"},"computerId":{"type":"string"},"status":{"type":"string","enum":["creating","running","finished","error","expired"]},"statusDetail":{"type":"string"}},"required":["sessionId","sessionUrl","status"]},"conductor":{"type":"object","properties":{"sessionId":{"type":"string"},"sessionUrl":{"type":"string"},"workspaceId":{"type":"string"},"status":{"type":"string","enum":["creating","running","finished","error"]},"statusDetail":{"type":"string"}},"required":["sessionId","sessionUrl","status"]},"capy":{"type":"object","properties":{"sessionId":{"type":"string"},"sessionUrl":{"type":"string"},"status":{"type":"string","enum":["creating","running","finished","error","cancelled"]},"statusDetail":{"type":"string"}},"required":["sessionId","sessionUrl","status"]},"amp":{"type":"object","properties":{"sessionId":{"type":"string"},"sessionUrl":{"type":"string"},"status":{"type":"string","enum":["creating","running","finished","error"]},"statusDetail":{"type":"string"}},"required":["sessionId","sessionUrl","status"]},"commitSha":{"type":"string"},"prNumber":{"type":"number"},"prUrl":{"type":"string"},"filesChangedCount":{"type":"number"},"failureReason":{"type":"string"},"skippedReason":{"type":"string"},"skippedKind":{"type":"string"},"coveringPrNumber":{"type":"number"},"coveringPrUrl":{"type":"string"},"hypothesisId":{"type":"string"},"runId":{"type":"string"},"investigationThreadId":{"type":"string"}},"required":["type","autofixId","childThreadId","parentThreadId","repository","integrationId","branch","baseBranch","title","status"]},{"type":"object","properties":{"type":{"type":"string","enum":["chat.issue"]},"issueId":{"type":"string"},"parentThreadId":{"type":"string"},"investigationThreadId":{"type":"string","nullable":true},"title":{"type":"string"},"severity":{"type":"string","enum":["critical","high","medium","low","info"]},"origin":{"type":"string","enum":["chat","exploration"]},"deduped":{"type":"boolean"},"held":{"type":"boolean"}},"required":["type","issueId","parentThreadId","investigationThreadId","title","severity","origin","deduped"]},{"type":"object","properties":{"type":{"type":"string","enum":["github.pull_request"]},"integrationId":{"type":"string"},"repository":{"type":"object","properties":{"provider":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"}},"required":["provider","owner","repo"]},"number":{"type":"number"},"url":{"type":"string"},"state":{"type":"string","enum":["open","closed","merged","draft"]},"head":{"type":"string"},"base":{"type":"string"},"author":{"type":"string","nullable":true},"isUpdate":{"type":"boolean"}},"required":["type","integrationId","repository","number","url","state","head","base","author","isUpdate"]},{"type":"object","properties":{"type":{"type":"string","enum":["github.pr_comment"]},"kind":{"type":"string","enum":["review","reply"]},"repository":{"type":"object","properties":{"provider":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"}},"required":["provider","owner","repo"]},"pullNumber":{"type":"number"},"headSha":{"type":"string"},"verdict":{"type":"string","enum":["pass","fail"]},"impactLevel":{"type":"string","enum":["low","moderate","high"]},"affectedResourceIds":{"type":"array","items":{"type":"string"}},"charts":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"caption":{"type":"string"},"points":{"type":"array","items":{"type":"number"}}},"required":["title","points"]}},"logs":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"source":{"type":"string"},"lines":{"type":"array","items":{"type":"string"}},"emphasize":{"type":"array","items":{"type":"number"}},"totalLines":{"type":"number"}},"required":["title","lines"]}},"integrationId":{"type":"string"},"commentId":{"type":"number"},"url":{"type":"string"}},"required":["type","repository","pullNumber","headSha","affectedResourceIds"]},{"type":"object","properties":{"type":{"type":"string","enum":["cloud.change_review"]},"impactLevel":{"type":"string","enum":["none","low","moderate","high"]},"category":{"type":"string","enum":["deployment","configuration","scaling","security","networking","data","teardown","discovery","mixed"]},"risks":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"detail":{"type":"string"},"severity":{"type":"string","enum":["low","medium","high"]},"resourceIds":{"type":"array","items":{"type":"string"}}},"required":["title","detail","severity","resourceIds"]}},"cloudResources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"account":{"type":"string"},"region":{"type":"string"},"type":{"type":"string"}},"required":["id","provider","account","region","type"]}}},"required":["type","impactLevel","category","risks"]},{"type":"object","properties":{"type":{"type":"string","enum":["monitoring.signals"]},"connectionKind":{"type":"string","enum":["cloud_account","integration"]},"connectionId":{"type":"string"},"signalCount":{"type":"number"},"droppedCount":{"type":"number"}},"required":["type","connectionKind","connectionId","signalCount","droppedCount"]},{"type":"object","properties":{"type":{"type":"string","enum":["github.issue"]},"integrationId":{"type":"string"},"repository":{"type":"object","properties":{"provider":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"}},"required":["provider","owner","repo"]},"number":{"type":"number"},"url":{"type":"string"},"state":{"type":"string","enum":["open","closed"]},"labels":{"type":"array","items":{"type":"string"}},"assignees":{"type":"array","items":{"type":"string"}},"author":{"type":"string","nullable":true},"isUpdate":{"type":"boolean"}},"required":["type","integrationId","repository","number","url","state","labels","assignees","author","isUpdate"]},{"type":"object","properties":{"type":{"type":"string","enum":["github.release"]},"integrationId":{"type":"string"},"repository":{"type":"object","properties":{"provider":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"}},"required":["provider","owner","repo"]},"releaseId":{"type":"number"},"tagName":{"type":"string"},"url":{"type":"string"},"draft":{"type":"boolean"},"prerelease":{"type":"boolean"}},"required":["type","integrationId","repository","releaseId","tagName","url","draft","prerelease"]},{"type":"object","properties":{"type":{"type":"string","enum":["github.branch"]},"integrationId":{"type":"string"},"repository":{"type":"object","properties":{"provider":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"}},"required":["provider","owner","repo"]},"branchName":{"type":"string"},"sha":{"type":"string"},"url":{"type":"string"},"fromRef":{"type":"string","nullable":true}},"required":["type","integrationId","repository","branchName","sha","url","fromRef"]},{"type":"object","properties":{"type":{"type":"string","enum":["github.commit"]},"integrationId":{"type":"string"},"repository":{"type":"object","properties":{"provider":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"}},"required":["provider","owner","repo"]},"sha":{"type":"string"},"url":{"type":"string"},"path":{"type":"string"},"message":{"type":"string"},"branch":{"type":"string"}},"required":["type","integrationId","repository","sha","url","path","message","branch"]},{"type":"object","properties":{"type":{"type":"string","enum":["aws.cloudwatch_alarm"]},"account":{"type":"string"},"region":{"type":"string"},"alarmName":{"type":"string"},"url":{"type":"string"},"metricName":{"type":"string"},"namespace":{"type":"string"},"threshold":{"type":"number"},"comparisonOperator":{"type":"string"},"isUpdate":{"type":"boolean"}},"required":["type","account","region","alarmName","url","metricName","namespace","threshold","comparisonOperator","isUpdate"]},{"type":"object","properties":{"type":{"type":"string","enum":["aws.cloudwatch_dashboard"]},"account":{"type":"string"},"region":{"type":"string"},"dashboardName":{"type":"string"},"url":{"type":"string"},"isUpdate":{"type":"boolean"}},"required":["type","account","region","dashboardName","url","isUpdate"]},{"type":"object","properties":{"type":{"type":"string","enum":["honeycomb.marker"]},"integrationId":{"type":"string"},"dataset":{"type":"string"},"markerId":{"type":"string"},"markerType":{"type":"string"},"message":{"type":"string"},"externalUrl":{"type":"string","nullable":true}},"required":["type","integrationId","dataset","markerId","markerType","message","externalUrl"]},{"type":"object","properties":{"type":{"type":"string","enum":["axiom.annotation"]},"integrationId":{"type":"string"},"annotationId":{"type":"string"},"annotationType":{"type":"string"},"title":{"type":"string"},"datasets":{"type":"array","items":{"type":"string"}},"externalUrl":{"type":"string","nullable":true}},"required":["type","integrationId","annotationId","annotationType","title","datasets","externalUrl"]},{"type":"object","properties":{"type":{"type":"string","enum":["mixpanel.annotation"]},"integrationId":{"type":"string"},"annotationId":{"type":"string"},"date":{"type":"string"},"annotationDescription":{"type":"string"},"projectId":{"type":"string"}},"required":["type","integrationId","annotationId","date","annotationDescription","projectId"]},{"type":"object","properties":{"type":{"type":"string","enum":["datadog.dashboard"]},"integrationId":{"type":"string"},"dashboardId":{"type":"string"},"title":{"type":"string"},"site":{"type":"string"},"url":{"type":"string"}},"required":["type","integrationId","dashboardId","title","site","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["datadog.monitor"]},"integrationId":{"type":"string"},"monitorId":{"type":"number"},"monitorName":{"type":"string"},"monitorType":{"type":"string"},"site":{"type":"string"},"url":{"type":"string"}},"required":["type","integrationId","monitorId","monitorName","monitorType","site","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["datadog.slo"]},"integrationId":{"type":"string"},"sloId":{"type":"string"},"sloName":{"type":"string"},"sloType":{"type":"string"},"site":{"type":"string"},"url":{"type":"string"}},"required":["type","integrationId","sloId","sloName","sloType","site","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["datadog.downtime"]},"integrationId":{"type":"string"},"downtimeId":{"type":"string"},"scope":{"type":"string"},"site":{"type":"string"}},"required":["type","integrationId","downtimeId","scope","site"]},{"type":"object","properties":{"type":{"type":"string","enum":["honeycomb.board"]},"integrationId":{"type":"string"},"boardId":{"type":"string"},"boardName":{"type":"string"},"url":{"type":"string"}},"required":["type","integrationId","boardId","boardName","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["honeycomb.trigger"]},"integrationId":{"type":"string"},"triggerId":{"type":"string"},"triggerName":{"type":"string"},"dataset":{"type":"string"}},"required":["type","integrationId","triggerId","triggerName","dataset"]},{"type":"object","properties":{"type":{"type":"string","enum":["honeycomb.slo"]},"integrationId":{"type":"string"},"sloId":{"type":"string"},"sloName":{"type":"string"},"dataset":{"type":"string"}},"required":["type","integrationId","sloId","sloName","dataset"]},{"type":"object","properties":{"type":{"type":"string","enum":["honeycomb.query_annotation"]},"integrationId":{"type":"string"},"annotationId":{"type":"string"},"queryId":{"type":"string"},"name":{"type":"string"},"dataset":{"type":"string"}},"required":["type","integrationId","annotationId","queryId","name","dataset"]},{"type":"object","properties":{"type":{"type":"string","enum":["axiom.dashboard"]},"integrationId":{"type":"string"},"dashboardId":{"type":"string"},"dashboardName":{"type":"string"}},"required":["type","integrationId","dashboardId","dashboardName"]},{"type":"object","properties":{"type":{"type":"string","enum":["axiom.monitor"]},"integrationId":{"type":"string"},"monitorId":{"type":"string"},"monitorName":{"type":"string"},"monitorType":{"type":"string"}},"required":["type","integrationId","monitorId","monitorName","monitorType"]},{"type":"object","properties":{"type":{"type":"string","enum":["axiom.view"]},"integrationId":{"type":"string"},"viewId":{"type":"string"},"viewName":{"type":"string"}},"required":["type","integrationId","viewId","viewName"]},{"type":"object","properties":{"type":{"type":"string","enum":["axiom.virtual_field"]},"integrationId":{"type":"string"},"virtualFieldId":{"type":"string"},"fieldName":{"type":"string"},"dataset":{"type":"string"}},"required":["type","integrationId","virtualFieldId","fieldName","dataset"]},{"type":"object","properties":{"type":{"type":"string","enum":["betterstack.monitor"]},"integrationId":{"type":"string"},"monitorId":{"type":"string"},"monitorName":{"type":"string"},"monitorType":{"type":"string"}},"required":["type","integrationId","monitorId","monitorName","monitorType"]},{"type":"object","properties":{"type":{"type":"string","enum":["betterstack.status_report"]},"integrationId":{"type":"string"},"statusReportId":{"type":"string"},"title":{"type":"string"},"statusPageId":{"type":"string"},"notified":{"type":"boolean"}},"required":["type","integrationId","statusReportId","title","statusPageId","notified"]},{"type":"object","properties":{"type":{"type":"string","enum":["openstatus.monitor"]},"integrationId":{"type":"string"},"monitorId":{"type":"string"},"monitorName":{"type":"string"},"monitorKind":{"type":"string"}},"required":["type","integrationId","monitorId","monitorName","monitorKind"]},{"type":"object","properties":{"type":{"type":"string","enum":["openstatus.status_report"]},"integrationId":{"type":"string"},"statusReportId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"pageId":{"type":"string"},"notified":{"type":"boolean"}},"required":["type","integrationId","statusReportId","title","status","pageId","notified"]},{"type":"object","properties":{"type":{"type":"string","enum":["linear.issue"]},"integrationId":{"type":"string"},"issueId":{"type":"string"},"identifier":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"required":["type","integrationId","issueId","identifier","title","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["sentry.alert_rule"]},"integrationId":{"type":"string"},"ruleId":{"type":"string"},"ruleName":{"type":"string"},"detectorIds":{"type":"array","items":{"type":"string"}},"projectSlug":{"type":"string"},"organizationSlug":{"type":"string"}},"required":["type","integrationId","ruleId","ruleName","organizationSlug"]},{"type":"object","properties":{"type":{"type":"string","enum":["sentry.metric_alert"]},"integrationId":{"type":"string"},"alertId":{"type":"string"},"alertName":{"type":"string"},"projectSlug":{"type":"string"},"organizationSlug":{"type":"string"}},"required":["type","integrationId","alertId","alertName","organizationSlug"]},{"type":"object","properties":{"type":{"type":"string","enum":["sentry.dashboard"]},"integrationId":{"type":"string"},"dashboardId":{"type":"string"},"dashboardName":{"type":"string"},"organizationSlug":{"type":"string"}},"required":["type","integrationId","dashboardId","dashboardName","organizationSlug"]},{"type":"object","properties":{"type":{"type":"string","enum":["issue.timeline"]},"issueId":{"type":"string"},"investigationThreadId":{"type":"string"}},"required":["type","issueId","investigationThreadId"]},{"nullable":true}]},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["artifact"]},"content":{"type":"string","description":"The artifact content"}},"required":["id","workspaceId","threadId","type","title","summary","status","currentVersion","created","updated","createdBy","messageId","metadata","_object","content"],"additionalProperties":false},"ArtifactVersion":{"type":"object","properties":{"artifactId":{"type":"string","pattern":"^art_[0-9a-z]{32}$","description":"ID of the artifact","example":"art_d18564pxsvozx979j3532mii2kk7pmw6"},"version":{"type":"integer","minimum":0},"content":{"type":"string"},"created":{"type":"string","nullable":true,"format":"date-time"},"createdBy":{"type":"string"},"changeNote":{"type":"string","nullable":true},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["artifact_version"]}},"required":["artifactId","version","content","created","createdBy","changeNote","_object"],"additionalProperties":false},"AutofixTimelineEventsList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AutofixTimelineEvent"}},"total":{"type":"number"}},"required":["items","total"],"additionalProperties":false},"AutofixTimelineEvent":{"type":"object","properties":{"id":{"type":"string","pattern":"^tle_[0-9a-z]{32}$","description":"ID of the timeline_event","example":"tle_d18564pxsvozx979j3532mii2kk7pmw6"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"autofixId":{"type":"string","pattern":"^fix_[0-9a-z]{24}$","description":"ID of the autofix","example":"fix_38mg3o4ibc92h8t2efn8csrh"},"type":{"type":"string","enum":["autofix.started","autofix.branch_pushed","autofix.pr_opened","autofix.pr_stale","autofix.pr_stale_nudge","autofix.pr_stale_commented","autofix.merged","autofix.closed","autofix.failed","autofix.no_fix_needed","autofix.cancelled","autofix.already_in_flight","autofix.severity_not_selected","autofix.quota_exhausted","autofix.disabled","autofix.plan_rejected","autofix.unreachable","autofix.reachable","autofix.expired","autofix.investigation_thread_linked","autofix.escalated","note","milestone"],"description":"Event type"},"at":{"type":"string","nullable":true,"format":"date-time","description":"When the event happened"},"title":{"type":"string","nullable":true,"description":"Optional human title"},"body":{"type":"string","nullable":true,"description":"Optional markdown body"},"data":{"type":"object","nullable":true,"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}]},"description":"Type-specific payload"},"refType":{"type":"string","nullable":true,"enum":["thread","automation","investigation","pull_request","issue",null],"description":"Linked entity type"},"refId":{"type":"string","nullable":true,"description":"Linked entity id"},"createdBy":{"type":"string","description":"User id or 'system'"},"deleted":{"type":"string","nullable":true,"format":"date-time","description":"Delete timestamp"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["timeline_event"]}},"required":["id","workspaceId","autofixId","type","at","title","body","data","refType","refId","createdBy","deleted","created","updated","_object"],"additionalProperties":false},"Autofix":{"type":"object","properties":{"id":{"type":"string","pattern":"^fix_[0-9a-z]{24}$","description":"ID of the autofix","example":"fix_38mg3o4ibc92h8t2efn8csrh"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"provider":{"type":"string","enum":["github"]},"owner":{"type":"string"},"repo":{"type":"string"},"branch":{"type":"string"},"part":{"type":"string","nullable":true,"description":"Which separately reviewable slice of the run's change this pull request carries when the run split its change across pull requests; null on the run's primary or only pull request"},"status":{"type":"string","enum":["started","branch_pushed","pr_opened","merged","closed","failed","no_fix_needed","already_in_flight","severity_not_selected","quota_exhausted","disabled","plan_rejected","unreachable","expired"]},"origin":{"type":"string","enum":["automation","chat","system","fix_run"]},"trigger":{"type":"string","nullable":true,"enum":["repo_connect","pr_review","ci_failure","investigation_improvement","repo_onboarding","codify_expected_behavior","executor_fallback","issue_detected","chat","pr_change_fix","automation","manual","monitoring","threshold","defect","change_record","alert","exploration","scan","local_agent","trend",null],"description":"What triggered the autofix. A fix on an issue records the issue's origin (alert, monitoring, threshold, defect, change_record, automation, manual, exploration, scan, local_agent, trend), with a CI failure alert as ci_failure; manual is a fix a person asked for, automation an automation's action, and the connect-time, review and onboarding passes record their own. Null only on rows recorded before every autofix carried one (their bucket is derived from origin where displayed)."},"executor":{"type":"string","enum":["native","devin","cursor","factory","conductor","capy","amp"]},"commitSha":{"type":"string","nullable":true},"baseBranch":{"type":"string","nullable":true},"automationId":{"type":"string","nullable":true},"executionId":{"type":"string","nullable":true},"actionRowId":{"type":"string","nullable":true},"actionPlanId":{"type":"string","nullable":true},"hypothesisId":{"type":"string","nullable":true},"runId":{"type":"string","nullable":true},"issueId":{"type":"string","nullable":true,"description":"The issue this autofix was created for; null when no issue exists (e.g. pr_review and repo_connect autofixes)"},"severity":{"type":"string","nullable":true,"enum":["critical","high","medium","low","info",null],"description":"Severity carried from the originating issue at creation; null when the autofix has no origin issue"},"detectionSeverity":{"type":"string","nullable":true,"enum":["critical","high","medium","low","info",null],"description":"The grade detection filed the originating issue at, carried next to severity so the pull request labels and this row show both; null when the issue carried none or the autofix has no origin issue"},"investigationThreadId":{"type":"string","nullable":true},"pullNumber":{"type":"integer","nullable":true},"threadId":{"type":"string","nullable":true},"parentThreadId":{"type":"string","nullable":true},"parentMessageId":{"type":"string","nullable":true},"artifactId":{"type":"string","nullable":true},"findingsCount":{"type":"integer","nullable":true},"title":{"type":"string","nullable":true},"prompt":{"type":"string","nullable":true},"failureReason":{"type":"string","nullable":true},"failureDetail":{"type":"string","nullable":true,"description":"Raw diagnostic output behind the failure reason (e.g. the tail of a failed environment setup script); null when the failure produced no captured output"},"nativeFallbackAt":{"type":"string","nullable":true,"format":"date-time","description":"When Polylane's own agent took the fix over after this hosted code agent run failed; null when it did not"},"skippedReason":{"type":"string","nullable":true},"skippedReasonDetail":{"type":"string","nullable":true,"description":"Full rationale behind the one-line skipped reason (e.g. the plan gate's per-check findings and redesign guidance); null when the skip carries no longer form"},"skippedKind":{"type":"string","nullable":true,"enum":["no_change","fix_unvalidated","output_lost","dedup_covered","disabled","already_in_flight","plan_rejected","repository_empty",null],"description":"What actually happened behind a skipped or held autofix. For no_fix_needed: no_change when the agent had nothing to change, fix_unvalidated when it applied edits it never validated, output_lost when it reported a fix but the working tree came back clean. For pre-dispatch rejections of the autofix tool call: dedup_covered when an existing autofix already covered the fix, disabled when the workspace or repository setting was off, already_in_flight when another run was in flight on the requesting thread, plan_rejected when the plan review refuted the plan, repository_empty when the repository has no files yet. Null when the skip predates classification or no gate applies"},"autoRetries":{"type":"integer","nullable":true,"description":"How many delayed automatic re-dispatches transient infrastructure failures have consumed on this autofix; null when no automatic retry has run"},"coveringPrNumber":{"type":"integer","nullable":true,"description":"For autofixes held as duplicates (already_in_flight, or no_fix_needed where the agent found the fix in flight), the open pull request that already covers the fix"},"coveringPrUrl":{"type":"string","nullable":true,"description":"For autofixes held as duplicates (already_in_flight, or no_fix_needed where the agent found the fix in flight), the URL of the open pull request that already covers the fix"},"submittedPrNumber":{"type":"integer","nullable":true},"submittedPrUrl":{"type":"string","nullable":true},"submittedAt":{"type":"string","nullable":true,"format":"date-time"},"prActivityAt":{"type":"string","nullable":true,"format":"date-time","description":"When the open pull request last received a push; null before a pull request exists"},"staleAt":{"type":"string","nullable":true,"format":"date-time","description":"When the open pull request was marked stale after a week without updates; a stale autofix stops holding new fixes for the same problem, and renewed activity clears it"},"staleNudgedAt":{"type":"string","nullable":true,"format":"date-time","description":"When the workspace was reminded that the stale pull request still needs a decision; set at most once per pull request and never cleared"},"prAdditions":{"type":"integer","nullable":true,"description":"Lines the pull request adds, as GitHub last reported them to the webhooks; null before a pull request exists or before GitHub has been asked"},"prDeletions":{"type":"integer","nullable":true,"description":"Lines the pull request removes, as GitHub last reported them to the webhooks; null before a pull request exists or before GitHub has been asked"},"prReviewDecision":{"type":"string","nullable":true,"enum":["approved","changes_requested","review_required",null],"description":"GitHub's standing review decision on the pull request: approved, changes_requested, or review_required when it still awaits a review; null when GitHub reports none or has not been asked"},"prChecks":{"type":"string","nullable":true,"enum":["success","failure","pending",null],"description":"The rolled-up state of the checks on the pull request's latest commit: success, failure, or pending while they run; null when the commit has no checks or GitHub has not been asked"},"prStateAt":{"type":"string","nullable":true,"format":"date-time","description":"When the review decision, checks and line counts were last written: read from GitHub, or blanked because a new pull request or run replaced the one they described; null on rows that predate the columns"},"mergedPrNumber":{"type":"integer","nullable":true},"mergedPrUrl":{"type":"string","nullable":true},"mergedAt":{"type":"string","nullable":true,"format":"date-time"},"mergedBy":{"type":"string","nullable":true},"mergedFromSlackAt":{"type":"string","nullable":true,"format":"date-time"},"mergedFromSlackChannelId":{"type":"string","nullable":true},"closedAt":{"type":"string","nullable":true,"format":"date-time"},"closedBy":{"type":"string","nullable":true},"closedByThreadId":{"type":"string","nullable":true,"description":"The thread whose tool call closed the pull request; null when the close happened on GitHub or predates attribution"},"closedByUserId":{"type":"string","nullable":true,"description":"The user on whose behalf the pull request was closed; null when the close happened on GitHub or predates attribution"},"closeReason":{"type":"string","nullable":true,"enum":["incorrect_fix","symptom_fix","superseded_by_human","not_a_real_issue","stale","intentional_behavior","unexplained","withdrawn_by_request","superseded_by_better_fix","evidence_unavailable","reconciled_from_github",null],"description":"Why the pull request was closed without merging: classified from its comments, reviews, and close context, or recorded as withdrawn_by_request when the requester asked Polylane to close it"},"closeReasonDetail":{"type":"string","nullable":true,"description":"Short rationale for the close reason, quoting the evidence it was derived from"},"closeEvidence":{"type":"string","nullable":true,"description":"JSON snapshot of the discussion signals (comments, reviews, commits) the close reason was classified from"},"closeReasonHumanAt":{"type":"string","nullable":true,"format":"date-time","description":"When a person stated the close reason from the console; null while the reason is Polylane's classification"},"cancelledAt":{"type":"string","nullable":true,"format":"date-time"},"cancelledByThreadId":{"type":"string","nullable":true,"description":"The thread whose tool call cancelled the run; null when the cancel came from the console or the run was never cancelled"},"cancelledByUserId":{"type":"string","nullable":true,"description":"The user on whose behalf the run was cancelled; null when the run was never cancelled"},"unreachableAt":{"type":"string","nullable":true,"format":"date-time","description":"When Polylane found it could no longer read the repository this fix lives in; null while the repository is readable"},"unreachableReason":{"type":"string","nullable":true,"enum":["installation_removed","repository_removed","installation_suspended",null],"description":"Why the repository became unreadable: installation_removed when the GitHub App installation is gone, repository_removed when the repository left the installation or GitHub; null while the repository is readable"},"expiredAt":{"type":"string","nullable":true,"format":"date-time","description":"When a run that pushed a branch or waited for approval was closed out for never reaching a pull request; null otherwise"},"archivedAt":{"type":"string","nullable":true,"format":"date-time","description":"When the autofix was archived. Archived autofixes leave every default list; ask for them with includeArchived"},"archivedBy":{"type":"string","nullable":true,"description":"Who archived the autofix: a user id, or system for the daily retention sweep"},"causalChain":{"type":"string","nullable":true,"description":"Reserved for JSON of the run's causal chain: the signal, the mechanism, the producer, the trigger, what happens to the failed unit today, the cadence check, and the blast radius. Null until a run records one"},"attributionQueriedAt":{"type":"string","nullable":true,"format":"date-time","description":"Reserved for when the run grouped the affected component's telemetry by instance or caller; null until a run records it"},"detectionOutcome":{"type":"string","nullable":true,"description":"The run's statement of which fingerprinted signal stops firing once the change deploys and why; null when the run stated none"},"stopgapKind":{"type":"string","nullable":true,"enum":["observability","producer_tracked",null],"description":"Set when the change shipped as a declared stopgap rather than the producer's fix: observability adds the telemetry needed to name the producer, producer_tracked contains the symptom while the producer's fix is a follow-up on the issue timeline; null for a fix"},"stopgapTimelineEntryId":{"type":"string","nullable":true,"description":"The follow-up note on the issue timeline the stopgap declaration named; null when no stopgap was declared"},"diffClass":{"type":"string","nullable":true,"enum":["whitespace","message_only","error_flow_only","behavioural",null],"description":"How the staged diff was classified before the run's first commit was recorded; null when the diff was never classified"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"devinUrl":{"type":"string","nullable":true,"description":"Devin session URL (present for devin-executed autofixes)"},"cursorUrl":{"type":"string","nullable":true,"description":"Cursor agent URL (present for cursor-executed autofixes)"},"factoryUrl":{"type":"string","nullable":true,"description":"Factory session URL (present for factory-executed autofixes)"},"conductorUrl":{"type":"string","nullable":true,"description":"Conductor session URL (present for conductor-executed autofixes)"},"capyUrl":{"type":"string","nullable":true,"description":"Capy thread URL (present for capy-executed autofixes)"},"ampUrl":{"type":"string","nullable":true,"description":"Amp thread URL (present for amp-executed autofixes)"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["autofix"]}},"required":["id","workspaceId","provider","owner","repo","branch","part","status","origin","trigger","executor","commitSha","baseBranch","automationId","executionId","actionRowId","actionPlanId","hypothesisId","runId","issueId","severity","detectionSeverity","investigationThreadId","pullNumber","threadId","parentThreadId","parentMessageId","artifactId","findingsCount","title","prompt","failureReason","failureDetail","nativeFallbackAt","skippedReason","skippedReasonDetail","skippedKind","autoRetries","coveringPrNumber","coveringPrUrl","submittedPrNumber","submittedPrUrl","submittedAt","prActivityAt","staleAt","staleNudgedAt","prAdditions","prDeletions","prReviewDecision","prChecks","prStateAt","mergedPrNumber","mergedPrUrl","mergedAt","mergedBy","mergedFromSlackAt","mergedFromSlackChannelId","closedAt","closedBy","closedByThreadId","closedByUserId","closeReason","closeReasonDetail","closeEvidence","closeReasonHumanAt","cancelledAt","cancelledByThreadId","cancelledByUserId","unreachableAt","unreachableReason","expiredAt","archivedAt","archivedBy","causalChain","attributionQueriedAt","detectionOutcome","stopgapKind","stopgapTimelineEntryId","diffClass","created","updated","_object"],"additionalProperties":false},"AutofixVideo":{"type":"object","properties":{"video":{"$ref":"#/components/schemas/AutofixVideoLink"}},"required":["video"]},"AutofixVideoLink":{"type":"object","nullable":true,"properties":{"headSha":{"type":"string","description":"The commit this walkthrough was linked for."},"recordedHeadSha":{"type":"string","description":"The commit the video records. An earlier commit than headSha when a later commit reused the walkthrough."},"outdated":{"type":"boolean","description":"The pull request changed what the video shows after the revision limit, so the video no longer describes headSha."},"currentHeadSha":{"type":"string","description":"The newest commit that has a walkthrough."},"baseUrl":{"type":"string","description":"Append /video.mp4, /poster.png, /captions.vtt or /chapters.json, then the sig query parameter."},"sig":{"type":"string","description":"Short-lived signature every media request carries as ?sig=."},"expiresAt":{"type":"string","description":"When the signature stops working. Request a fresh one before this instant."}},"required":["headSha","recordedHeadSha","outdated","currentHeadSha","baseUrl","sig","expiresAt"]},"AutofixDiff":{"type":"object","properties":{"prNumber":{"type":"number","nullable":true},"prUrl":{"type":"string","nullable":true},"diff":{"type":"string"},"truncated":{"type":"boolean"},"totalChars":{"type":"number"},"source":{"type":"string","enum":["pull_request","authored_patch"]},"body":{"type":"string","nullable":true,"description":"The pull request description: the copy archived when the pull request was recorded, else the current one from GitHub; null when neither is available"}},"required":["prNumber","prUrl","diff","truncated","totalChars","source","body"]},"AutofixRerun":{"type":"object","properties":{"id":{"type":"string"},"autofixId":{"type":"string"}},"required":["id","autofixId"]},"RerunAutofixRequest":{"type":"object","properties":{"workspaceId":{"type":"string","description":"ID of the workspace"},"id":{"type":"string","pattern":"^fix_[0-9a-z]{24}$","description":"ID of the skipped or failed autofix to run again","example":"fix_38mg3o4ibc92h8t2efn8csrh"}},"required":["workspaceId","id"]},"MergeAutofixRequest":{"type":"object","properties":{"workspaceId":{"type":"string","description":"ID of the workspace"},"id":{"type":"string","pattern":"^fix_[0-9a-z]{24}$","description":"ID of the autofix whose open pull request to merge","example":"fix_38mg3o4ibc92h8t2efn8csrh"}},"required":["workspaceId","id"]},"CloseAutofixRequest":{"type":"object","properties":{"workspaceId":{"type":"string","description":"ID of the workspace"},"id":{"type":"string","pattern":"^fix_[0-9a-z]{24}$","description":"ID of the autofix whose open pull request to close","example":"fix_38mg3o4ibc92h8t2efn8csrh"},"comment":{"type":"string","minLength":1,"maxLength":4000,"description":"Why the pull request is being closed; posted on the pull request and read by the close-reason classification"}},"required":["workspaceId","id","comment"]},"ArchiveAutofixesResponse":{"type":"object","properties":{"archived":{"type":"integer","description":"How many autofixes this call archived; rows already archived are not counted"},"skipped":{"type":"integer","description":"Ids left as they were: unknown to the workspace, already archived, repeated in the request, or an open pull request GitHub would not let Polylane close"}},"required":["archived","skipped"]},"ArchiveAutofixesRequest":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"ids":{"type":"array","items":{"type":"string","pattern":"^fix_[0-9a-z]{24}$","description":"ID of the autofix","example":"fix_38mg3o4ibc92h8t2efn8csrh"},"minItems":1,"maxItems":500,"description":"The autofixes to archive. Either this or olderThanDays."},"olderThanDays":{"type":"integer","minimum":7,"maximum":365,"description":"Archive every autofix merged or closed more than this many days ago, and every superseded one. Either this or ids."}},"required":["workspaceId"]},"RequestAutofixChangesRequest":{"type":"object","properties":{"workspaceId":{"type":"string","description":"ID of the workspace"},"id":{"type":"string","pattern":"^fix_[0-9a-z]{24}$","description":"ID of the autofix whose open pull request should change","example":"fix_38mg3o4ibc92h8t2efn8csrh"},"comment":{"type":"string","minLength":1,"maxLength":4000,"description":"What should change, in the requester's words; lands on the run's thread as their message and starts the turn that revises the pull request"}},"required":["workspaceId","id","comment"]},"AutofixCancel":{"type":"object","properties":{"id":{"type":"string"},"autofixId":{"type":"string"},"remoteSessionStopped":{"type":"boolean","nullable":true,"description":"For an autofix running on an external code agent, whether the remote session was stopped; null when the run had no remote session"}},"required":["id","autofixId","remoteSessionStopped"]},"CancelAutofixRequest":{"type":"object","properties":{"workspaceId":{"type":"string","description":"ID of the workspace"},"id":{"type":"string","pattern":"^fix_[0-9a-z]{24}$","description":"ID of the running autofix to cancel","example":"fix_38mg3o4ibc92h8t2efn8csrh"}},"required":["workspaceId","id"]},"AutofixCloseReason":{"type":"object","properties":{"id":{"type":"string","pattern":"^fix_[0-9a-z]{24}$","description":"ID of the autofix","example":"fix_38mg3o4ibc92h8t2efn8csrh"},"closeReason":{"type":"string","enum":["incorrect_fix","symptom_fix","superseded_by_human","not_a_real_issue","stale","intentional_behavior"]},"closeReasonDetail":{"type":"string","nullable":true}},"required":["id","closeReason","closeReasonDetail"]},"SetAutofixCloseReasonRequest":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"id":{"type":"string","pattern":"^fix_[0-9a-z]{24}$","description":"ID of the closed autofix to record the reason on","example":"fix_38mg3o4ibc92h8t2efn8csrh"},"closeReason":{"type":"string","enum":["incorrect_fix","symptom_fix","superseded_by_human","not_a_real_issue","stale","intentional_behavior"],"description":"Why the pull request was closed without merging, as stated by the person closing it"},"closeReasonDetail":{"type":"string","nullable":true,"maxLength":1000,"description":"Optional free-form note explaining the reason"}},"required":["workspaceId","id","closeReason"]},"AdminAutofixVideo":{"type":"object","properties":{"video":{"$ref":"#/components/schemas/AutofixVideoLink"}},"required":["video"]},"AdminAutofixStaleSweep":{"type":"object","properties":{"dryRun":{"type":"boolean"},"graceDays":{"type":"number"},"remindOnly":{"type":"boolean"},"closeAfterNudgeMs":{"type":"number"},"queued":{"type":"array","items":{"type":"string"}},"workspaces":{"type":"array","items":{"type":"object","properties":{"workspaceId":{"type":"string"},"mark":{"type":"array","items":{"type":"object","properties":{"autofixId":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"},"prNumber":{"type":"number","nullable":true},"trigger":{"type":"string","nullable":true},"submittedAt":{"type":"string","nullable":true},"staleAt":{"type":"string","nullable":true},"staleNudgedAt":{"type":"string","nullable":true}},"required":["autofixId","owner","repo","prNumber","trigger","submittedAt","staleAt","staleNudgedAt"]}},"remind":{"type":"array","items":{"type":"object","properties":{"autofixId":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"},"prNumber":{"type":"number","nullable":true},"trigger":{"type":"string","nullable":true},"submittedAt":{"type":"string","nullable":true},"staleAt":{"type":"string","nullable":true},"staleNudgedAt":{"type":"string","nullable":true}},"required":["autofixId","owner","repo","prNumber","trigger","submittedAt","staleAt","staleNudgedAt"]}},"close":{"type":"array","items":{"type":"object","properties":{"autofixId":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"},"prNumber":{"type":"number","nullable":true},"trigger":{"type":"string","nullable":true},"submittedAt":{"type":"string","nullable":true},"staleAt":{"type":"string","nullable":true},"staleNudgedAt":{"type":"string","nullable":true}},"required":["autofixId","owner","repo","prNumber","trigger","submittedAt","staleAt","staleNudgedAt"]}}},"required":["workspaceId","mark","remind","close"]}},"totals":{"type":"object","properties":{"workspaces":{"type":"number"},"mark":{"type":"number"},"remind":{"type":"number"},"close":{"type":"number"}},"required":["workspaces","mark","remind","close"]}},"required":["dryRun","graceDays","remindOnly","closeAfterNudgeMs","queued","workspaces","totals"]},"AdminAutofixStaleSweepRequest":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"Run for this workspace only; every workspace when omitted","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"graceDays":{"type":"integer","minimum":1,"maximum":365,"default":7,"description":"Days after the reminder before the close tier acts, for this run only"},"dryRun":{"type":"boolean","default":true,"description":"Report the rows each tier would act on and change nothing"},"remindOnly":{"type":"boolean","default":false,"description":"Mark and remind, and skip the close tier"}}},"AdminAutofixReconcile":{"type":"object","properties":{"dispatched":{"type":"array","items":{"type":"object","properties":{"workspaceId":{"type":"string"}},"required":["workspaceId"]}},"count":{"type":"number"}},"required":["dispatched","count"]},"AdminAutofixReconcileRequest":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"Reconcile this workspace only; every workspace when omitted","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"}}},"PublicDeliverable":{"type":"object","properties":{"deliverable":{"$ref":"#/components/schemas/Deliverable"},"content":{"type":"object","additionalProperties":{"nullable":true},"description":"The typed record the deliverable shows: an autofix run or a pull request analysis, by the deliverable type."},"viewer":{"type":"object","properties":{"member":{"type":"boolean","description":"The caller is a member of the workspace and can change who sees the deliverable."},"guest":{"type":"boolean","description":"The caller opened the deliverable with a pull request guest link."}},"required":["member","guest"]},"video":{"$ref":"#/components/schemas/AutofixVideoLink"}},"required":["deliverable","content","viewer","video"]},"Deliverable":{"type":"object","properties":{"id":{"type":"string","pattern":"^dlv_[0-9a-z]{24}$","description":"ID of the deliverable","example":"dlv_38mg3o4ibc92h8t2efn8csrh"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"type":{"type":"string","enum":["autofix_run","pr_analysis"],"description":"What the deliverable records: an autofix run or a pull request analysis."},"subjectId":{"type":"string","description":"The autofix id for an autofix run, or the pull request change record id for a pull request analysis."},"headSha":{"type":"string","nullable":true,"description":"The commit a pull request analysis analysed. Null for an autofix run."},"title":{"type":"string"},"status":{"type":"string","enum":["fix_prepared","fix_submitted","pass","fail"]},"visibility":{"type":"string","enum":["public","private","unlisted","workspace","workspace_and_guests","workspace_and_github_org","private_and_guests","team","team_and_guests","custom","internal"]},"ownerId":{"type":"string"},"threadId":{"type":"string","nullable":true,"description":"The thread that produced the work."},"repositoryId":{"type":"string","nullable":true},"owner":{"type":"string"},"repo":{"type":"string"},"prNumber":{"type":"integer","nullable":true},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","workspaceId","type","subjectId","headSha","title","status","visibility","ownerId","threadId","repositoryId","owner","repo","prNumber","created","updated"],"additionalProperties":false},"DeliverableVideo":{"type":"object","properties":{"video":{"$ref":"#/components/schemas/AutofixVideoLink"}},"required":["video"]},"DeliverablePatch":{"type":"object","properties":{"visibility":{"type":"string","enum":["private","workspace","workspace_and_github_org","public"],"description":"Who can open the deliverable. Making it private makes the caller its owner."}},"required":["visibility"],"additionalProperties":false},"IssueTimelineEventsList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/IssueTimelineEvent"}},"total":{"type":"number"}},"required":["items","total"],"additionalProperties":false},"IssueTimelineEvent":{"type":"object","properties":{"id":{"type":"string","pattern":"^tle_[0-9a-z]{32}$","description":"ID of the timeline_event","example":"tle_d18564pxsvozx979j3532mii2kk7pmw6"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"issueId":{"type":"string","pattern":"^iss_[0-9a-z]{24}$","description":"ID of the issue","example":"iss_38mg3o4ibc92h8t2efn8csrh"},"type":{"type":"string","enum":["issue.detected","issue.re_detected","issue.severity_changed","issue.triaging","issue.triaged","issue.resolved","issue.investigation_linked","issue.investigation_unlinked","issue.correlated","issue.escalated","investigation.started","investigation.restarted","investigation.held","investigation.skipped","investigation.run_started","investigation.run_completed","autofix.started","autofix.branch_pushed","autofix.pr_opened","autofix.failed","autofix.merged","autofix.closed","note","milestone"],"description":"Event type"},"at":{"type":"string","nullable":true,"format":"date-time","description":"When the event happened"},"title":{"type":"string","nullable":true,"description":"Optional human title"},"body":{"type":"string","nullable":true,"description":"Optional markdown body"},"data":{"type":"object","nullable":true,"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}]},"description":"Type-specific payload"},"refType":{"type":"string","nullable":true,"enum":["investigation","thread","automation","run","hypothesis","autofix","pull_request","artifact","issue","escalation",null],"description":"Linked entity type"},"refId":{"type":"string","nullable":true,"description":"Linked entity id"},"createdBy":{"type":"string","description":"User id or 'system'"},"deleted":{"type":"string","nullable":true,"format":"date-time","description":"Delete timestamp"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"},"_html_url":{"type":"string"},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["timeline_event"]}},"required":["id","workspaceId","issueId","type","at","title","body","data","refType","refId","createdBy","deleted","created","updated","_object"],"additionalProperties":false},"Issue":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string","enum":["polylane","datadog","honeycomb","sentry","cloudwatch","gcp","vercel","axiom","betterstack","openstatus","grafana","logfire","langsmith","braintrust","newrelic","linear","render","railway","cloudflare","github","triggerdev","posthog"]},"origin":{"type":"string","enum":["monitoring","threshold","defect","change_record","alert","automation","manual","exploration","scan","local_agent","trend"]},"originId":{"type":"string","nullable":true},"externalId":{"type":"string","nullable":true},"integrationId":{"type":"string","nullable":true},"checkId":{"type":"string","nullable":true},"checkRunId":{"type":"string","nullable":true},"contributingCheckIds":{"type":"array","items":{"type":"string"}},"resourceKind":{"type":"string","nullable":true,"enum":["infra_node","cloud_account","integration","repository",null]},"resourceId":{"type":"string","nullable":true},"provider":{"type":"string","nullable":true},"account":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"nodeType":{"type":"string","nullable":true},"title":{"type":"string"},"titleKey":{"type":"string","nullable":true,"description":"Normalized form of the title, used to fold an alert whose provider id churned into the issue that already tracks it."},"summary":{"type":"string","nullable":true},"message":{"type":"string","nullable":true},"reasoning":{"type":"string","nullable":true},"verdictReason":{"type":"string","nullable":true},"tags":{"type":"object","additionalProperties":{"type":"string"}},"metrics":{"type":"array","items":{"$ref":"#/components/schemas/IssueMetricSummary"}},"cause":{"$ref":"#/components/schemas/IssueCause"},"sourceSeverity":{"type":"string","nullable":true,"enum":["critical","error","warning","info","ok",null]},"sourceStatus":{"type":"string","nullable":true,"enum":["triggered","recovered","acknowledged","unknown",null]},"sourceStatusAt":{"type":"string","nullable":true,"format":"date-time"},"severity":{"type":"string","enum":["critical","high","medium","low","info"]},"detectionSeverity":{"type":"string","nullable":true,"enum":["critical","high","medium","low","info",null],"description":"The severity detection filed the issue at, kept as filed while triage may re-grade severity. Null on issues from paths that carry no detection grade."},"status":{"type":"string","enum":["new","triaging","confirmed","dismissed","failed","skipped"]},"investigationThreadId":{"type":"string","nullable":true,"description":"The issue's fix run thread. Triage, the investigation and every later request on the issue run on this one thread. Null until a fix run opens."},"triageFindings":{"type":"string","nullable":true,"description":"The triage agent's findings (markdown). Handed to a later investigation alongside the original issue body."},"triageFailureReason":{"type":"string","nullable":true,"enum":["credits_unavailable","turn_failed","no_terminal_tool_call","timeout","workflow_error","daily_limit","investigation_held","autofix_disabled",null],"description":"Why alert triage failed when status is failed. Null on issues whose triage concluded or that other paths created."},"investigationStartedAt":{"type":"string","nullable":true,"format":"date-time","description":"When the thread started to investigate the confirmed issue. Null while the issue has no investigation of its own: triaging, dismissed, held, or delegated to a duplicate parent."},"investigationHeldAt":{"type":"string","nullable":true,"format":"date-time","description":"Set when an automatic investigation was held back for this confirmed issue because its severity is below the workspace's auto-investigation threshold; cleared when one starts. Rows held before the severity floor became the only hold may still carry a limit or covered-by-PR reason."},"investigationHoldReason":{"type":"string","nullable":true,"enum":["severity_floor","pacing","limit","covered_by_pr",null],"description":"Why the hold at investigationHeldAt was placed. Null when the issue is not held, and on issues held before reasons were stored."},"duplicateOfIssueId":{"type":"string","nullable":true,"description":"Set when this issue is a duplicate of another open issue: it is not investigated separately, and the parent issue's investigation covers it. Follow the parentIssue link for the investigation."},"duplicateReason":{"type":"string","nullable":true,"description":"Why this issue was judged a duplicate of duplicateOfIssueId. Null for duplicates delegated before the reason was recorded."},"fingerprint":{"type":"string","nullable":true},"causeClass":{"type":"string","nullable":true,"enum":["code_defect","flaky_infra","external_client","expected_behavior","config_or_env","unknown",null],"description":"Latest cause verdict for the issue: what class of problem produced it. Advisory from triage, authoritative from the investigation classifier."},"causeConfidence":{"type":"string","nullable":true,"enum":["low","medium","high",null],"description":"Confidence in causeClass. Low-confidence verdicts never drive autonomous actions."},"occurrenceCount":{"type":"integer","minimum":1},"verdictOccurrenceCount":{"type":"integer","nullable":true,"description":"The occurrence count when the current verdict was recorded. Recurrences since the verdict are occurrenceCount minus this. Null on issues whose verdict predates the field."},"verdictActorType":{"type":"string","nullable":true,"enum":["triage","investigation","automation","human","system",null],"description":"Who wrote the current verdict. A human verdict is final: recurrences never send it back through triage. Null on issues whose verdict predates the field."},"retriageCount":{"type":"integer","minimum":0,"description":"How many times a dismissed verdict on this issue was reconsidered by a fresh triage because the problem kept recurring."},"retriageSnapshot":{"type":"object","nullable":true,"properties":{"status":{"type":"string","enum":["new","triaging","confirmed","dismissed","failed","skipped"]},"severity":{"type":"string","enum":["critical","high","medium","low","info"]},"resolvedAt":{"type":"integer","nullable":true},"verdictActorType":{"type":"string","nullable":true,"enum":["triage","investigation","automation","human","system",null]},"retriageCount":{"type":"integer"},"startedAt":{"type":"integer"},"attachedAt":{"type":"integer","nullable":true},"duplicateOfIssueId":{"type":"string","nullable":true},"duplicateReason":{"type":"string","nullable":true}},"required":["status","severity","resolvedAt","verdictActorType","retriageCount","startedAt","attachedAt"],"additionalProperties":false,"description":"The row as it was before the re-triage in flight began; null when no re-triage is in flight."},"detectedAt":{"type":"string","format":"date-time"},"lastSeenAt":{"type":"string","format":"date-time"},"metricsComputedAt":{"type":"string","nullable":true,"format":"date-time"},"triagedAt":{"type":"string","nullable":true,"format":"date-time"},"resolvedAt":{"type":"string","nullable":true,"format":"date-time"},"archivedAt":{"type":"string","nullable":true,"format":"date-time","description":"When the issue was archived. Archived issues leave every default list; ask for them with includeArchived."},"archivedBy":{"type":"string","nullable":true,"description":"Who archived the issue: a user id, or system for the daily retention sweep."},"_html_url":{"type":"string","description":"The issue's full record page in the console, including when no investigation has started."},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."}},"required":["id","source","origin","originId","externalId","integrationId","checkId","checkRunId","contributingCheckIds","resourceKind","resourceId","provider","account","region","nodeType","title","titleKey","summary","message","reasoning","verdictReason","tags","metrics","cause","sourceSeverity","sourceStatus","sourceStatusAt","severity","detectionSeverity","status","investigationThreadId","triageFindings","triageFailureReason","investigationStartedAt","investigationHeldAt","investigationHoldReason","duplicateOfIssueId","duplicateReason","fingerprint","causeClass","causeConfidence","occurrenceCount","verdictOccurrenceCount","verdictActorType","retriageCount","retriageSnapshot","detectedAt","lastSeenAt","metricsComputedAt","triagedAt","resolvedAt","archivedAt","archivedBy"],"additionalProperties":false},"IssueMetricSummary":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"type":"string","nullable":true},"provenance":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["user_dashboard","user_saved_query","user_alert_rule"]},"provider":{"type":"string"},"objectId":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"rule":{"type":"string"}},"required":["kind","provider","objectId","name"],"additionalProperties":false}},"calculation":{"type":"string"},"value":{"type":"number","nullable":true},"current":{"type":"number","nullable":true},"min":{"type":"number","nullable":true},"avg":{"type":"number","nullable":true},"max":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"chartGroup":{"type":"string","nullable":true},"query":{"type":"string"},"series":{"type":"array","items":{"type":"object","properties":{"time":{"type":"string"},"value":{"type":"number","nullable":true}},"required":["time","value"],"additionalProperties":false}},"baselineMean":{"type":"number","nullable":true},"baselineStd":{"type":"number","nullable":true},"deviationSigma":{"type":"number","nullable":true},"worseDirection":{"type":"string","nullable":true,"enum":["up","down","both",null]},"breachFromIndex":{"type":"integer","nullable":true}},"required":["id","label","calculation","current","min","avg","max"],"additionalProperties":false},"IssueCause":{"type":"object","nullable":true,"properties":{"metrics":{"type":"array","items":{"type":"string"}},"logTemplates":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["ERROR","WARN"]},"template":{"type":"string"},"sample":{"type":"string","nullable":true},"count":{"type":"number","nullable":true}},"required":["severity","template"],"additionalProperties":false}},"traceIds":{"type":"array","items":{"type":"string"}}},"required":["metrics","logTemplates","traceIds"],"additionalProperties":false,"description":"The specific signals that caused this issue: metric calculation names, exact log templates, and trace ids. Null for issues recorded before causes were captured."},"InvestigateIssueResponse":{"type":"object","properties":{"issueId":{"type":"string"},"investigationThreadId":{"type":"string"},"deduped":{"type":"boolean"},"paused":{"type":"boolean","description":"Whether the run is waiting for the workspace to connect GitHub"},"dedupReason":{"type":"string","enum":["existing_run","verdict_run_live","finding_deferred"],"description":"Why the run was deduplicated: existing_run means the ask reached the issue's thread; verdict_run_live means the existing verdict run owns the finding; finding_deferred means the exploration remains inconclusive and no automatic run was started"}},"required":["issueId","investigationThreadId","deduped","paused"]},"ArchiveIssuesResponse":{"type":"object","properties":{"archived":{"type":"integer","description":"How many issues this call archived, or would archive on a dry run; rows already archived are not counted"},"dryRun":{"type":"boolean","description":"Whether nothing was archived and the count is a prediction"}},"required":["archived","dryRun"]},"ArchiveIssuesRequest":{"type":"object","properties":{"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"ids":{"type":"array","items":{"type":"string","pattern":"^iss_[0-9a-z]{24}$","description":"ID of the issue","example":"iss_38mg3o4ibc92h8t2efn8csrh"},"minItems":1,"maxItems":500,"description":"The issues to archive. Either this or olderThanDays."},"olderThanDays":{"type":"integer","minimum":7,"maximum":365,"description":"Archive every issue in the scope last seen more than this many days ago. Either this or ids."},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/ArchiveIssuesScope"},"minItems":1,"maxItems":4,"description":"Which issues the age-based archive reaches: a row in any of these scopes qualifies, with the same anchors the list filters use. Omit it to reach the whole workspace."},"dryRun":{"type":"boolean","description":"Count what the age-based archive would reach without archiving anything."}},"required":["workspaceId"]},"ArchiveIssuesScope":{"type":"object","properties":{"source":{"type":"string","enum":["polylane","datadog","honeycomb","sentry","cloudwatch","gcp","vercel","axiom","betterstack","openstatus","grafana","logfire","langsmith","braintrust","newrelic","linear","render","railway","cloudflare","github","triggerdev","posthog"]},"origin":{"type":"string","enum":["monitoring","threshold","defect","change_record","alert","automation","manual","exploration","scan","local_agent","trend"]},"resourceKind":{"type":"string","enum":["infra_node","cloud_account","integration","repository"]},"resourceId":{"type":"string"},"integrationId":{"type":"string"},"provider":{"type":"string"},"account":{"type":"string"},"region":{"type":"string"},"nodeType":{"type":"string"}},"additionalProperties":false},"IssueDispositionsListResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/IssueDisposition"}},"count":{"type":"integer"}},"required":["items","count"],"additionalProperties":false},"IssueDisposition":{"type":"object","properties":{"id":{"type":"string"},"issueId":{"type":"string"},"action":{"type":"string","enum":["patch","request_rerun","dismiss_with_cause","silence_with_explanation","codify_expected_behavior","flag_as_external","escalate","suppress_fingerprint","suggest_retry_step"]},"causeClass":{"type":"string","nullable":true,"enum":["code_defect","flaky_infra","external_client","expected_behavior","config_or_env","unknown",null]},"causeConfidence":{"type":"string","nullable":true,"enum":["low","medium","high",null]},"actorType":{"type":"string","enum":["triage","investigation","automation","human","system"]},"actorId":{"type":"string","nullable":true},"explanation":{"type":"string","nullable":true},"fingerprint":{"type":"string","nullable":true},"threadId":{"type":"string","nullable":true},"automationId":{"type":"string","nullable":true},"executionId":{"type":"string","nullable":true},"escalationId":{"type":"string","nullable":true},"pageId":{"type":"string","nullable":true},"outcome":{"type":"string","nullable":true,"enum":["resolved_flaky","failed_again","reversed",null]},"outcomeAt":{"type":"integer","nullable":true},"decidedAt":{"type":"integer"}},"required":["id","issueId","action","causeClass","causeConfidence","actorType","actorId","explanation","fingerprint","threadId","automationId","executionId","escalationId","pageId","outcome","outcomeAt","decidedAt"],"additionalProperties":false},"IssueWithDetails":{"allOf":[{"$ref":"#/components/schemas/Issue"},{"type":"object","properties":{"raw":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"analysisMarkdown":{"type":"string","nullable":true},"logs":{"$ref":"#/components/schemas/IssueLogsBlob"},"traces":{"$ref":"#/components/schemas/IssueTracesBlob"},"sourceQuery":{"type":"string","nullable":true},"sourceUrl":{"type":"string","nullable":true},"fingerprintSuppressedAt":{"type":"integer","nullable":true,"description":"Set when the issue's alert signature is currently suppressed: automatic triage skips new alerts with this signature until the suppression is lifted."},"fingerprintFlakyCount":{"type":"integer","nullable":true,"description":"How many times this alert signature resolved as flaky (a re-run request whose alert recovered without the failure recurring). Null when never tracked."}},"required":["raw","analysisMarkdown","logs","traces","sourceQuery","sourceUrl","fingerprintSuppressedAt","fingerprintFlakyCount"],"additionalProperties":false}]},"IssueLogsBlob":{"type":"object","nullable":true,"properties":{"version":{"type":"number","enum":[1]},"windowMs":{"type":"number"},"bucketMs":{"type":"number"},"totalCount":{"type":"number"},"severityTotals":{"type":"object","properties":{"ERROR":{"type":"number"},"WARN":{"type":"number"},"INFO":{"type":"number"},"DEBUG":{"type":"number"},"UNKNOWN":{"type":"number"}}},"buckets":{"type":"array","items":{"type":"object","properties":{"time":{"type":"string"},"error":{"type":"number"},"warn":{"type":"number"},"info":{"type":"number"}},"required":["time","error","warn","info"],"additionalProperties":false}},"topTemplates":{"type":"array","items":{"type":"object","properties":{"template":{"type":"string"},"severity":{"type":"string","enum":["ERROR","WARN","INFO","DEBUG","UNKNOWN"]},"count":{"type":"number"},"firstSeenMs":{"type":"number"},"lastSeenMs":{"type":"number"},"sample":{"type":"string"}},"required":["template","severity","count","firstSeenMs","lastSeenMs","sample"],"additionalProperties":false}},"newTemplates":{"type":"array","items":{"type":"object","properties":{"template":{"type":"string"},"severity":{"type":"string","enum":["ERROR","WARN","INFO","DEBUG","UNKNOWN"]},"count":{"type":"number"},"firstSeenMs":{"type":"number"},"lastSeenMs":{"type":"number"},"sample":{"type":"string"}},"required":["template","severity","count","firstSeenMs","lastSeenMs","sample"],"additionalProperties":false}},"contextTemplates":{"type":"array","items":{"type":"object","properties":{"template":{"type":"string"},"severity":{"type":"string","enum":["ERROR","WARN","INFO","DEBUG","UNKNOWN"]},"count":{"type":"number"},"firstSeenMs":{"type":"number"},"lastSeenMs":{"type":"number"},"sample":{"type":"string"}},"required":["template","severity","count","firstSeenMs","lastSeenMs","sample"],"additionalProperties":false}}},"required":["version","windowMs","bucketMs","totalCount","severityTotals","buckets","topTemplates","newTemplates"],"additionalProperties":false},"IssueTracesBlob":{"type":"object","nullable":true,"properties":{"version":{"type":"number","enum":[1]},"resourceContext":{"type":"object","properties":{"kind":{"type":"string","enum":["infra_node","cloud_account","integration","repository"]},"provider":{"type":"string"},"account":{"type":"string"},"region":{"type":"string"},"type":{"type":"string"},"id":{"type":"string"}},"required":["kind","id"],"additionalProperties":false},"digest":{"type":"object","properties":{"source":{"type":"string","enum":["aws.xray","cloudflare.workers-observability","triggerdev.runs"]},"latencyKind":{"type":"string","enum":["wall-time","operation"]},"windowMs":{"type":"number"},"bucketMs":{"type":"number"},"degraded":{"type":"boolean"},"totalCount":{"type":"number","nullable":true},"errorCount":{"type":"number","nullable":true},"faultCount":{"type":"number","nullable":true},"throttleCount":{"type":"number","nullable":true},"errorRate":{"type":"number","nullable":true},"latency":{"type":"array","items":{"type":"object","properties":{"statistic":{"type":"string","enum":["p50","p90","p95","p99"]},"unit":{"type":"string","enum":["ms"]},"points":{"type":"array","items":{"type":"object","properties":{"time":{"type":"string"},"value":{"type":"number","nullable":true}},"required":["time","value"]}}},"required":["statistic","unit","points"]}},"counts":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","enum":["ok","errors","faults","throttles","total"]},"points":{"type":"array","items":{"type":"object","properties":{"time":{"type":"string"},"value":{"type":"number","nullable":true}},"required":["time","value"]}}},"required":["label","points"]}},"operations":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"number"},"errorCount":{"type":"number"},"latencyMsP50":{"type":"number","nullable":true},"latencyMsP95":{"type":"number","nullable":true},"latencyMsP99":{"type":"number","nullable":true}},"required":["name","count","errorCount","latencyMsP50","latencyMsP95","latencyMsP99"]}},"handlers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"number"},"errorCount":{"type":"number"},"latencyMsP50":{"type":"number","nullable":true},"latencyMsP95":{"type":"number","nullable":true},"latencyMsP99":{"type":"number","nullable":true}},"required":["name","count","errorCount","latencyMsP50","latencyMsP95","latencyMsP99"]}},"topErrors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startedAt":{"type":"string","nullable":true},"durationMs":{"type":"number","nullable":true},"outcome":{"type":"string","enum":["ok","error","fault","throttle","unknown"]},"httpStatus":{"type":"number","nullable":true},"errorMessage":{"type":"string","nullable":true},"url":{"type":"string","nullable":true}},"required":["id","startedAt","durationMs","outcome"]}},"topSlow":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startedAt":{"type":"string","nullable":true},"durationMs":{"type":"number","nullable":true},"outcome":{"type":"string","enum":["ok","error","fault","throttle","unknown"]},"httpStatus":{"type":"number","nullable":true},"errorMessage":{"type":"string","nullable":true},"url":{"type":"string","nullable":true}},"required":["id","startedAt","durationMs","outcome"]}}},"required":["source","windowMs","bucketMs","totalCount","errorCount","faultCount","throttleCount","errorRate","latency","counts","operations","handlers","topErrors","topSlow"]},"exemplars":{"type":"array","items":{"type":"object","properties":{"trace":{"type":"object","properties":{"id":{"type":"string"},"startedAt":{"type":"string","nullable":true},"durationMs":{"type":"number","nullable":true},"outcome":{"type":"string","enum":["ok","error","fault","throttle","unknown"]},"httpStatus":{"type":"number","nullable":true},"errorMessage":{"type":"string","nullable":true},"url":{"type":"string","nullable":true}},"required":["id","startedAt","durationMs","outcome"]},"logs":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"number"},"message":{"type":"string"},"level":{"type":"string","nullable":true}},"required":["timestamp","message"]}},"correlation":{"type":"string","enum":["trace-id","time-window"]}},"required":["trace","logs","correlation"]}}},"required":["version","resourceContext","digest"],"additionalProperties":false},"IssueTriageRulesListResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/IssueTriageRule"}},"count":{"type":"integer"},"root":{"$ref":"#/components/schemas/IssueTriageRulesRoot"}},"required":["items","count","root"],"additionalProperties":false},"IssueTriageRule":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"group":{"type":"string","nullable":true},"enabledInProvider":{"type":"boolean"},"triageEnabled":{"type":"boolean"}},"required":["id","name","group","enabledInProvider","triageEnabled"],"additionalProperties":false},"IssueTriageRulesRoot":{"type":"object","properties":{"triageEnabled":{"type":"boolean"}},"required":["triageEnabled"],"additionalProperties":false},"IssueTriagePatchResult":{"type":"object","properties":{"integrationId":{"type":"string"},"scope":{"type":"string","enum":["root","rule"]},"ruleExternalId":{"type":"string","nullable":true},"triageEnabled":{"type":"boolean"}},"required":["integrationId","scope","ruleExternalId","triageEnabled"],"additionalProperties":false},"IssueFingerprintSuppressionsListResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/IssueFingerprintSuppression"}},"count":{"type":"integer"}},"required":["items","count"],"additionalProperties":false},"IssueFingerprintSuppression":{"type":"object","properties":{"id":{"type":"string"},"fingerprint":{"type":"string"},"issueId":{"type":"string","nullable":true},"causeClass":{"type":"string","nullable":true,"enum":["code_defect","flaky_infra","external_client","expected_behavior","config_or_env","unknown",null]},"explanation":{"type":"string","nullable":true},"createdBy":{"type":"string"},"suppressedAt":{"type":"integer","nullable":true},"created":{"type":"integer"},"updated":{"type":"integer"}},"required":["id","fingerprint","issueId","causeClass","explanation","createdBy","suppressedAt","created","updated"],"additionalProperties":false},"IssueFlakyFingerprintsListResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/IssueFlakyFingerprint"}},"count":{"type":"integer"}},"required":["items","count"],"additionalProperties":false},"IssueFlakyFingerprint":{"type":"object","properties":{"fingerprint":{"type":"string"},"flakyCount":{"type":"integer"},"owner":{"type":"string","nullable":true},"repo":{"type":"string","nullable":true},"workflow":{"type":"string","nullable":true},"lastFlakyAt":{"type":"integer"},"retryStepSuggestedAt":{"type":"integer","nullable":true,"description":"Set when Polylane suggested wiring an automatic retry step for this signature. At most one suggestion per signature."}},"required":["fingerprint","flakyCount","owner","repo","workflow","lastFlakyAt","retryStepSuggestedAt"],"additionalProperties":false},"CheckRun":{"type":"object","properties":{"id":{"type":"string"},"resourceKind":{"type":"string","enum":["infra_node","cloud_account","integration"]},"resourceId":{"type":"string"},"provider":{"type":"string","nullable":true},"account":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"nodeType":{"type":"string","nullable":true},"status":{"type":"string","enum":["healthy","breached","stable"]},"skipReason":{"type":"string","nullable":true,"enum":["no_signal","rate_limited","degraded","warmup","cold_start","clean_cache","suppressed_volume","suppressed_sustained","gate_failed",null]},"agentRanAt":{"type":"string","nullable":true,"format":"date-time"},"defectReviewRanAt":{"type":"string","nullable":true,"format":"date-time"},"conclusion":{"type":"string","nullable":true},"cause":{"type":"object","nullable":true,"properties":{"metrics":{"type":"array","items":{"type":"string"}},"logTemplates":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["ERROR","WARN"]},"template":{"type":"string"},"sample":{"type":"string","nullable":true},"count":{"type":"number","nullable":true}},"required":["severity","template"],"additionalProperties":false}},"traceIds":{"type":"array","items":{"type":"string"}}},"required":["metrics","logTemplates","traceIds"],"additionalProperties":false,"description":"The specific signals that caused a breached verdict: metric calculation names, exact log templates, and trace ids. Null for healthy runs and runs recorded before causes were captured."},"contributingCheckIds":{"type":"array","items":{"type":"string"}},"checkCount":{"type":"integer"},"signalCount":{"type":"integer"},"issueId":{"type":"string","nullable":true},"runCount":{"type":"integer","nullable":true},"metrics":{"type":"array","items":{"$ref":"#/components/schemas/CheckRunMetricSummary"}},"executedAt":{"type":"string","format":"date-time"},"metricsComputedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","resourceKind","resourceId","provider","account","region","nodeType","status","skipReason","agentRanAt","conclusion","contributingCheckIds","checkCount","signalCount","issueId","runCount","metrics","executedAt","metricsComputedAt"],"additionalProperties":false},"CheckRunMetricSummary":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"type":"string","nullable":true},"provenance":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["user_dashboard","user_saved_query","user_alert_rule"]},"provider":{"type":"string"},"objectId":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"rule":{"type":"string"}},"required":["kind","provider","objectId","name"],"additionalProperties":false}},"calculation":{"type":"string"},"value":{"type":"number","nullable":true},"current":{"type":"number","nullable":true},"min":{"type":"number","nullable":true},"avg":{"type":"number","nullable":true},"max":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true},"chartGroup":{"type":"string","nullable":true},"baselineMean":{"type":"number","nullable":true},"baselineStd":{"type":"number","nullable":true},"deviationSigma":{"type":"number","nullable":true},"worseDirection":{"type":"string","nullable":true,"enum":["up","down","both",null]},"breachFromIndex":{"type":"integer","nullable":true}},"required":["id","label","calculation","current","min","avg","max"],"additionalProperties":false},"CheckRunWithSignals":{"allOf":[{"$ref":"#/components/schemas/CheckRunWithMetrics"},{"type":"object","properties":{"logs":{"$ref":"#/components/schemas/IssueLogsBlob"},"traces":{"$ref":"#/components/schemas/IssueTracesBlob"}},"required":["logs","traces"],"additionalProperties":false}]},"CheckRunWithMetrics":{"allOf":[{"$ref":"#/components/schemas/CheckRun"},{"type":"object","properties":{"metrics":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/CheckRunMetricSummary"},{"type":"object","properties":{"query":{"type":"string"},"series":{"type":"array","items":{"type":"object","properties":{"time":{"type":"string"},"value":{"type":"number","nullable":true}},"required":["time","value"],"additionalProperties":false}}},"additionalProperties":false}]}}},"additionalProperties":false}]},"CheckRunTriggerResult":{"type":"object","properties":{"triggered":{"type":"boolean"}},"required":["triggered"],"additionalProperties":false},"AdminCheckRunWithSignals":{"allOf":[{"$ref":"#/components/schemas/CheckRunWithMetrics"},{"type":"object","properties":{"logs":{"$ref":"#/components/schemas/IssueLogsBlob"},"traces":{"$ref":"#/components/schemas/IssueTracesBlob"}},"required":["logs","traces"],"additionalProperties":false}]},"Lineage":{"type":"object","properties":{"entity":{"type":"string","enum":["check_run","issue","thread","autofix","pull_request","escalation","pr_change_record"]},"check":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"kind":{"type":"string","nullable":true,"description":"Subtype when the slot is polymorphic: the thread's type (fix_run, exploration, chat, pr_review, ...) on originThread or investigationThread, the provider source key (github, datadog, sentry, ...) on alert; null elsewhere"},"title":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true,"description":"Secondary context line for the node: the driver-metric readout on checks, the triage summary on issues, the provider message on alerts, free text elsewhere"},"timestamp":{"type":"string","nullable":true,"description":"Natural event time for the node as an ISO timestamp: run executed, issue detected, thread/autofix created, escalation last fired"},"consoleUrl":{"type":"string","nullable":true}},"required":["id","kind","title","status","detail","timestamp","consoleUrl"],"additionalProperties":false},"checkRun":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"kind":{"type":"string","nullable":true,"description":"Subtype when the slot is polymorphic: the thread's type (fix_run, exploration, chat, pr_review, ...) on originThread or investigationThread, the provider source key (github, datadog, sentry, ...) on alert; null elsewhere"},"title":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true,"description":"Secondary context line for the node: the driver-metric readout on checks, the triage summary on issues, the provider message on alerts, free text elsewhere"},"timestamp":{"type":"string","nullable":true,"description":"Natural event time for the node as an ISO timestamp: run executed, issue detected, thread/autofix created, escalation last fired"},"consoleUrl":{"type":"string","nullable":true}},"required":["id","kind","title","status","detail","timestamp","consoleUrl"],"additionalProperties":false},"checkResource":{"type":"object","nullable":true,"properties":{"kind":{"type":"string","description":"issue.resourceKind: infra_node, cloud_account or integration"},"id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string","nullable":true},"nodeType":{"type":"string","nullable":true,"description":"The infra node's type (cf.workers.script, aws.lambda.function); absent for accounts and integrations"}},"required":["kind","id","name","provider"],"additionalProperties":false,"description":"The resource the chain's check evaluated (display name plus provider key for the logo), resolved read-side from the issue or run row; null when the chain has no check"},"alert":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"kind":{"type":"string","nullable":true,"description":"Subtype when the slot is polymorphic: the thread's type (fix_run, exploration, chat, pr_review, ...) on originThread or investigationThread, the provider source key (github, datadog, sentry, ...) on alert; null elsewhere"},"title":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true,"description":"Secondary context line for the node: the driver-metric readout on checks, the triage summary on issues, the provider message on alerts, free text elsewhere"},"timestamp":{"type":"string","nullable":true,"description":"Natural event time for the node as an ISO timestamp: run executed, issue detected, thread/autofix created, escalation last fired"},"consoleUrl":{"type":"string","nullable":true}},"required":["id","kind","title","status","detail","timestamp","consoleUrl"],"additionalProperties":false,"description":"The provider alert that opened an alert-origin issue: kind is the provider source key, consoleUrl the provider's page for the alert when it carried one; null for every other origin"},"changeRecord":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"kind":{"type":"string","nullable":true,"description":"Subtype when the slot is polymorphic: the thread's type (fix_run, exploration, chat, pr_review, ...) on originThread or investigationThread, the provider source key (github, datadog, sentry, ...) on alert; null elsewhere"},"title":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true,"description":"Secondary context line for the node: the driver-metric readout on checks, the triage summary on issues, the provider message on alerts, free text elsewhere"},"timestamp":{"type":"string","nullable":true,"description":"Natural event time for the node as an ISO timestamp: run executed, issue detected, thread/autofix created, escalation last fired"},"consoleUrl":{"type":"string","nullable":true}},"required":["id","kind","title","status","detail","timestamp","consoleUrl"],"additionalProperties":false},"analyzedPullRequest":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"kind":{"type":"string","nullable":true,"description":"Subtype when the slot is polymorphic: the thread's type (fix_run, exploration, chat, pr_review, ...) on originThread or investigationThread, the provider source key (github, datadog, sentry, ...) on alert; null elsewhere"},"title":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true,"description":"Secondary context line for the node: the driver-metric readout on checks, the triage summary on issues, the provider message on alerts, free text elsewhere"},"timestamp":{"type":"string","nullable":true,"description":"Natural event time for the node as an ISO timestamp: run executed, issue detected, thread/autofix created, escalation last fired"},"consoleUrl":{"type":"string","nullable":true}},"required":["id","kind","title","status","detail","timestamp","consoleUrl"],"additionalProperties":false,"description":"The pull request a pr_change_record analyzed (id is the PR number, consoleUrl the provider page); null for every other anchor"},"repository":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"kind":{"type":"string","nullable":true,"description":"Subtype when the slot is polymorphic: the thread's type (fix_run, exploration, chat, pr_review, ...) on originThread or investigationThread, the provider source key (github, datadog, sentry, ...) on alert; null elsewhere"},"title":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true,"description":"Secondary context line for the node: the driver-metric readout on checks, the triage summary on issues, the provider message on alerts, free text elsewhere"},"timestamp":{"type":"string","nullable":true,"description":"Natural event time for the node as an ISO timestamp: run executed, issue detected, thread/autofix created, escalation last fired"},"consoleUrl":{"type":"string","nullable":true}},"required":["id","kind","title","status","detail","timestamp","consoleUrl"],"additionalProperties":false,"description":"The repository whose connection kicked off a repo_connect or repo_onboarding autofix; null for every other origin"},"issue":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"kind":{"type":"string","nullable":true,"description":"Subtype when the slot is polymorphic: the thread's type (fix_run, exploration, chat, pr_review, ...) on originThread or investigationThread, the provider source key (github, datadog, sentry, ...) on alert; null elsewhere"},"title":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true,"description":"Secondary context line for the node: the driver-metric readout on checks, the triage summary on issues, the provider message on alerts, free text elsewhere"},"timestamp":{"type":"string","nullable":true,"description":"Natural event time for the node as an ISO timestamp: run executed, issue detected, thread/autofix created, escalation last fired"},"consoleUrl":{"type":"string","nullable":true}},"required":["id","kind","title","status","detail","timestamp","consoleUrl"],"additionalProperties":false},"originThread":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"kind":{"type":"string","nullable":true,"description":"Subtype when the slot is polymorphic: the thread's type (fix_run, exploration, chat, pr_review, ...) on originThread or investigationThread, the provider source key (github, datadog, sentry, ...) on alert; null elsewhere"},"title":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true,"description":"Secondary context line for the node: the driver-metric readout on checks, the triage summary on issues, the provider message on alerts, free text elsewhere"},"timestamp":{"type":"string","nullable":true,"description":"Natural event time for the node as an ISO timestamp: run executed, issue detected, thread/autofix created, escalation last fired"},"consoleUrl":{"type":"string","nullable":true}},"required":["id","kind","title","status","detail","timestamp","consoleUrl"],"additionalProperties":false,"description":"The exploration thread that opened an exploration-origin issue; null when the origin is not a visible exploration thread"},"runIssues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","nullable":true,"description":"Subtype when the slot is polymorphic: the thread's type (fix_run, exploration, chat, pr_review, ...) on originThread or investigationThread, the provider source key (github, datadog, sentry, ...) on alert; null elsewhere"},"title":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true,"description":"Secondary context line for the node: the driver-metric readout on checks, the triage summary on issues, the provider message on alerts, free text elsewhere"},"timestamp":{"type":"string","nullable":true,"description":"Natural event time for the node as an ISO timestamp: run executed, issue detected, thread/autofix created, escalation last fired"},"consoleUrl":{"type":"string","nullable":true}},"required":["id","kind","title","status","detail","timestamp","consoleUrl"],"additionalProperties":false},"description":"Other issues the chain's check run opened in the same evaluation cycle (one run's content review can open several); each connects to the run through an edge"},"duplicates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","nullable":true,"description":"Subtype when the slot is polymorphic: the thread's type (fix_run, exploration, chat, pr_review, ...) on originThread or investigationThread, the provider source key (github, datadog, sentry, ...) on alert; null elsewhere"},"title":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true,"description":"Secondary context line for the node: the driver-metric readout on checks, the triage summary on issues, the provider message on alerts, free text elsewhere"},"timestamp":{"type":"string","nullable":true,"description":"Natural event time for the node as an ISO timestamp: run executed, issue detected, thread/autofix created, escalation last fired"},"consoleUrl":{"type":"string","nullable":true}},"required":["id","kind","title","status","detail","timestamp","consoleUrl"],"additionalProperties":false},"description":"The issue's duplicate group: issues whose investigation is delegated to the chain's issue. When the requested issue is itself a duplicate, the chain is built around its root and the group includes the requested issue."},"investigationThread":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"kind":{"type":"string","nullable":true,"description":"Subtype when the slot is polymorphic: the thread's type (fix_run, exploration, chat, pr_review, ...) on originThread or investigationThread, the provider source key (github, datadog, sentry, ...) on alert; null elsewhere"},"title":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true,"description":"Secondary context line for the node: the driver-metric readout on checks, the triage summary on issues, the provider message on alerts, free text elsewhere"},"timestamp":{"type":"string","nullable":true,"description":"Natural event time for the node as an ISO timestamp: run executed, issue detected, thread/autofix created, escalation last fired"},"consoleUrl":{"type":"string","nullable":true}},"required":["id","kind","title","status","detail","timestamp","consoleUrl"],"additionalProperties":false,"description":"The issue's fix run thread: it decided the verdict and carries the investigation and every later ask"},"duplicateTriageThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","nullable":true,"description":"Subtype when the slot is polymorphic: the thread's type (fix_run, exploration, chat, pr_review, ...) on originThread or investigationThread, the provider source key (github, datadog, sentry, ...) on alert; null elsewhere"},"title":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true,"description":"Secondary context line for the node: the driver-metric readout on checks, the triage summary on issues, the provider message on alerts, free text elsewhere"},"timestamp":{"type":"string","nullable":true,"description":"Natural event time for the node as an ISO timestamp: run executed, issue detected, thread/autofix created, escalation last fired"},"consoleUrl":{"type":"string","nullable":true}},"required":["id","kind","title","status","detail","timestamp","consoleUrl"],"additionalProperties":false},"description":"Threads that decided the verdicts of the chain's duplicate issues; each connects to its duplicate issue through an edge. Surfaces the triage work on a family whose root was triaged by another path."},"autofixes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","nullable":true,"description":"Subtype when the slot is polymorphic: the thread's type (fix_run, exploration, chat, pr_review, ...) on originThread or investigationThread, the provider source key (github, datadog, sentry, ...) on alert; null elsewhere"},"title":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true,"description":"Secondary context line for the node: the driver-metric readout on checks, the triage summary on issues, the provider message on alerts, free text elsewhere"},"timestamp":{"type":"string","nullable":true,"description":"Natural event time for the node as an ISO timestamp: run executed, issue detected, thread/autofix created, escalation last fired"},"consoleUrl":{"type":"string","nullable":true}},"required":["id","kind","title","status","detail","timestamp","consoleUrl"],"additionalProperties":false}},"pullRequests":{"type":"array","items":{"$ref":"#/components/schemas/LineagePullRequest"}},"escalations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","nullable":true,"description":"Subtype when the slot is polymorphic: the thread's type (fix_run, exploration, chat, pr_review, ...) on originThread or investigationThread, the provider source key (github, datadog, sentry, ...) on alert; null elsewhere"},"title":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true,"description":"Secondary context line for the node: the driver-metric readout on checks, the triage summary on issues, the provider message on alerts, free text elsewhere"},"timestamp":{"type":"string","nullable":true,"description":"Natural event time for the node as an ISO timestamp: run executed, issue detected, thread/autofix created, escalation last fired"},"consoleUrl":{"type":"string","nullable":true}},"required":["id","kind","title","status","detail","timestamp","consoleUrl"],"additionalProperties":false}},"escalationOrigins":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","nullable":true,"description":"Subtype when the slot is polymorphic: the thread's type (fix_run, exploration, chat, pr_review, ...) on originThread or investigationThread, the provider source key (github, datadog, sentry, ...) on alert; null elsewhere"},"title":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true,"description":"Secondary context line for the node: the driver-metric readout on checks, the triage summary on issues, the provider message on alerts, free text elsewhere"},"timestamp":{"type":"string","nullable":true,"description":"Natural event time for the node as an ISO timestamp: run executed, issue detected, thread/autofix created, escalation last fired"},"consoleUrl":{"type":"string","nullable":true}},"required":["id","kind","title","status","detail","timestamp","consoleUrl"],"additionalProperties":false},"description":"Issues outside the chain whose occurrences folded into one of the chain's escalations (escalations dedupe by shared remediation, so one can span several issues); each connects to its escalation through an edge"},"decisions":{"type":"array","items":{"$ref":"#/components/schemas/LineageDecision"},"description":"The decisions recorded on the chain's issue (its dispositions), newest first; each connects to the issue through an edge"},"edges":{"type":"array","items":{"$ref":"#/components/schemas/LineageEdge"}}},"required":["entity","check","checkRun","checkResource","alert","changeRecord","analyzedPullRequest","repository","issue","originThread","runIssues","duplicates","investigationThread","duplicateTriageThreads","autofixes","pullRequests","escalations","escalationOrigins","decisions","edges"],"additionalProperties":false},"LineagePullRequest":{"type":"object","properties":{"autofixId":{"type":"string"},"number":{"type":"integer"},"repo":{"type":"string","description":"The repository the pull request belongs to, as \"owner/repo\""},"url":{"type":"string","nullable":true},"state":{"type":"string","enum":["open","merged","closed","covering"]},"timestamp":{"type":"string","nullable":true,"description":"When the PR was merged (merged) or submitted (open/closed) as an ISO timestamp"}},"required":["autofixId","number","repo","url","state","timestamp"],"additionalProperties":false},"LineageDecision":{"type":"object","properties":{"id":{"type":"string"},"action":{"type":"string"},"causeClass":{"type":"string","nullable":true},"causeConfidence":{"type":"string","nullable":true},"actorType":{"type":"string"},"explanation":{"type":"string","nullable":true},"threadId":{"type":"string","nullable":true},"automationId":{"type":"string","nullable":true},"escalationId":{"type":"string","nullable":true},"pageId":{"type":"string","nullable":true},"outcome":{"type":"string","nullable":true},"outcomeAt":{"type":"string","nullable":true},"decidedAt":{"type":"string"}},"required":["id","action","causeClass","causeConfidence","actorType","explanation","threadId","automationId","escalationId","pageId","outcome","outcomeAt","decidedAt"],"additionalProperties":false},"LineageEdge":{"type":"object","properties":{"from":{"type":"string","description":"Source node as \"<kind>:<id>\""},"to":{"type":"string","description":"Target node as \"<kind>:<id>\""},"via":{"type":"string","enum":["direct","reverse","two_hop"],"description":"How the hop was resolved: a field on the source row (direct), a query against the target's link column (reverse), or through an intermediate entity (two_hop)"},"field":{"type":"string","nullable":true,"description":"The link field the hop was resolved from"}},"required":["from","to","via","field"],"additionalProperties":false},"Escalation":{"type":"object","properties":{"id":{"type":"string","pattern":"^ask_[0-9a-z]{24}$","description":"ID of the escalation","example":"ask_38mg3o4ibc92h8t2efn8csrh"},"workspaceId":{"type":"string","pattern":"^ws_[0-9a-z]{32}$","description":"ID of the workspace","example":"ws_rii32455qptezc7467usm3f3hq31qkwp"},"source":{"type":"string","enum":["investigation","triage","automation","credentials","connect","autofix"],"description":"The pipeline that raised the escalation"},"kind":{"type":"string","description":"Source-scoped classification of the ask (e.g. 'needs_human_action')"},"dedupeKey":{"type":"string","nullable":true,"description":"Structured remediation key used for exact-match folding"},"headline":{"type":"string"},"detail":{"type":"string","nullable":true},"action":{"type":"string","nullable":true,"description":"The one thing a person must do, in five words or fewer"},"brief":{"type":"object","nullable":true,"properties":{"cause":{"type":"string","description":"What is wrong underneath, in 20 words or fewer"},"context":{"type":"string","description":"What limits the fix or what was already checked, in 20 words or fewer"},"impact":{"type":"string","description":"Who or what is affected and how badly, in 20 words or fewer"},"action":{"type":"string","description":"What the person does, in 20 words or fewer; a decision names each option"}},"required":["cause","context","impact","action"],"additionalProperties":false,"description":"The ask in short sections for people to read; detail keeps the full text"},"refs":{"type":"array","items":{"type":"object","properties":{"issueId":{"type":"string","example":"iss_38mg3o4ibc92h8t2efn8csrh"},"threadId":{"type":"string","example":"thrd_38mg3o4ibc92h8t2efn8csrh"},"integrationId":{"type":"string","example":"int_34gky74ibc92h8t2efn8csrh"}},"additionalProperties":false},"description":"Every occurrence folded into this escalation"},"nodeIds":{"type":"array","items":{"type":"string"},"description":"The resources the escalation concerns, as composite node ids: each occurrence's issue adds its own, and people add or remove them"},"severity":{"type":"string","nullable":true,"enum":["critical","high","medium","low",null],"description":"How urgently admins must hear about the escalation, graded when an investigation raises it; null when it was not graded"},"count":{"type":"integer","description":"Number of occurrences folded into this escalation"},"firstAt":{"type":"string","nullable":true,"format":"date-time"},"lastAt":{"type":"string","nullable":true,"format":"date-time"},"clearedAt":{"type":"string","nullable":true,"format":"date-time"},"clearedBy":{"type":"string","nullable":true},"_html_url":{"type":"string","description":"The escalation's full record page in the console, including requests without a thread."},"_links":{"type":"object","additionalProperties":{"type":"string"},"description":"Related API endpoints for this resource, discovered at runtime so consumers (including agents) never have to guess a path. Each key is a named relation; each value is a fully-qualified HTTPS URL to a JSON API endpoint on this workspace's API origin (these are API routes that return JSON — the human-viewable browser page is in the sibling `_html_url` field). `self` (when present) is the canonical GET for the current resource. Plural relations point to list endpoints that return a paginated `{ items, count }` payload when GET'ed. Singular relations point to a single-resource endpoint. Follow any link with the same authentication (Authorization bearer token or x-api-key header) you used for this request."},"_object":{"type":"string","enum":["escalation"]}},"required":["id","workspaceId","source","kind","dedupeKey","headline","detail","action","brief","refs","nodeIds","severity","count","firstAt","lastAt","clearedAt","clearedBy","_object"],"additionalProperties":false},"Signal":{"type":"object","properties":{"id":{"type":"string"},"connection":{"type":"object","properties":{"kind":{"type":"string","enum":["cloud_account","integration"]},"id":{"type":"string"}},"required":["kind","id"]},"operation":{"type":"string","description":"What the application does that the signal watches"},"role":{"type":"string","enum":["success","failure","volume","latency"],"description":"What the signal measures for its operation"},"label":{"type":"string"},"description":{"type":"string"},"rationale":{"type":"string"},"worseDirection":{"type":"string","enum":["up","down","both"]},"unit":{"type":"string","nullable":true},"provider":{"type":"string","description":"The provider the query runs against"},"language":{"type":"string","description":"The query language `text` is written in"},"text":{"type":"string","description":"The query as the provider receives it"},"origin":{"type":"string","enum":["discovered","incident"],"description":"incident: the signal watches the confirmed cause of an earlier issue"},"incidentId":{"type":"string","nullable":true},"createdAtMs":{"type":"number"},"lastConfirmedAtMs":{"type":"number"}},"required":["id","connection","operation","role","label","description","rationale","worseDirection","unit","provider","language","text","origin","incidentId","createdAtMs","lastConfirmedAtMs"]},"SignalDiscoveryStatus":{"type":"object","properties":{"lastDispatchedAtMs":{"type":"number","nullable":true},"lastCompletedAtMs":{"type":"number","nullable":true},"runningSinceMs":{"type":"number","nullable":true,"description":"When the discovery run in progress started, or null when no run is in progress"}},"required":["lastDispatchedAtMs","lastCompletedAtMs","runningSinceMs"]},"SignalDiscoveryStart":{"type":"object","properties":{"requested":{"type":"boolean","description":"Whether a discovery run was started"},"reason":{"type":"string","nullable":true,"description":"Why no run was started, when requested is false"}},"required":["requested","reason"]},"Subscription":{"type":"object","properties":{"id":{"type":"string","pattern":"^sub_[0-9a-z]{32}$","description":"ID of the subscription","example":"sub_d18564pxsvozx979j3532mii2kk7pmw6"},"workspaceId":{"type":"string"},"stripeCustomerId":{"type":"string","nullable":true},"stripeSubscriptionId":{"type":"string","nullable":true},"stripeBaseItemId":{"type":"string","nullable":true},"stripeOverageItemId":{"type":"string","nullable":true},"plan":{"type":"string","enum":["free","starter","team","business","scale","premium","ultimate","enterprise"]},"status":{"type":"string","enum":["active","trialing","past_due","canceled","unpaid","none"]},"billingCycle":{"type":"string","enum":["monthly","annual"]},"overagePolicy":{"type":"string","enum":["block","meter"]},"overageMonthlyCapCents":{"type":"number"},"currentPeriodStart":{"type":"string","nullable":true,"format":"date-time"},"currentPeriodEnd":{"type":"string","nullable":true,"format":"date-time"},"cancelAtPeriodEnd":{"type":"string","nullable":true,"format":"date-time"},"trialEndsAt":{"type":"string","nullable":true,"format":"date-time"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","workspaceId","stripeCustomerId","stripeSubscriptionId","stripeBaseItemId","stripeOverageItemId","plan","status","billingCycle","overagePolicy","overageMonthlyCapCents","currentPeriodStart","currentPeriodEnd","cancelAtPeriodEnd","trialEndsAt","created","updated"],"additionalProperties":false},"PlanCatalog":{"type":"object","properties":{"plans":{"type":"array","items":{"$ref":"#/components/schemas/PlanCatalogPlan"}},"overage":{"type":"object","properties":{"unitCredits":{"type":"number"},"unitPriceCents":{"type":"number"},"defaultMonthlyCapCents":{"type":"number"}},"required":["unitCredits","unitPriceCents","defaultMonthlyCapCents"],"additionalProperties":false},"autofixBundles":{"type":"array","items":{"$ref":"#/components/schemas/AutofixBundle"}},"dimensions":{"type":"array","items":{"$ref":"#/components/schemas/PlanCatalogDimension"}},"unlimited":{"type":"number","enum":[-1]}},"required":["plans","overage","autofixBundles","dimensions","unlimited"],"additionalProperties":false},"PlanCatalogPlan":{"type":"object","properties":{"id":{"type":"string","enum":["free","starter","team","business","scale","premium","ultimate","enterprise"]},"name":{"type":"string"},"tagline":{"type":"string"},"highlight":{"type":"boolean"},"selectable":{"type":"boolean"},"monthlyPriceCents":{"type":"number"},"annualPriceCents":{"type":"number"},"features":{"type":"array","items":{"type":"string"}},"limits":{"$ref":"#/components/schemas/PlanCatalogLimits"},"allowsOverage":{"type":"boolean"},"capabilities":{"$ref":"#/components/schemas/PlanCatalogCapabilities"}},"required":["id","name","tagline","highlight","selectable","monthlyPriceCents","annualPriceCents","features","limits","allowsOverage","capabilities"],"additionalProperties":false},"PlanCatalogLimits":{"type":"object","properties":{"creditsMultiplier":{"type":"number"},"maxCloudAccounts":{"type":"number"},"maxWorkspaceMembers":{"type":"number"},"includedAutofixesPerMonth":{"type":"number"},"maxPrAnalysesPerMonth":{"type":"number"}},"required":["creditsMultiplier","maxCloudAccounts","maxWorkspaceMembers","includedAutofixesPerMonth","maxPrAnalysesPerMonth"],"additionalProperties":false},"AutofixBundle":{"type":"object","properties":{"size":{"type":"number"},"amountCents":{"type":"number"},"currency":{"type":"string"}},"required":["size","amountCents","currency"],"additionalProperties":false},"PlanCatalogDimension":{"type":"object","properties":{"key":{"type":"string","enum":["creditsMultiplier","maxCloudAccounts","maxWorkspaceMembers","maxPrAnalysesPerMonth","includedAutofixesPerMonth","overage","customLlmConfig","domainJoin","customGateway","fleet"]},"kind":{"type":"string","enum":["limit","capability"]},"label":{"type":"string"},"description":{"type":"string"},"period":{"type":"string","nullable":true,"enum":["month",null]}},"required":["key","kind","label","description","period"],"additionalProperties":false},"AgentToolSearchResult":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/AgentToolCatalogEntry"}},"count":{"type":"number","description":"Number of tools returned, capped by limit"},"total":{"type":"number","description":"Total tools available to this credential in the workspace"},"enums":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["results","count","total"]},"AgentToolCatalogEntry":{"type":"object","properties":{"name":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"requiredIntegrations":{"type":"array","items":{"type":"string"}},"requiredProviders":{"type":"array","items":{"type":"string"}},"schema":{"type":"object","additionalProperties":{"nullable":true}}},"required":["name","summary","description"]},"AgentToolRunResult":{"type":"object","properties":{"success":{"type":"boolean"},"durationMs":{"type":"number"},"result":{"nullable":true},"error":{"nullable":true}},"required":["success","durationMs"]},"PresetDrilldown":{"type":"object","properties":{"where":{"type":"string","description":"The rows the chart aggregates: the preset's WHERE without its range bound."},"bounds":{"type":"string","description":"A predicate template that applies the selected range to reconciled entities instead of individual event timestamps."},"seriesBounds":{"type":"object","additionalProperties":{"type":"string"},"description":"Reconciled-entity bounds keyed by series; unpinned clicks use the union of these bounds and the default bounds."},"x":{"type":"string","description":"Categorical charts: the expression the x labels come from, or a predicate template carrying {value}."},"series":{"type":"object","additionalProperties":{"type":"string"},"description":"The rows each y column counts, keyed by column."},"seriesExpr":{"type":"string","description":"The expression a pivoted or CASE-cut chart's series names come from, or a predicate template carrying {value}."},"links":{"type":"object","additionalProperties":{"type":"string"},"description":"Sankey: the rows on each link, keyed '<source> -> <target>'; a fragment may carry {bounds}."}},"required":["where"],"description":"How a click on one mark reaches the rows behind it; absent on a chart that is not clickable."},"EvalCase":{"type":"object","properties":{"id":{"type":"string","pattern":"^evcase_[0-9a-z]{24}$","description":"ID of the eval_case","example":"evcase_38mg3o4ibc92h8t2efn8csrh"},"kind":{"type":"string","enum":["autofix","pr_review"]},"workspaceId":{"type":"string"},"autofixId":{"type":"string","nullable":true},"owner":{"type":"string"},"repo":{"type":"string"},"prNumber":{"type":"integer"},"prUrl":{"type":"string"},"headSha":{"type":"string","nullable":true},"baseSha":{"type":"string","nullable":true},"baseBranch":{"type":"string","nullable":true},"executor":{"type":"string","nullable":true,"enum":["native","devin","cursor","factory","conductor","capy","amp",null]},"origin":{"type":"string","nullable":true,"enum":["automation","chat","system","fix_run",null]},"trigger":{"type":"string","nullable":true,"enum":["repo_connect","pr_review","ci_failure","investigation_improvement","repo_onboarding","codify_expected_behavior","executor_fallback","issue_detected","chat","pr_change_fix","automation","manual","monitoring","threshold","defect","change_record","alert","exploration","scan","local_agent","trend",null]},"severity":{"type":"string","nullable":true,"enum":["critical","high","medium","low","info",null]},"threadId":{"type":"string","nullable":true},"status":{"type":"string","nullable":true,"enum":["started","branch_pushed","pr_opened","merged","closed","failed","no_fix_needed","already_in_flight","severity_not_selected","quota_exhausted","disabled","plan_rejected","unreachable","expired",null]},"submittedAt":{"type":"string","nullable":true,"format":"date-time"},"mergedAt":{"type":"string","nullable":true,"format":"date-time"},"mergedBy":{"type":"string","nullable":true},"closedAt":{"type":"string","nullable":true,"format":"date-time"},"closedBy":{"type":"string","nullable":true},"closeReason":{"type":"string","nullable":true,"enum":["incorrect_fix","symptom_fix","superseded_by_human","not_a_real_issue","stale","intentional_behavior","unexplained","withdrawn_by_request","superseded_by_better_fix","evidence_unavailable","reconciled_from_github",null]},"closeReasonDetail":{"type":"string","nullable":true},"reviewStates":{"type":"array","nullable":true,"items":{"type":"object","properties":{"author":{"type":"string"},"state":{"type":"string"}},"required":["author","state"],"additionalProperties":false}},"title":{"type":"string"},"diffClass":{"type":"string","nullable":true,"enum":["whitespace","message_only","error_flow_only","behavioural",null]},"changedFiles":{"type":"array","nullable":true,"items":{"type":"string"}},"causalChain":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"detectionOutcome":{"type":"string","nullable":true},"briefR2Key":{"type":"string","nullable":true},"patchR2Key":{"type":"string","nullable":true},"bodyR2Key":{"type":"string","nullable":true},"descriptionR2Key":{"type":"string","nullable":true},"transcriptR2Key":{"type":"string","nullable":true},"commentR2Key":{"type":"string","nullable":true},"logsR2Key":{"type":"string","nullable":true},"capturedAt":{"type":"string","nullable":true,"format":"date-time"},"repositoryId":{"type":"string","nullable":true},"prChangeRecordId":{"type":"string","nullable":true},"commentVerdict":{"type":"string","nullable":true,"enum":["fail","pass",null]},"commentImpactLevel":{"type":"string","nullable":true,"enum":["none","low","moderate","high",null]},"commentTrigger":{"type":"string","nullable":true,"enum":["webhook","comment",null]},"commentTldr":{"type":"string","nullable":true},"commentedAt":{"type":"string","nullable":true,"format":"date-time"},"githubCommentId":{"type":"integer","nullable":true},"affectedResourceIds":{"type":"array","nullable":true,"items":{"type":"string"}},"trajectories":{"type":"array","nullable":true,"items":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["confirmed","plausible","refuted"]},"severity":{"type":"string","enum":["low","moderate","high"]},"likelihood":{"type":"string","enum":["likely","possible","unlikely"]},"trigger":{"type":"string"},"observedRate":{"type":"string"},"trafficEvidence":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"claim":{"type":"string"},"evidence":{"type":"string"}},"required":["claim","evidence"]}},"refutation":{"type":"string"},"affectedResourceIds":{"type":"array","items":{"type":"string"}},"blastRadius":{"type":"object","description":"The blast radius engine's summary for this trajectory, in its own versioned shape."}},"required":["slug","title","status","severity","trigger","steps"]}},"reactions":{"type":"object","nullable":true,"properties":{"totalCount":{"type":"integer"},"plusOne":{"type":"integer"},"minusOne":{"type":"integer"},"laugh":{"type":"integer"},"confused":{"type":"integer"},"heart":{"type":"integer"},"hooray":{"type":"integer"},"eyes":{"type":"integer"},"rocket":{"type":"integer"}},"required":["totalCount","plusOne","minusOne","laugh","confused","heart","hooray","eyes","rocket"],"additionalProperties":false},"checkHits":{"type":"array","nullable":true,"items":{"type":"string"}},"commentChartCount":{"type":"integer","nullable":true},"commentLogCount":{"type":"integer","nullable":true},"reviewVerdict":{"type":"string","nullable":true,"enum":["good","bad",null]},"reviewOutcomeClass":{"type":"string","nullable":true,"enum":["root_cause_fix","symptom_fix","message_only","escalate","dismiss","true_fail","false_alarm","scope_violation","thin_evidence","true_pass","missed_impact",null]},"reviewNotes":{"type":"string","nullable":true},"reviewTags":{"type":"array","nullable":true,"items":{"type":"string"}},"reviewedBy":{"type":"string","nullable":true},"reviewedAt":{"type":"string","nullable":true,"format":"date-time"},"judgeVerdict":{"type":"string","nullable":true,"enum":["good","bad",null]},"judgeOutcomeClass":{"type":"string","nullable":true,"enum":["root_cause_fix","symptom_fix","message_only","escalate","dismiss","true_fail","false_alarm","scope_violation","thin_evidence","true_pass","missed_impact",null]},"judgeConfidence":{"type":"number","nullable":true},"judgeRubricHash":{"type":"string","nullable":true},"judgedAt":{"type":"string","nullable":true,"format":"date-time"},"created":{"type":"string","nullable":true,"format":"date-time"},"updated":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","kind","workspaceId","autofixId","owner","repo","prNumber","prUrl","headSha","baseSha","baseBranch","executor","origin","trigger","severity","threadId","status","submittedAt","mergedAt","mergedBy","closedAt","closedBy","closeReason","closeReasonDetail","reviewStates","title","diffClass","changedFiles","causalChain","detectionOutcome","briefR2Key","patchR2Key","bodyR2Key","descriptionR2Key","transcriptR2Key","commentR2Key","logsR2Key","capturedAt","repositoryId","prChangeRecordId","commentVerdict","commentImpactLevel","commentTrigger","commentTldr","commentedAt","githubCommentId","affectedResourceIds","trajectories","reactions","checkHits","commentChartCount","commentLogCount","reviewVerdict","reviewOutcomeClass","reviewNotes","reviewTags","reviewedBy","reviewedAt","judgeVerdict","judgeOutcomeClass","judgeConfidence","judgeRubricHash","judgedAt","created","updated"],"additionalProperties":false},"EvalCaseBlob":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["brief","patch","body","description","transcript","comment","logs"]},"key":{"type":"string"},"size":{"type":"number"},"text":{"type":"string"}},"required":["id","kind","key","size","text"]},"EvalCaseReviewInput":{"type":"object","properties":{"verdict":{"type":"string","nullable":true,"enum":["good","bad",null]},"outcomeClass":{"type":"string","nullable":true,"enum":["root_cause_fix","symptom_fix","message_only","escalate","dismiss","true_fail","false_alarm","scope_violation","thin_evidence","true_pass","missed_impact",null]},"notes":{"type":"string","nullable":true,"maxLength":4000},"tags":{"type":"array","nullable":true,"items":{"type":"string","minLength":1,"maxLength":64},"maxItems":20}},"required":["verdict"],"additionalProperties":false},"EvalJudgement":{"type":"object","properties":{"id":{"type":"string","pattern":"^evjudge_[0-9a-z]{24}$","description":"ID of the eval_judgement","example":"evjudge_38mg3o4ibc92h8t2efn8csrh"},"caseId":{"type":"string","pattern":"^evcase_[0-9a-z]{24}$","description":"ID of the eval_case","example":"evcase_38mg3o4ibc92h8t2efn8csrh"},"rubricHash":{"type":"string"},"provider":{"type":"string"},"model":{"type":"string"},"effort":{"type":"string"},"verdict":{"type":"string","enum":["good","bad"]},"outcomeClass":{"type":"string","enum":["root_cause_fix","symptom_fix","message_only","escalate","dismiss","true_fail","false_alarm","scope_violation","thin_evidence","true_pass","missed_impact"]},"confidence":{"type":"number","minimum":0,"maximum":1},"rulesApplied":{"type":"array","items":{"type":"string"}},"evidence":{"type":"array","items":{"type":"string"}},"rationale":{"type":"string"},"reviewVerdictAtJudging":{"type":"string","nullable":true,"enum":["good","bad",null]},"inputTokens":{"type":"integer","nullable":true},"outputTokens":{"type":"integer","nullable":true},"judgedAt":{"type":"string","nullable":true,"format":"date-time"},"created":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","caseId","rubricHash","provider","model","effort","verdict","outcomeClass","confidence","rulesApplied","evidence","rationale","reviewVerdictAtJudging","inputTokens","outputTokens","judgedAt","created"],"additionalProperties":false},"EvalDayOutcomes":{"type":"object","properties":{"label":{"type":"string"},"total":{"type":"number"},"merged":{"type":"number"},"closed":{"type":"number"},"rejected":{"type":"number"},"abandoned":{"type":"number"},"unknown":{"type":"number"},"judged":{"type":"number"},"judgeBad":{"type":"number"}},"required":["label","total","merged","closed","rejected","abandoned","unknown","judged","judgeBad"]},"EvalSpotlightCase":{"type":"object","properties":{"caseId":{"type":"string"},"workspaceId":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"},"prNumber":{"type":"number"},"prUrl":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"verdict":{"type":"string","enum":["good","bad"]},"confidence":{"type":"number"},"rationale":{"type":"string"},"terminalAt":{"type":"string"}},"required":["caseId","workspaceId","owner","repo","prNumber","prUrl","title","status","verdict","confidence","rationale","terminalAt"]},"EvalDashboardStats":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"series":{"type":"array","items":{"$ref":"#/components/schemas/EvalDayOutcomes"}},"closeReasons":{"type":"array","items":{"type":"object","properties":{"closeReason":{"type":"string","nullable":true},"bucket":{"type":"string","enum":["rejected","abandoned","unknown"]},"count":{"type":"number"}},"required":["closeReason","bucket","count"]}},"rules":{"type":"array","items":{"type":"object","properties":{"rule":{"type":"string"},"count":{"type":"number"}},"required":["rule","count"]}},"outcomeClasses":{"type":"array","items":{"type":"object","properties":{"outcomeClass":{"type":"string","enum":["root_cause_fix","symptom_fix","message_only","escalate","dismiss","true_fail","false_alarm","scope_violation","thin_evidence","true_pass","missed_impact"]},"count":{"type":"number"}},"required":["outcomeClass","count"]}},"workspaces":{"type":"array","items":{"type":"object","properties":{"workspaceId":{"type":"string"},"repos":{"type":"number"},"total":{"type":"number"},"merged":{"type":"number"},"rejected":{"type":"number"},"abandoned":{"type":"number"},"judged":{"type":"number"},"good":{"type":"number"},"bad":{"type":"number"}},"required":["workspaceId","repos","total","merged","rejected","abandoned","judged","good","bad"]}},"best":{"type":"array","items":{"$ref":"#/components/schemas/EvalSpotlightCase"}},"worst":{"type":"array","items":{"$ref":"#/components/schemas/EvalSpotlightCase"}},"agreement":{"type":"object","properties":{"labelled":{"type":"number"},"agree":{"type":"number"},"disagree":{"type":"number"},"goodGood":{"type":"number"},"badBad":{"type":"number"},"badGood":{"type":"number"},"goodBad":{"type":"number"},"meanConfidenceGood":{"type":"number","nullable":true},"meanConfidenceBad":{"type":"number","nullable":true}},"required":["labelled","agree","disagree","goodGood","badBad","badGood","goodBad","meanConfidenceGood","meanConfidenceBad"]},"awaitingRejudge":{"type":"number","description":"Cases whose newest verdict came from an earlier rubric and that the rejudge sweep has not yet replaced."}},"required":["from","to","series","closeReasons","rules","outcomeClasses","workspaces","best","worst","agreement","awaitingRejudge"]},"ReviewEvalDayOutcomes":{"type":"object","properties":{"label":{"type":"string"},"total":{"type":"number"},"fail":{"type":"number"},"pass":{"type":"number"},"judged":{"type":"number"},"judgeBad":{"type":"number"},"checkHits":{"type":"number"},"negativeReactions":{"type":"number"}},"required":["label","total","fail","pass","judged","judgeBad","checkHits","negativeReactions"]},"ReviewEvalSpotlightCase":{"type":"object","properties":{"caseId":{"type":"string"},"workspaceId":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"},"prNumber":{"type":"number"},"prUrl":{"type":"string"},"title":{"type":"string"},"commentVerdict":{"type":"string","nullable":true},"verdict":{"type":"string","enum":["good","bad"]},"confidence":{"type":"number"},"rationale":{"type":"string"},"commentedAt":{"type":"string"}},"required":["caseId","workspaceId","owner","repo","prNumber","prUrl","title","commentVerdict","verdict","confidence","rationale","commentedAt"]},"ReviewEvalDashboardStats":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"series":{"type":"array","items":{"$ref":"#/components/schemas/ReviewEvalDayOutcomes"}},"negativeReactions":{"type":"number"},"rules":{"type":"array","items":{"type":"object","properties":{"rule":{"type":"string"},"count":{"type":"number"}},"required":["rule","count"]}},"workspaces":{"type":"array","items":{"type":"object","properties":{"workspaceId":{"type":"string"},"repos":{"type":"number"},"total":{"type":"number"},"fail":{"type":"number"},"pass":{"type":"number"},"judged":{"type":"number"},"good":{"type":"number"},"bad":{"type":"number"},"checkHits":{"type":"number"},"negativeReactions":{"type":"number"}},"required":["workspaceId","repos","total","fail","pass","judged","good","bad","checkHits","negativeReactions"]}},"best":{"type":"array","items":{"$ref":"#/components/schemas/ReviewEvalSpotlightCase"}},"worst":{"type":"array","items":{"$ref":"#/components/schemas/ReviewEvalSpotlightCase"}},"agreement":{"type":"object","properties":{"labelled":{"type":"number"},"agree":{"type":"number"},"disagree":{"type":"number"},"goodGood":{"type":"number"},"badBad":{"type":"number"},"badGood":{"type":"number"},"goodBad":{"type":"number"},"meanConfidenceGood":{"type":"number","nullable":true},"meanConfidenceBad":{"type":"number","nullable":true}},"required":["labelled","agree","disagree","goodGood","badBad","badGood","goodBad","meanConfidenceGood","meanConfidenceBad"]},"awaitingRejudge":{"type":"number","description":"Review rounds whose newest verdict came from an earlier rubric and that the rejudge sweep has not yet replaced."}},"required":["from","to","series","negativeReactions","rules","workspaces","best","worst","agreement","awaitingRejudge"]},"EvalDrilldown":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"count":{"type":"number"},"limit":{"type":"number"},"cases":{"type":"array","items":{"$ref":"#/components/schemas/EvalDrilldownCase"}}},"required":["from","to","count","limit","cases"]},"EvalDrilldownCase":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"},"prNumber":{"type":"number"},"prUrl":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"closeReason":{"type":"string","nullable":true},"bucket":{"type":"string","nullable":true,"enum":["rejected","abandoned","unknown",null]},"judgeVerdict":{"type":"string","nullable":true,"enum":["good","bad",null]},"judgeConfidence":{"type":"number","nullable":true},"terminalAt":{"type":"string"}},"required":["id","workspaceId","owner","repo","prNumber","prUrl","title","status","closeReason","bucket","judgeVerdict","judgeConfidence","terminalAt"]}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"},"BearerAuth":{"type":"http","scheme":"bearer"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"auth_session"}}},"tags":[],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}]}