{"openapi":"3.1.0","info":{"title":"Noumen API","version":"0.1.0","description":"Cryptographic inventory, public advisories and reviewed findings. Every record carries its sources. Severity and confidence are separate fields. Reports never claim a system is safe and always list their limitations. Errors have the shape {\"error\":{\"message\",\"type\"}}."},"servers":[{"url":"/api","description":"Mounted inside the website"},{"url":"/","description":"Standalone server"}],"security":[{"session":[]},{"apiKey":[]},{}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"A workspace API key: `Authorization: Bearer nmn_live_...`. Scopes: read, write."},"session":{"type":"apiKey","in":"cookie","name":"noumen_session","description":"Session cookie set by sign-in. State-changing requests with a session must send an allowed Origin header."},"cronSecret":{"type":"http","scheme":"bearer","description":"CRON_SECRET, for the scheduled job endpoint only."}},"schemas":{"Readiness":{"type":"object","properties":{"ok":{"type":"boolean"},"database":{"type":"string","enum":["reachable","unreachable"]},"migrations":{"type":"object","properties":{"current":{"type":"boolean"},"latest":{"type":["string","null"]},"pending":{"type":"integer"}},"required":["current","latest","pending"]}},"required":["ok","database","migrations"]},"PublicFacts":{"type":"object","properties":{"version":{"type":"integer"},"rateLimits":{"type":"array","items":{"type":"object","properties":{"group":{"type":"string"},"limit":{"type":"integer"},"windowSeconds":{"type":"integer"},"by":{"type":"string","enum":["ip","principal"]}},"required":["group","limit","windowSeconds","by"],"additionalProperties":false}},"errors":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"status":{"type":"integer"}},"required":["type","status"],"additionalProperties":false}},"findings":{"type":"object","properties":{"states":{"type":"array","items":{"type":"object","properties":{"state":{"type":"string"},"description":{"type":"string"},"allowedNext":{"type":"array","items":{"type":"string"}}},"required":["state","description","allowedNext"],"additionalProperties":false}},"minReasonLength":{"type":"integer"},"stateChangeRules":{"type":"array","items":{"type":"string"}},"severities":{"type":"array","items":{"type":"string"}},"confidences":{"type":"array","items":{"type":"string"}},"disclosures":{"type":"array","items":{"type":"string"}},"categories":{"type":"array","items":{"type":"string"}}},"required":["states","minReasonLength","stateChangeRules","severities","confidences","disclosures","categories"],"additionalProperties":false},"webhooks":{"type":"object","properties":{"events":{"type":"array","items":{"type":"string"}},"statuses":{"type":"array","items":{"type":"string"}},"deliveryStatuses":{"type":"array","items":{"type":"string"}},"maxAttempts":{"type":"integer"},"backoffSeconds":{"type":"array","items":{"type":"integer"}},"timeoutSeconds":{"type":"number"},"signatureHeader":{"type":"string"},"signatureToleranceSeconds":{"type":"integer"},"ports":{"type":"array","items":{"type":"integer"}},"responseExcerptChars":{"type":"integer"}},"required":["events","statuses","deliveryStatuses","maxAttempts","backoffSeconds","timeoutSeconds","signatureHeader","signatureToleranceSeconds","ports","responseExcerptChars"],"additionalProperties":false},"scans":{"type":"object","properties":{"uploadMaxFiles":{"type":"integer"},"uploadMaxMegabytes":{"type":"number"},"requestBodyMaxMegabytes":{"type":"number"},"scanRequestBodyMaxMegabytes":{"type":"number"},"repository":{"type":"object","properties":{"hosts":{"type":"array","items":{"type":"string"}},"timeoutSeconds":{"type":"number"},"compressedMaxMegabytes":{"type":"number"},"unpackedMaxMegabytes":{"type":"number"},"fileMaxMegabytes":{"type":"number"},"maxManifests":{"type":"integer"},"maxRedirects":{"type":"integer"},"skippedFolders":{"type":"array","items":{"type":"string"}}},"required":["hosts","timeoutSeconds","compressedMaxMegabytes","unpackedMaxMegabytes","fileMaxMegabytes","maxManifests","maxRedirects","skippedFolders"],"additionalProperties":false},"idPrefix":{"type":"string"},"idRandomChars":{"type":"integer"}},"required":["uploadMaxFiles","uploadMaxMegabytes","requestBodyMaxMegabytes","scanRequestBodyMaxMegabytes","repository","idPrefix","idRandomChars"],"additionalProperties":false},"retention":{"type":"object","properties":{"anonymousScanDays":{"type":"number"},"sessionDays":{"type":"number"},"sessionSlideMinutes":{"type":"number"},"verifyEmailLinkHours":{"type":"number"},"resetPasswordLinkMinutes":{"type":"number"},"emailTokenKeepDaysAfterExpiry":{"type":"number"},"rateLimitWindowKeepDays":{"type":"number"},"applicationMonths":{"type":"integer"},"userAgentChars":{"type":"integer"},"defaultEmbargoDays":{"type":"number"}},"required":["anonymousScanDays","sessionDays","sessionSlideMinutes","verifyEmailLinkHours","resetPasswordLinkMinutes","emailTokenKeepDaysAfterExpiry","rateLimitWindowKeepDays","applicationMonths","userAgentChars","defaultEmbargoDays"],"additionalProperties":false},"accounts":{"type":"object","properties":{"passwordMinLength":{"type":"integer"},"passwordMaxLength":{"type":"integer"},"sessionCookie":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"workspaceRoles":{"type":"array","items":{"type":"string"}},"apiKeyPrefix":{"type":"string"},"apiKeyStoredPrefixChars":{"type":"integer"},"apiKeyScopes":{"type":"array","items":{"type":"string"}}},"required":["passwordMinLength","passwordMaxLength","sessionCookie","roles","workspaceRoles","apiKeyPrefix","apiKeyStoredPrefixChars","apiKeyScopes"],"additionalProperties":false},"monitors":{"type":"object","properties":{"perWorkspace":{"type":"integer"},"rescanAfterHours":{"type":"number"}},"required":["perWorkspace","rescanAfterHours"],"additionalProperties":false},"jobs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"statLabels":{"type":"object","additionalProperties":{"type":"string"}}},"required":["name","description","statLabels"],"additionalProperties":false}},"jobTimeBudgetSecondsDefault":{"type":"number"},"agents":{"type":"object","properties":{"advisoryMonitor":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"},"confidenceRationale":{"type":"string"}},"required":["name","version","confidenceRationale"],"additionalProperties":false},"submissionChecks":{"type":"object","properties":{"tool":{"type":"string"},"duplicateSimilarity":{"type":"number"}},"required":["tool","duplicateSimilarity"],"additionalProperties":false},"triage":{"type":"object","properties":{"model":{"type":"string"},"promptVersion":{"type":"string"}},"required":["model","promptVersion"],"additionalProperties":false}},"required":["advisoryMonitor","submissionChecks","triage"],"additionalProperties":false},"applications":{"type":"object","properties":{"kinds":{"type":"array","items":{"type":"string"}},"statuses":{"type":"array","items":{"type":"string"}}},"required":["kinds","statuses"],"additionalProperties":false}},"required":["version","rateLimits","errors","findings","webhooks","scans","retention","accounts","monitors","jobs","jobTimeBudgetSecondsDefault","agents","applications"],"additionalProperties":false,"description":"The rules and limits this API enforces, read from the same constants the code uses. Also exported from the package as `publicFacts`."},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","example":"Not found."},"type":{"type":"string","enum":["bad_request","validation_error","unauthorized","forbidden","not_found","conflict","gone","payload_too_large","rate_limited","origin_mismatch","not_configured","upstream_error","internal_error"],"example":"not_found"}},"required":["message","type"]}},"required":["error"]},"User":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["member","researcher","reviewer","admin"]},"emailVerified":{"type":"boolean"},"createdAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["id","email","name","role","emailVerified","createdAt"]},"Ok":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]},"Session":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"userAgent":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"lastUsedAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"expiresAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"current":{"type":"boolean"}},"required":["id","userAgent","createdAt","lastUsedAt","expiresAt","current"]},"Account":{"allOf":[{"$ref":"#/components/schemas/User"},{"type":"object","properties":{"attribution":{"type":"string","enum":["name","anonymous"]}},"required":["attribution"]}]},"Workspace":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"personal":{"type":"boolean"},"role":{"type":"string","enum":["owner","member","key"]},"createdAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["id","name","personal","role","createdAt"]},"WorkspaceMember":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","member"]},"joinedAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["userId","name","email","role","joinedAt"]},"WorkspaceInvitation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","member"]},"createdAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["id","email","role","createdAt"]},"ApiKey":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"prefix":{"type":"string","description":"First 12 characters, to recognise the key."},"scopes":{"type":"array","items":{"type":"string","enum":["read","write"]}},"createdAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"lastUsedAt":{"type":["string","null"],"description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"revokedAt":{"type":["string","null"],"description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["id","name","prefix","scopes","createdAt","lastUsedAt","revokedAt"]},"Component":{"type":"object","properties":{"ecosystem":{"type":"string","enum":["npm","crates.io"]},"name":{"type":"string"},"summary":{"type":"string"},"role":{"type":"string","enum":["implementation","binding","protocol","toolkit"]},"algorithms":{"type":"array","items":{"type":"string"}},"repository":{"type":"string"},"deprecated":{"type":"boolean"},"notes":{"type":"string"},"sources":{"type":"array","items":{"$ref":"#/components/schemas/SourceRef"},"minItems":1},"reviewed":{"type":"string","description":"ISO date this entry was last reviewed."}},"required":["ecosystem","name","summary","role","algorithms","sources","reviewed"]},"SourceRef":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string","format":"uri"},"retrieved":{"type":"string","description":"ISO date the source was last read or checked.","example":"2026-12-03"}},"required":["title","url","retrieved"]},"PageInfo":{"type":"object","properties":{"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}},"required":["total","limit","offset"]},"Algorithm":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"family":{"type":"string","enum":["classical-public-key","symmetric","hash","post-quantum","hybrid","other"]},"quantum":{"type":"string","enum":["broken-by-shor","weakened-by-grover","designed-to-resist","hybrid","not-applicable"],"description":"What a large quantum computer would change. Not a risk score."},"summary":{"type":"string"},"hardness":{"type":"string"},"standards":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"$ref":"#/components/schemas/SourceRef"},"minItems":1}},"required":["id","name","kind","family","quantum","summary","standards","sources"]},"Advisory":{"type":"object","properties":{"id":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"},"details":{"type":["string","null"]},"severity":{"type":["string","null"],"enum":["critical","high","moderate","low",null],"description":"As labelled by the source. Never computed by Noumen."},"cvss":{"type":"array","items":{"type":"string"}},"published":{"type":["string","null"],"description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"modified":{"type":["string","null"],"description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"withdrawn":{"type":["string","null"],"description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"affected":{"type":"array","items":{"$ref":"#/components/schemas/AffectedVersions"}},"references":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"url":{"type":"string"}},"required":["type","url"]}},"source":{"$ref":"#/components/schemas/SourceRef"},"retrievedAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["id","aliases","summary","details","severity","cvss","published","modified","withdrawn","affected","references","source","retrievedAt"]},"AffectedVersions":{"type":"object","properties":{"ecosystem":{"type":"string"},"name":{"type":"string"},"ranges":{"type":"array","items":{"type":"object","properties":{"introduced":{"type":"string"},"fixed":{"type":"string"},"lastAffected":{"type":"string"},"limit":{"type":"string"}}}},"versions":{"type":"array","items":{"type":"string"}}},"required":["ecosystem","name","ranges"]},"Finding":{"type":"object","properties":{"id":{"type":"string","example":"NMN-2026-0001","description":"Public identifier."},"title":{"type":"string"},"summary":{"type":"string"},"category":{"type":"string"},"component":{"type":["object","null"],"properties":{"ecosystem":{"type":"string"},"name":{"type":"string"}},"required":["ecosystem","name"]},"affected":{"type":"array","items":{"$ref":"#/components/schemas/AffectedVersions"}},"severity":{"type":"object","properties":{"level":{"type":"string","enum":["critical","high","moderate","low","none","unknown"]},"rationale":{"type":"string"},"origin":{"type":"string","enum":["source-advisory","noumen-review"]}},"required":["level","rationale","origin"]},"confidence":{"type":"object","properties":{"level":{"type":"string","enum":["high","medium","low","unassessed"]},"rationale":{"type":"string"}},"required":["level","rationale"]},"state":{"type":"string","enum":["candidate","in-review","reproduced","confirmed","disputed","resolved","withdrawn"],"description":"Verification state. A finding is confirmed only when this is `confirmed`."},"stateDescription":{"type":"string"},"disclosure":{"type":"object","properties":{"state":{"type":"string","enum":["public","embargoed","private"]},"embargoUntil":{"type":["string","null"],"description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["state","embargoUntil"]},"mitigation":{"type":"string"},"discoveryMethod":{"type":"string"},"reproduction":{"type":"string"},"sources":{"type":"array","items":{"$ref":"#/components/schemas/SourceRef"},"minItems":1},"relatedAdvisories":{"type":"array","items":{"type":"string"}},"attribution":{"type":"object","properties":{"researcher":{"$ref":"#/components/schemas/PersonRef"},"validators":{"type":"array","items":{"$ref":"#/components/schemas/PersonRef"}}},"required":["researcher","validators"]},"needsReview":{"type":["string","null"],"enum":["source-changed","source-withdrawn",null]},"createdAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"updatedAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["id","title","summary","category","component","affected","severity","confidence","state","stateDescription","disclosure","mitigation","discoveryMethod","reproduction","sources","relatedAdvisories","attribution","needsReview","createdAt","updatedAt"],"description":"An intelligence record (blueprint 6.1). Severity and confidence are separate fields with separate rationales; nothing combines them."},"PersonRef":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["person"]},"name":{"type":"string"}},"required":["kind","name"]},{"type":"object","properties":{"kind":{"type":"string","enum":["anonymous"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["former-contributor"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"]},"name":{"type":"string","description":"Agent name and version, for example advisory-monitor@1.0.0."}},"required":["kind","name"]},{"type":"null"}],"description":"Who did something. A deleted account shows as \"former contributor\". Agents are machine actors and carry their version."},"Standard":{"type":"object","properties":{"id":{"type":"string"},"designation":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"status":{"type":"string","enum":["final","draft","selected","informational","withdrawn"]},"published":{"type":"string"},"url":{"type":"string"},"retrieved":{"type":"string"}},"required":["id","designation","title","body","status","url","retrieved"],"description":"Cited as a source with a link, never as a partner."},"FindingDetail":{"allOf":[{"$ref":"#/components/schemas/Finding"},{"type":"object","properties":{"affectedSystems":{"type":"array","items":{"$ref":"#/components/schemas/AffectedSystem"}},"corrections":{"type":"array","items":{"$ref":"#/components/schemas/Correction"}},"assignee":{"allOf":[{"$ref":"#/components/schemas/PersonRef"},{"description":"Shown to reviewers only; null for others."}]},"allowedTransitions":{"type":["array","null"],"items":{"type":"string","enum":["candidate","in-review","reproduced","confirmed","disputed","resolved","withdrawn"]},"description":"For reviewers and admins: the states you may move this finding to now, from the same check the API enforces (including: reproduction needs someone other than the submitter; disputed returns to confirmed only if it was confirmed before). A reason is still required. Null for other callers."}},"required":["affectedSystems","corrections","assignee"]}],"description":"An intelligence record (blueprint 6.1). Severity and confidence are separate fields with separate rationales; nothing combines them."},"AffectedSystem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"repository":{"type":"string"},"commit":{"type":["string","null"]},"evidence":{"type":"string"},"addedBy":{"$ref":"#/components/schemas/PersonRef"},"confirmed":{"type":"boolean"},"confirmedBy":{"$ref":"#/components/schemas/PersonRef"},"confirmedAt":{"type":["string","null"],"description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"confirmationEvidence":{"type":["string","null"]}},"required":["id","repository","commit","evidence","addedBy","confirmed","confirmedBy","confirmedAt","confirmationEvidence"]},"Correction":{"type":"object","properties":{"at":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"actor":{"$ref":"#/components/schemas/PersonRef"},"reason":{"type":"string"},"changes":{"type":"object","additionalProperties":{"type":"object","properties":{"before":{},"after":{}}}}},"required":["at","actor","reason","changes"]},"FindingEvent":{"type":"object","properties":{"seq":{"type":"integer"},"type":{"type":"string"},"actor":{"$ref":"#/components/schemas/PersonRef"},"machineGenerated":{"type":"boolean"},"reason":{"type":"string"},"payload":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"prevHash":{"type":["string","null"]},"hash":{"type":"string"}},"required":["seq","type","actor","machineGenerated","reason","payload","createdAt","prevHash","hash"]},"ChainVerification":{"type":"object","properties":{"ok":{"type":"boolean"},"events":{"type":"integer"},"brokenAt":{"type":["object","null"],"properties":{"seq":{"type":"integer"},"problem":{"type":"string","enum":["hash-mismatch","prev-hash-mismatch","sequence-gap"]}},"required":["seq","problem"]},"headHash":{"type":["string","null"]}},"required":["ok","events","brokenAt","headHash"]},"Submission":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"summary":{"type":"string"},"component":{"type":["object","null"],"properties":{"ecosystem":{"type":"string"},"name":{"type":"string"}},"required":["ecosystem","name"]},"affectedVersions":{"type":"string"},"evidenceLinks":{"type":"array","items":{"type":"string"}},"reproduction":{"type":"string"},"suggestedSeverity":{"type":"string"},"disclosure":{"type":"object","properties":{"preference":{"type":"string","enum":["public-after-review","embargo"]},"until":{"type":["string","null"],"description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["preference","until"]},"attribution":{"type":"string","enum":["name","anonymous"]},"status":{"type":"string","enum":["received","in-triage","accepted","declined","duplicate"]},"decision":{"type":["object","null"],"properties":{"reason":{"type":["string","null"]},"at":{"type":["string","null"],"description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"duplicateOf":{"type":["string","null"]},"findingId":{"type":["string","null"]}},"required":["reason","at","duplicateOf","findingId"]},"appeal":{"type":["object","null"],"properties":{"text":{"type":"string"},"at":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"outcome":{"type":["string","null"],"enum":["upheld","overturned",null]},"reason":{"type":["string","null"]},"decidedAt":{"type":["string","null"],"description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["text","at","outcome","reason","decidedAt"]},"checks":{"type":["object","null"],"properties":{"missingEvidence":{"type":"array","items":{"type":"string"}},"componentInCatalogue":{"type":["boolean","null"]}},"required":["missingEvidence","componentInCatalogue"]},"createdAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"updatedAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["id","title","summary","component","affectedVersions","evidenceLinks","reproduction","suggestedSeverity","disclosure","attribution","status","decision","appeal","checks","createdAt","updatedAt"]},"SubmissionNote":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["automated-checks","triage-note","appeal"]},"machineGenerated":{"type":"boolean"},"tool":{"type":["string","null"]},"model":{"type":["string","null"]},"promptVersion":{"type":["string","null"]},"body":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["id","kind","machineGenerated","tool","model","promptVersion","body","createdAt"],"description":"Machine-generated notes are labelled and record the tool or model that produced them. They never change a status."},"ReviewSubmission":{"type":"object","properties":{"submission":{"$ref":"#/components/schemas/Submission"},"notes":{"type":"array","items":{"$ref":"#/components/schemas/SubmissionNote"}}},"required":["submission","notes"]},"ScanMeta":{"type":"object","properties":{"id":{"type":"string","example":"scn_4gH7pQ2rT9vX1bN6mK3sW8yZ","description":"Unguessable id. Anyone with an unlisted scan id can read it."},"url":{"type":"string"},"subject":{"type":"object","properties":{"kind":{"type":"string","enum":["repository","upload"]},"repository":{"type":["string","null"]},"ref":{"type":["string","null"]},"commit":{"type":["string","null"]},"label":{"type":"string"}},"required":["kind","repository","ref","commit","label"]},"visibility":{"type":"string","enum":["unlisted","private"]},"workspaceId":{"type":["string","null"],"format":"uuid"},"engineVersion":{"type":"string"},"catalogueVersion":{"type":"string"},"totals":{"type":"object","properties":{"packagesRead":{"type":"integer"},"cryptographic":{"type":"integer"},"withAdvisories":{"type":"integer"}},"required":["packagesRead","cryptographic","withAdvisories"]},"createdAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"expiresAt":{"type":["string","null"],"description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["id","url","subject","visibility","workspaceId","engineVersion","catalogueVersion","totals","createdAt","expiresAt"]},"ScanReport":{"type":"object","properties":{"schema":{"type":"string","enum":["noumen.scan/1"]},"engine":{"type":"object","properties":{"name":{"type":"string","enum":["@noumen/scanner"]},"version":{"type":"string"}},"required":["name","version"]},"catalogue":{"type":"object","properties":{"version":{"type":"string"}},"required":["version"]},"generatedAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"kind":{"type":"string"},"ecosystem":{"type":"string","enum":["npm","crates.io"]},"sha256":{"type":"string","description":"SHA-256 of the file as read, so a reviewer can confirm what was scanned."},"packages":{"type":"integer"},"nonRegistry":{"type":"integer","description":"Dependencies in this file that do not come from the public registry. Counted, never matched."}},"required":["path","kind","ecosystem","sha256","packages"]}},"problems":{"type":"array","items":{"type":"object","properties":{"file":{"type":"string"},"message":{"type":"string"}},"required":["file","message"]}},"totals":{"type":"object","properties":{"packagesRead":{"type":"integer"},"cryptographic":{"type":"integer"},"byFamily":{"type":"object","additionalProperties":{"type":"integer"}},"withAdvisories":{"type":"integer"},"possiblyAffected":{"type":"integer"},"nonRegistry":{"type":"integer"}},"required":["packagesRead","cryptographic","byFamily","withAdvisories","possiblyAffected"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/InventoryItem"}},"advisoriesChecked":{"type":"boolean"},"advisorySource":{"$ref":"#/components/schemas/SourceRef"},"limitations":{"type":"array","items":{"type":"string"},"minItems":1,"description":"What this report cannot tell you. Always present."}},"required":["schema","engine","catalogue","generatedAt","files","problems","totals","items","advisoriesChecked","limitations"],"description":"A cryptographic inventory. It never says a system is safe, secure or audited, and has no single risk score. File contents are not part of it: only paths, hashes and package names."},"InventoryItem":{"type":"object","properties":{"ecosystem":{"type":"string","enum":["npm","crates.io"]},"name":{"type":"string"},"version":{"type":["string","null"]},"declared":{"type":"string"},"resolution":{"type":"string","enum":["lockfile","manifest-exact","manifest-range","unknown"]},"scope":{"type":"string","enum":["runtime","dev","build","optional","peer","unknown"]},"direct":{"type":["boolean","null"]},"evidence":{"type":"array","items":{"type":"object","properties":{"file":{"type":"string"},"line":{"type":"integer"},"locator":{"type":"string"}},"required":["file","locator"]}},"summary":{"type":"string"},"role":{"type":"string","enum":["implementation","binding","protocol","toolkit"]},"algorithms":{"type":"array","items":{"$ref":"#/components/schemas/Algorithm"}},"families":{"type":"array","items":{"type":"string","enum":["classical-public-key","symmetric","hash","post-quantum","hybrid","other"]}},"quantum":{"type":"array","items":{"type":"string","enum":["broken-by-shor","weakened-by-grover","designed-to-resist","hybrid","not-applicable"]}},"deprecated":{"type":"boolean"},"advisories":{"type":"array","items":{"$ref":"#/components/schemas/AdvisoryMatch"}},"sources":{"type":"array","items":{"$ref":"#/components/schemas/SourceRef"}}},"required":["ecosystem","name","version","resolution","scope","direct","evidence","summary","role","algorithms","families","quantum","deprecated","advisories","sources"]},"AdvisoryMatch":{"type":"object","properties":{"advisoryId":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"},"severity":{"type":["string","null"],"enum":["critical","high","moderate","low",null],"description":"As labelled by the source."},"cvss":{"type":"array","items":{"type":"string"},"description":"CVSS vector strings exactly as the source gave them."},"status":{"type":"string","enum":["affected","possibly-affected"]},"fixedIn":{"type":"array","items":{"type":"string"}},"reason":{"type":"string"},"source":{"$ref":"#/components/schemas/SourceRef"}},"required":["advisoryId","aliases","summary","severity","status","fixedIn","reason","source"]},"ScanUpload":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":400},"content":{"type":"string","maxLength":5242880}},"required":["path","content"]},"minItems":1,"maxItems":40},"workspaceId":{"type":"string","format":"uuid","description":"Save to this workspace. Defaults to your personal workspace, or the API key workspace."},"visibility":{"type":"string","enum":["unlisted","private"],"default":"private","description":"For saved scans. `private`: members only. `unlisted`: anyone with the link. Anonymous scans are always unlisted."}},"required":["files"],"description":"Up to 40 files and 5 MB in total. Only dependency manifests and lockfiles are read. File contents are not stored: only the report, which holds paths, hashes and package names."},"ScanRepository":{"type":"object","properties":{"repository":{"type":"string","maxLength":400,"example":"https://github.com/indutny/elliptic"},"ref":{"type":"string","maxLength":200,"description":"Branch, tag or commit. Defaults to the default branch."},"workspaceId":{"type":"string","format":"uuid","description":"Save to this workspace. Defaults to your personal workspace, or the API key workspace."},"visibility":{"type":"string","enum":["unlisted","private"],"default":"private","description":"For saved scans. `private`: members only. `unlisted`: anyone with the link. Anonymous scans are always unlisted."}},"required":["repository"],"description":"A public repository on github.com. Noumen downloads its archive, reads only manifests and lockfiles (skipping node_modules, vendor, target and fixture folders), and stores no file contents."},"Monitor":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"repository":{"type":"string"},"branch":{"type":"string"},"status":{"type":"string","enum":["active","paused"]},"lastRunAt":{"type":["string","null"],"description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"lastCommit":{"type":["string","null"]},"lastStatus":{"type":["string","null"]},"lastError":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["id","repository","branch","status","lastRunAt","lastCommit","lastStatus","lastError","createdAt"]},"MonitorRun":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"trigger":{"type":"string","enum":["schedule","manual"]},"status":{"type":"string","enum":["succeeded","unchanged","failed"]},"commit":{"type":["string","null"]},"scanId":{"type":["string","null"]},"changes":{"type":"integer"},"error":{"type":["string","null"]},"startedAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"finishedAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["id","trigger","status","commit","scanId","changes","error","startedAt","finishedAt"]},"MonitorChange":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"runId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["package-added","package-removed","package-version-changed","advisory-matched","advisory-cleared"]},"ecosystem":{"type":"string"},"package":{"type":"string"},"fromVersion":{"type":["string","null"]},"toVersion":{"type":["string","null"]},"advisoryId":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["id","runId","kind","ecosystem","package","fromVersion","toVersion","advisoryId","createdAt"]},"Alert":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"event":{"type":"string"},"summary":{"type":"string"},"emailStatus":{"type":"string"},"payload":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["id","event","summary","emailStatus","payload","createdAt"]},"Webhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["monitor.changed","advisory.matched","finding.state_changed","ping"]}},"status":{"type":"string","enum":["active","failing","disabled"],"description":"`disabled`: paused by a workspace member; events are logged as skipped deliveries and nothing is sent."},"consecutiveFailures":{"type":"integer"},"lastDeliveryAt":{"type":["string","null"],"description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"createdAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["id","url","events","status","consecutiveFailures","lastDeliveryAt","createdAt"]},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"event":{"type":"string"},"status":{"type":"string","enum":["pending","succeeded","failed","skipped"],"description":"`skipped`: the event happened while the webhook was disabled; nothing was sent."},"attempts":{"type":"integer"},"nextAttemptAt":{"type":["string","null"],"description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"createdAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"attemptLog":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"ok":{"type":"boolean"},"statusCode":{"type":["integer","null"]},"latencyMs":{"type":"integer"},"error":{"type":["string","null"]},"responseExcerpt":{"type":["string","null"],"description":"At most 200 characters of the response."}},"required":["at","ok","statusCode","latencyMs","error","responseExcerpt"]}}},"required":["id","event","status","attempts","nextAttemptAt","createdAt","attemptLog"]},"Application":{"type":"object","properties":{"kind":{"type":"string","enum":["researcher","validator","developer","protocol","partner","other"]},"name":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","maxLength":254,"format":"email"},"organisation":{"type":"string","maxLength":200},"links":{"type":"array","items":{"type":"string","maxLength":500,"format":"uri"},"maxItems":5,"default":[]},"message":{"type":"string","minLength":10,"maxLength":4000},"consent":{"type":"boolean","enum":[true],"description":"Consent to be contacted about this application."},"website":{"type":"string","maxLength":200,"description":"Leave empty. Forms that fill it in are ignored."}},"required":["kind","name","email","message","consent"],"description":"Stored for Noumen admins to read. Nothing is shared with anyone else."},"AdminUser":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["member","researcher","reviewer","admin"]},"emailVerified":{"type":"boolean"},"createdAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["id","email","name","role","emailVerified","createdAt"]},"ApplicationRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["researcher","validator","developer","protocol","partner","other"]},"name":{"type":"string"},"email":{"type":"string"},"organisation":{"type":["string","null"]},"links":{"type":"array","items":{"type":"string"}},"message":{"type":"string"},"status":{"type":"string","enum":["new","reviewing","accepted","declined","closed"]},"note":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"updatedAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["id","kind","name","email","organisation","links","message","status","note","createdAt","updatedAt"]},"JobRun":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"job":{"type":"string"},"version":{"type":"string"},"trigger":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","partial","failed","skipped"]},"stats":{"type":"object","additionalProperties":{}},"labels":{"type":"object","additionalProperties":{"type":"string"},"description":"A plain label for each key in `stats`."},"error":{"type":["string","null"]},"startedAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"finishedAt":{"type":["string","null"],"description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["id","job","version","trigger","status","stats","labels","error","startedAt","finishedAt"]},"DailyJobs":{"type":"object","properties":{"jobs":{"type":"object","additionalProperties":{"type":"object","properties":{"status":{"type":"string","enum":["succeeded","partial","failed","skipped"]},"stats":{"type":"object","additionalProperties":{}},"labels":{"type":"object","additionalProperties":{"type":"string"}}},"required":["status","stats"]}}},"required":["jobs"]}},"parameters":{}},"paths":{"/healthz":{"get":{"tags":["Operations"],"summary":"Process is up","responses":{"200":{"description":"Up","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}}}}},"/readyz":{"get":{"tags":["Operations"],"summary":"Database reachable and migrations current","responses":{"200":{"description":"Ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Readiness"}}}},"503":{"description":"Not ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Readiness"}}}}}}},"/v1/meta/facts":{"get":{"tags":["Meta"],"summary":"The rules and limits this API enforces","description":"Rate limits, error types, finding states and transitions, levels, webhook delivery rules, scan limits, retention periods, job descriptions and agent versions. Read from the constants the code enforces. The same object is exported from `@noumen/api` as `publicFacts`.","responses":{"200":{"description":"Facts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicFacts"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/sign-up":{"post":{"tags":["Auth"],"summary":"Create an account","description":"Creates an account with a personal workspace. The answer is the same whether or not the email is already registered, so accounts cannot be discovered here. Sign in afterwards. A verification email is sent when email is configured.","requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email"},"name":{"type":"string","minLength":1,"maxLength":120},"password":{"type":"string","minLength":1,"maxLength":256}},"required":["email","name","password"]}}}},"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"},"emailConfigured":{"type":"boolean"}},"required":["ok","message","emailConfigured"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/sign-in":{"post":{"tags":["Auth"],"summary":"Sign in","description":"Sets the `noumen_session` cookie (HttpOnly, SameSite=Lax). Any session presented with the request is replaced.","requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email"},"password":{"type":"string","minLength":1,"maxLength":256}},"required":["email","password"]}}}},"responses":{"200":{"description":"Signed in","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"}},"required":["user"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/sign-out":{"post":{"tags":["Auth"],"summary":"Sign out","responses":{"200":{"description":"Signed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/session":{"get":{"tags":["Auth"],"summary":"The current session","description":"Returns the signed-in user, or nulls. `emailConfigured` tells the interface whether emails can be sent.","responses":{"200":{"description":"Session","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"allOf":[{"$ref":"#/components/schemas/User"},{"type":["object","null"]}]},"session":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"expiresAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["id","expiresAt"]},"emailConfigured":{"type":"boolean"},"triageConfigured":{"type":"boolean"}},"required":["user","session","emailConfigured","triageConfigured"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/verify-email":{"post":{"tags":["Auth"],"summary":"Confirm an email address","description":"Takes the single-use token from the verification link. Tokens expire after 24 hours.","requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":10,"maxLength":200}},"required":["token"]}}}},"responses":{"200":{"description":"Verified","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/request-verification":{"post":{"tags":["Auth"],"summary":"Send the verification email again","responses":{"200":{"description":"Queued","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"email":{"type":"string","enum":["sent","failed","not-sent: email not configured"]}},"required":["ok","email"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/request-password-reset":{"post":{"tags":["Auth"],"summary":"Ask for a password reset link","description":"Always answers the same way, whether or not the email has an account. The link works once and expires in 30 minutes.","requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email"}},"required":["email"]}}}},"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok","message"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/reset-password":{"post":{"tags":["Auth"],"summary":"Choose a new password with a reset token","description":"Signs out every session of the account.","requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":10,"maxLength":200},"password":{"type":"string","minLength":1,"maxLength":256}},"required":["token","password"]}}}},"responses":{"200":{"description":"Password changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/change-password":{"post":{"tags":["Auth"],"summary":"Change the password","description":"Needs the current password. Ends every other session and issues a new session cookie.","requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"currentPassword":{"type":"string","minLength":1,"maxLength":256},"newPassword":{"type":"string","minLength":1,"maxLength":256}},"required":["currentPassword","newPassword"]}}}},"responses":{"200":{"description":"Password changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/sessions":{"get":{"tags":["Auth"],"summary":"List your sessions","responses":{"200":{"description":"Sessions","content":{"application/json":{"schema":{"type":"object","properties":{"sessions":{"type":"array","items":{"$ref":"#/components/schemas/Session"}}},"required":["sessions"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/sessions/{sessionId}":{"delete":{"tags":["Auth"],"summary":"Revoke one of your sessions","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account":{"get":{"tags":["Account"],"summary":"Your account","responses":{"200":{"description":"Account","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/Account"}},"required":["account"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Account"],"summary":"Change your name or how public records credit you","requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"attribution":{"type":"string","enum":["name","anonymous"]}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/Account"}},"required":["account"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Account"],"summary":"Delete your account","description":"Needs your password. Deletes your account, sessions, submissions, email records and every workspace where you are the only member, with its scans, monitors, keys and webhooks. In shared workspaces you leave; if you were the last owner, the longest-standing member becomes owner. Findings and events you authored stay in the public record and are shown as \"former contributor\".","requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","minLength":1,"maxLength":256}},"required":["password"]}}}},"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/export":{"get":{"tags":["Account"],"summary":"Everything Noumen stores about you, as JSON","description":"Your account, sessions, workspace memberships, keys and webhooks you created (without secrets), submissions with their notes, scans and monitors you created, emails recorded for you, and the public records you are credited on.","responses":{"200":{"description":"Export","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces":{"get":{"tags":["Workspaces"],"summary":"Workspaces you belong to","description":"With an API key, the one workspace the key belongs to.","responses":{"200":{"description":"Workspaces","content":{"application/json":{"schema":{"type":"object","properties":{"workspaces":{"type":"array","items":{"$ref":"#/components/schemas/Workspace"}}},"required":["workspaces"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Workspaces"],"summary":"Create a workspace","requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80}},"required":["name"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"$ref":"#/components/schemas/Workspace"}},"required":["workspace"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{workspaceId}":{"get":{"tags":["Workspaces"],"summary":"A workspace with its members and pending invitations","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"}],"responses":{"200":{"description":"Workspace","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"$ref":"#/components/schemas/Workspace"},"members":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceMember"}},"invitations":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceInvitation"}}},"required":["workspace","members","invitations"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Workspaces"],"summary":"Rename a workspace","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80}},"required":["name"]}}}},"responses":{"200":{"description":"Renamed","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"$ref":"#/components/schemas/Workspace"}},"required":["workspace"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Workspaces"],"summary":"Delete a workspace and everything in it","description":"Owners only. A personal workspace goes away with its account instead.","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{workspaceId}/members":{"post":{"tags":["Workspaces"],"summary":"Add a member by email","description":"Adds the person when they already have an account. Otherwise a pending invitation is stored and attaches when they sign up.","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email"},"role":{"type":"string","enum":["owner","member"],"default":"member"}},"required":["email"]}}}},"responses":{"201":{"description":"Added or invited","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["added","invited"]}},"required":["status"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{workspaceId}/members/{userId}":{"patch":{"tags":["Workspaces"],"summary":"Change a member's role","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"userId","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","member"]}},"required":["role"]}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Workspaces"],"summary":"Remove a member, or leave","description":"Owners can remove anyone. Members can remove themselves. The last owner cannot leave.","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{workspaceId}/invitations/{invitationId}":{"delete":{"tags":["Workspaces"],"summary":"Cancel a pending invitation","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"invitationId","in":"path"}],"responses":{"200":{"description":"Cancelled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{workspaceId}/keys":{"get":{"tags":["API keys"],"summary":"List a workspace's API keys","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"}],"responses":{"200":{"description":"Keys","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}},"required":["keys"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["API keys"],"summary":"Create an API key","description":"The full key is in this response only. Noumen stores its first 12 characters and a SHA-256 hash.","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"scopes":{"type":"array","items":{"type":"string","enum":["read","write"]},"minItems":1,"default":["read","write"]}},"required":["name"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"apiKey":{"$ref":"#/components/schemas/ApiKey"}},"required":["key","apiKey"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{workspaceId}/keys/{keyId}":{"delete":{"tags":["API keys"],"summary":"Revoke an API key","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"keyId","in":"path"}],"responses":{"200":{"description":"Revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/catalogue":{"get":{"tags":["Catalogue"],"summary":"Catalogue version and counts","responses":{"200":{"description":"Catalogue","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string"},"engineVersion":{"type":"string"},"counts":{"type":"object","properties":{"components":{"type":"integer"},"algorithms":{"type":"integer"},"standards":{"type":"integer"},"byEcosystem":{"type":"object","additionalProperties":{"type":"integer"}}},"required":["components","algorithms","standards","byEcosystem"]}},"required":["version","engineVersion","counts"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/components":{"get":{"tags":["Catalogue"],"summary":"Catalogued cryptographic packages","parameters":[{"schema":{"type":"string","enum":["npm","crates.io"]},"required":false,"name":"ecosystem","in":"query"},{"schema":{"type":"string","enum":["classical-public-key","symmetric","hash","post-quantum","hybrid","other"]},"required":false,"name":"family","in":"query"},{"schema":{"type":"string","enum":["broken-by-shor","weakened-by-grover","designed-to-resist","hybrid","not-applicable"]},"required":false,"name":"quantum","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page (1 to 100)."},"required":false,"description":"Items per page (1 to 100).","name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0,"description":"Items to skip."},"required":false,"description":"Items to skip.","name":"offset","in":"query"}],"responses":{"200":{"description":"Components","content":{"application/json":{"schema":{"type":"object","properties":{"components":{"type":"array","items":{"$ref":"#/components/schemas/Component"}},"page":{"$ref":"#/components/schemas/PageInfo"}},"required":["components","page"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/components/{ecosystem}/{name}":{"get":{"tags":["Catalogue"],"summary":"One catalogued package with its algorithms, advisories and findings","description":"URL-encode names that contain `/` or `@` (for example `%40noble%2Fcurves`), or use the scoped form `/v1/components/npm/@noble/curves`.","parameters":[{"schema":{"type":"string","enum":["npm","crates.io"]},"required":true,"name":"ecosystem","in":"path"},{"schema":{"type":"string","maxLength":214},"required":true,"name":"name","in":"path"}],"responses":{"200":{"description":"Component","content":{"application/json":{"schema":{"type":"object","properties":{"component":{"$ref":"#/components/schemas/Component"},"algorithms":{"type":"array","items":{"$ref":"#/components/schemas/Algorithm"}},"advisories":{"type":"array","items":{"$ref":"#/components/schemas/Advisory"}},"findings":{"type":"array","items":{"$ref":"#/components/schemas/Finding"}},"advisorySync":{"type":"object","properties":{"lastSyncedAt":{"type":["string","null"],"description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"lastError":{"type":["string","null"]}},"required":["lastSyncedAt","lastError"]}},"required":["component","algorithms","advisories","findings","advisorySync"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/components/{ecosystem}/{scope}/{name}":{"get":{"tags":["Catalogue"],"summary":"One scoped npm package, for example @noble/curves","parameters":[{"schema":{"type":"string","enum":["npm","crates.io"]},"required":true,"name":"ecosystem","in":"path"},{"schema":{"type":"string","maxLength":100,"pattern":"^@[A-Za-z0-9._-]+$","example":"@noble"},"required":true,"name":"scope","in":"path"},{"schema":{"type":"string","maxLength":214,"example":"curves"},"required":true,"name":"name","in":"path"}],"responses":{"200":{"description":"Component","content":{"application/json":{"schema":{"type":"object","properties":{"component":{"$ref":"#/components/schemas/Component"},"algorithms":{"type":"array","items":{"$ref":"#/components/schemas/Algorithm"}},"advisories":{"type":"array","items":{"$ref":"#/components/schemas/Advisory"}},"findings":{"type":"array","items":{"$ref":"#/components/schemas/Finding"}},"advisorySync":{"type":"object","properties":{"lastSyncedAt":{"type":["string","null"],"description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"lastError":{"type":["string","null"]}},"required":["lastSyncedAt","lastError"]}},"required":["component","algorithms","advisories","findings","advisorySync"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/algorithms":{"get":{"tags":["Catalogue"],"summary":"Algorithms in the catalogue","parameters":[{"schema":{"type":"string","enum":["classical-public-key","symmetric","hash","post-quantum","hybrid","other"]},"required":false,"name":"family","in":"query"},{"schema":{"type":"string","enum":["broken-by-shor","weakened-by-grover","designed-to-resist","hybrid","not-applicable"]},"required":false,"name":"quantum","in":"query"}],"responses":{"200":{"description":"Algorithms","content":{"application/json":{"schema":{"type":"object","properties":{"algorithms":{"type":"array","items":{"$ref":"#/components/schemas/Algorithm"}}},"required":["algorithms"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/algorithms/{id}":{"get":{"tags":["Catalogue"],"summary":"One algorithm and the catalogued packages that provide it","parameters":[{"schema":{"type":"string","maxLength":100,"example":"ecdsa-secp256k1"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Algorithm","content":{"application/json":{"schema":{"type":"object","properties":{"algorithm":{"$ref":"#/components/schemas/Algorithm"},"standards":{"type":"array","items":{"$ref":"#/components/schemas/Standard"}},"components":{"type":"array","items":{"$ref":"#/components/schemas/Component"}}},"required":["algorithm","standards","components"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/standards":{"get":{"tags":["Catalogue"],"summary":"Standards cited by the catalogue","responses":{"200":{"description":"Standards","content":{"application/json":{"schema":{"type":"object","properties":{"standards":{"type":"array","items":{"$ref":"#/components/schemas/Standard"}}},"required":["standards"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/stats":{"get":{"tags":["Catalogue"],"summary":"Real counts from the database and the catalogue","description":"The only numbers the website shows. Findings are counted when public.","responses":{"200":{"description":"Stats","content":{"application/json":{"schema":{"type":"object","properties":{"catalogueVersion":{"type":"string"},"components":{"type":"object","properties":{"total":{"type":"integer"},"byEcosystem":{"type":"object","additionalProperties":{"type":"integer"}}},"required":["total","byEcosystem"]},"algorithms":{"type":"integer"},"standards":{"type":"integer"},"advisories":{"type":"integer"},"findings":{"type":"object","properties":{"total":{"type":"integer"},"byState":{"type":"object","additionalProperties":{"type":"integer"}}},"required":["total","byState"]},"lastAdvisorySync":{"type":"object","properties":{"finishedAt":{"type":["string","null"],"description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"packagesChecked":{"type":["integer","null"]}},"required":["finishedAt","packagesChecked"]},"features":{"type":"object","properties":{"email":{"type":"boolean","description":"RESEND_API_KEY and EMAIL_FROM are set: emails are sent."},"triage":{"type":"boolean","description":"ANTHROPIC_API_KEY is set: reviewers can request assisted triage."},"githubToken":{"type":"boolean","description":"GITHUB_TOKEN is set: monitors use the higher GitHub API rate limit."}},"required":["email","triage","githubToken"],"description":"Which optional services this deployment has configured. Booleans only."},"generatedAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["catalogueVersion","components","algorithms","standards","advisories","findings","lastAdvisorySync","features","generatedAt"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/advisories":{"get":{"tags":["Advisories"],"summary":"Public advisories for catalogued packages, from OSV","parameters":[{"schema":{"type":"string","enum":["npm","crates.io"]},"required":false,"name":"ecosystem","in":"query"},{"schema":{"type":"string","maxLength":214},"required":false,"name":"package","in":"query"},{"schema":{"type":"string","enum":["critical","high","moderate","low"]},"required":false,"name":"severity","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page (1 to 100)."},"required":false,"description":"Items per page (1 to 100).","name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0,"description":"Items to skip."},"required":false,"description":"Items to skip.","name":"offset","in":"query"}],"responses":{"200":{"description":"Advisories","content":{"application/json":{"schema":{"type":"object","properties":{"advisories":{"type":"array","items":{"$ref":"#/components/schemas/Advisory"}},"page":{"$ref":"#/components/schemas/PageInfo"}},"required":["advisories","page"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/advisories/{id}":{"get":{"tags":["Advisories"],"summary":"One advisory, by id or alias","parameters":[{"schema":{"type":"string","maxLength":100,"example":"GHSA-vjh7-7g9h-fjfh"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Advisory","content":{"application/json":{"schema":{"type":"object","properties":{"advisory":{"$ref":"#/components/schemas/Advisory"}},"required":["advisory"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/findings":{"get":{"tags":["Findings"],"summary":"Search findings","description":"Anonymous callers and API keys see public findings only. Embargoed and private findings are visible to reviewers, admins and their submitter.","parameters":[{"schema":{"type":"string","enum":["candidate","in-review","reproduced","confirmed","disputed","resolved","withdrawn"]},"required":false,"name":"state","in":"query"},{"schema":{"type":"string","enum":["critical","high","moderate","low","none","unknown"]},"required":false,"name":"severity","in":"query"},{"schema":{"type":"string","enum":["high","medium","low","unassessed"]},"required":false,"name":"confidence","in":"query"},{"schema":{"type":"string","enum":["npm","crates.io"]},"required":false,"name":"ecosystem","in":"query"},{"schema":{"type":"string","maxLength":214},"required":false,"name":"component","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page (1 to 100)."},"required":false,"description":"Items per page (1 to 100).","name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0,"description":"Items to skip."},"required":false,"description":"Items to skip.","name":"offset","in":"query"}],"responses":{"200":{"description":"Findings","content":{"application/json":{"schema":{"type":"object","properties":{"findings":{"type":"array","items":{"$ref":"#/components/schemas/Finding"}},"page":{"$ref":"#/components/schemas/PageInfo"}},"required":["findings","page"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Review"],"summary":"Create a finding (reviewers)","description":"Starts as a candidate. Needs at least one source with a URL and retrieval date.","requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":5,"maxLength":300},"summary":{"type":"string","minLength":10,"maxLength":8000},"category":{"type":"string","enum":["vulnerability","weak-algorithm","misuse","deprecated-component","quantum-exposure","supply-chain","other"]},"component":{"type":["object","null"],"properties":{"ecosystem":{"type":"string","enum":["npm","crates.io"]},"name":{"type":"string","minLength":1,"maxLength":214}},"default":null,"required":["ecosystem","name"]},"affected":{"type":"array","items":{"$ref":"#/components/schemas/AffectedVersions"},"maxItems":20,"default":[]},"severity":{"type":"string","enum":["critical","high","moderate","low","none","unknown"]},"severityRationale":{"type":"string","minLength":10,"maxLength":4000},"confidence":{"type":"string","enum":["high","medium","low","unassessed"]},"confidenceRationale":{"type":"string","minLength":10,"maxLength":4000},"disclosure":{"type":"string","enum":["public","embargoed","private"],"default":"public"},"embargoUntil":{"type":["string","null"],"format":"date-time","default":null},"mitigation":{"type":"string","maxLength":4000,"default":""},"discoveryMethod":{"type":"string","minLength":3,"maxLength":1000},"reproduction":{"type":"string","maxLength":8000,"default":""},"sources":{"type":"array","items":{"$ref":"#/components/schemas/SourceRef"},"minItems":1,"maxItems":50},"relatedAdvisories":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":50,"default":[]},"reason":{"type":"string","minLength":20,"maxLength":4000,"description":"Why. At least 20 characters."}},"required":["title","summary","category","severity","severityRationale","confidence","confidenceRationale","discoveryMethod","sources","reason"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"finding":{"$ref":"#/components/schemas/FindingDetail"}},"required":["finding"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/findings/{id}":{"get":{"tags":["Findings"],"summary":"One finding with affected systems and its correction history","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":40,"example":"NMN-2026-0001"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Finding","content":{"application/json":{"schema":{"type":"object","properties":{"finding":{"$ref":"#/components/schemas/FindingDetail"}},"required":["finding"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Review"],"summary":"Correct fields of a finding (reviewers)","description":"Every change is stored as a correction event with the value before and after. Changing severity records it as a Noumen review.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":40,"example":"NMN-2026-0001"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":5,"maxLength":300},"summary":{"type":"string","minLength":10,"maxLength":8000},"category":{"type":"string","enum":["vulnerability","weak-algorithm","misuse","deprecated-component","quantum-exposure","supply-chain","other"]},"component":{"type":["object","null"],"properties":{"ecosystem":{"type":"string","enum":["npm","crates.io"]},"name":{"type":"string","minLength":1,"maxLength":214}},"required":["ecosystem","name"]},"affected":{"type":"array","items":{"$ref":"#/components/schemas/AffectedVersions"},"maxItems":20},"severity":{"type":"string","enum":["critical","high","moderate","low","none","unknown"]},"severityRationale":{"type":"string","minLength":10,"maxLength":4000},"confidence":{"type":"string","enum":["high","medium","low","unassessed"]},"confidenceRationale":{"type":"string","minLength":10,"maxLength":4000},"mitigation":{"type":"string","maxLength":4000},"discoveryMethod":{"type":"string","minLength":3,"maxLength":1000},"reproduction":{"type":"string","maxLength":8000},"sources":{"type":"array","items":{"$ref":"#/components/schemas/SourceRef"},"minItems":1,"maxItems":50},"relatedAdvisories":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":50},"reason":{"type":"string","minLength":20,"maxLength":4000,"description":"Why. At least 20 characters."}},"required":["reason"]}}}},"responses":{"200":{"description":"Corrected","content":{"application/json":{"schema":{"type":"object","properties":{"finding":{"$ref":"#/components/schemas/FindingDetail"},"changed":{"type":"array","items":{"type":"string"}}},"required":["finding","changed"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/findings/{id}/events":{"get":{"tags":["Findings"],"summary":"A finding's append-only event history, with the hash chain checked","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":40,"example":"NMN-2026-0001"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Events","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/FindingEvent"}},"chain":{"$ref":"#/components/schemas/ChainVerification"}},"required":["events","chain"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/findings/{id}/transitions":{"post":{"tags":["Review"],"summary":"Change the verification state (reviewers)","description":"Allowed: candidate to in-review or withdrawn; in-review to reproduced, disputed, withdrawn or candidate; reproduced to confirmed, disputed or withdrawn; confirmed to resolved, disputed or withdrawn; disputed to in-review, withdrawn, or confirmed if it was confirmed before; resolved to disputed. Withdrawn is final. Reproduced needs a validator who is not the submitter.","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":40,"example":"NMN-2026-0001"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","enum":["candidate","in-review","reproduced","confirmed","disputed","resolved","withdrawn"]},"reason":{"type":"string","minLength":20,"maxLength":4000,"description":"Why. At least 20 characters."}},"required":["to","reason"]}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"type":"object","properties":{"finding":{"$ref":"#/components/schemas/FindingDetail"}},"required":["finding"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/findings/{id}/assign":{"post":{"tags":["Review"],"summary":"Assign a reviewer (reviewers)","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":40,"example":"NMN-2026-0001"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":["string","null"],"format":"uuid"},"reason":{"type":"string","maxLength":2000,"default":""}},"required":["userId"]}}}},"responses":{"200":{"description":"Assigned","content":{"application/json":{"schema":{"type":"object","properties":{"finding":{"$ref":"#/components/schemas/FindingDetail"}},"required":["finding"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/findings/{id}/sources":{"post":{"tags":["Review"],"summary":"Add a source (reviewers)","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":40,"example":"NMN-2026-0001"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"$ref":"#/components/schemas/SourceRef"},"reason":{"type":"string","maxLength":2000,"default":""}},"required":["source"]}}}},"responses":{"200":{"description":"Added","content":{"application/json":{"schema":{"type":"object","properties":{"finding":{"$ref":"#/components/schemas/FindingDetail"}},"required":["finding"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/findings/{id}/affected-systems":{"post":{"tags":["Review"],"summary":"Record a system that may be affected (reviewers)","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":40,"example":"NMN-2026-0001"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"repository":{"type":"string","maxLength":500,"format":"uri"},"commit":{"type":["string","null"],"pattern":"^[0-9a-f]{7,40}$/i","default":null},"evidence":{"type":"string","minLength":10,"maxLength":4000},"reason":{"type":"string","maxLength":2000,"default":""}},"required":["repository","evidence"]}}}},"responses":{"200":{"description":"Added","content":{"application/json":{"schema":{"type":"object","properties":{"finding":{"$ref":"#/components/schemas/FindingDetail"}},"required":["finding"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/findings/{id}/affected-systems/{systemId}/confirm":{"post":{"tags":["Review"],"summary":"Confirm an affected system with evidence (reviewers)","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":40,"example":"NMN-2026-0001"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":64},"required":true,"name":"systemId","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"evidence":{"type":"string","minLength":20,"maxLength":4000},"reason":{"type":"string","maxLength":2000,"default":""}},"required":["evidence"]}}}},"responses":{"200":{"description":"Confirmed","content":{"application/json":{"schema":{"type":"object","properties":{"finding":{"$ref":"#/components/schemas/FindingDetail"}},"required":["finding"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/findings/{id}/disclosure":{"post":{"tags":["Review"],"summary":"Change the disclosure state (reviewers)","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":40,"example":"NMN-2026-0001"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","enum":["public","embargoed","private"]},"embargoUntil":{"type":["string","null"],"format":"date-time","default":null},"reason":{"type":"string","minLength":20,"maxLength":4000,"description":"Why. At least 20 characters."}},"required":["to","reason"]}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"type":"object","properties":{"finding":{"$ref":"#/components/schemas/FindingDetail"}},"required":["finding"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/findings/{id}/comments":{"post":{"tags":["Review"],"summary":"Add a comment to the record (reviewers)","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":40,"example":"NMN-2026-0001"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":8000}},"required":["text"]}}}},"responses":{"200":{"description":"Added","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/FindingEvent"}},"chain":{"$ref":"#/components/schemas/ChainVerification"}},"required":["events","chain"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/submissions":{"post":{"tags":["Submissions"],"summary":"Submit a finding for review","description":"Automated checks run at once (missing evidence, likely duplicates, component in the catalogue) and are stored as a machine-generated note. A reviewer decides.","requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":5,"maxLength":300},"summary":{"type":"string","minLength":20,"maxLength":8000},"component":{"type":["object","null"],"properties":{"ecosystem":{"type":"string","enum":["npm","crates.io"]},"name":{"type":"string","minLength":1,"maxLength":214}},"default":null,"required":["ecosystem","name"]},"affectedVersions":{"type":"string","maxLength":1000,"default":""},"evidenceLinks":{"type":"array","items":{"type":"string","maxLength":2000,"format":"uri"},"maxItems":20,"default":[]},"reproduction":{"type":"string","maxLength":20000,"default":""},"suggestedSeverity":{"type":"string","enum":["critical","high","moderate","low","none","unknown"]},"disclosure":{"oneOf":[{"type":"object","properties":{"preference":{"type":"string","enum":["public-after-review"]}},"required":["preference"]},{"type":"object","properties":{"preference":{"type":"string","enum":["embargo"]},"until":{"type":"string","format":"date-time"}},"required":["preference","until"]}]},"attribution":{"type":"string","enum":["name","anonymous"]},"authorisedToShare":{"type":"boolean","enum":[true],"description":"Confirms you are authorised to share this information."}},"required":["title","summary","suggestedSeverity","disclosure","attribution","authorisedToShare"]}}}},"responses":{"201":{"description":"Received","content":{"application/json":{"schema":{"type":"object","properties":{"submission":{"$ref":"#/components/schemas/Submission"}},"required":["submission"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["Submissions"],"summary":"Your submissions","responses":{"200":{"description":"Submissions","content":{"application/json":{"schema":{"type":"object","properties":{"submissions":{"type":"array","items":{"$ref":"#/components/schemas/Submission"}}},"required":["submissions"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/submissions/{id}":{"get":{"tags":["Submissions"],"summary":"One of your submissions, with its status and the reasons given","description":"Includes the machine-generated notes (automated checks, and assisted triage labelled with its model and prompt version). Possible duplicates that point to records that are not public are left out.","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Submission","content":{"application/json":{"schema":{"type":"object","properties":{"submission":{"$ref":"#/components/schemas/Submission"},"notes":{"type":"array","items":{"$ref":"#/components/schemas/SubmissionNote"},"description":"Machine-generated notes only. Every one has `machineGenerated: true`."}},"required":["submission","notes"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/submissions/{id}/appeal":{"post":{"tags":["Submissions"],"summary":"Appeal a decline, once","description":"The appeal goes to the review queue. A different reviewer from the one who declined decides it.","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":20,"maxLength":8000}},"required":["text"]}}}},"responses":{"200":{"description":"Appealed","content":{"application/json":{"schema":{"type":"object","properties":{"submission":{"$ref":"#/components/schemas/Submission"}},"required":["submission"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/review/queue":{"get":{"tags":["Review"],"summary":"What needs a reviewer","description":"Submissions awaiting triage, open appeals, findings in review, findings whose source advisory changed or was withdrawn, and embargoes past their date. Each group holds at most 100 records, oldest first unless `order` says otherwise; `totals` gives the full count of each group.","parameters":[{"schema":{"type":"string","enum":["oldest","newest"],"default":"oldest","description":"Which end of each group to return when it holds more than 100 records."},"required":false,"description":"Which end of each group to return when it holds more than 100 records.","name":"order","in":"query"}],"responses":{"200":{"description":"Queue","content":{"application/json":{"schema":{"type":"object","properties":{"submissions":{"type":"array","items":{"$ref":"#/components/schemas/Submission"}},"appeals":{"type":"array","items":{"$ref":"#/components/schemas/Submission"}},"findingsInReview":{"type":"array","items":{"$ref":"#/components/schemas/Finding"}},"sourceChanged":{"type":"array","items":{"$ref":"#/components/schemas/Finding"}},"embargoesDue":{"type":"array","items":{"$ref":"#/components/schemas/Finding"}},"totals":{"type":"object","properties":{"submissions":{"type":"integer"},"appeals":{"type":"integer"},"findingsInReview":{"type":"integer"},"sourceChanged":{"type":"integer"},"embargoesDue":{"type":"integer"}},"required":["submissions","appeals","findingsInReview","sourceChanged","embargoesDue"]}},"required":["submissions","appeals","findingsInReview","sourceChanged","embargoesDue","totals"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/review/submissions/{id}":{"get":{"tags":["Review"],"summary":"A submission with all notes (reviewers)","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Submission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewSubmission"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/review/submissions/{id}/claim":{"post":{"tags":["Review"],"summary":"Start triage of a submission (reviewers)","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"In triage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewSubmission"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/review/submissions/{id}/triage":{"post":{"tags":["Review"],"summary":"Draft an assisted triage note (reviewers)","description":"Runs only when ANTHROPIC_API_KEY is set; otherwise answers 503 not_configured. The note is labelled machine-generated with the model id and prompt version. It never changes the status.","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Triage note added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewSubmission"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream source failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"This feature is not configured on this deployment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/review/submissions/{id}/accept":{"post":{"tags":["Review"],"summary":"Accept a submission as a candidate finding (reviewers)","description":"Attribution follows the submitter preference. Evidence links become sources; add more if there are none.","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"string","enum":["vulnerability","weak-algorithm","misuse","deprecated-component","quantum-exposure","supply-chain","other"]},"severity":{"type":"string","enum":["critical","high","moderate","low","none","unknown"]},"severityRationale":{"type":"string","minLength":10,"maxLength":4000},"confidence":{"type":"string","enum":["high","medium","low","unassessed"]},"confidenceRationale":{"type":"string","minLength":10,"maxLength":4000},"mitigation":{"type":"string","maxLength":4000,"default":""},"disclosure":{"type":"string","enum":["public","embargoed","private"],"description":"Defaults to the submitter preference: public, or embargoed until their date."},"extraSources":{"type":"array","items":{"$ref":"#/components/schemas/SourceRef"},"maxItems":20,"default":[]},"reason":{"type":"string","minLength":20,"maxLength":4000}},"required":["category","severity","severityRationale","confidence","confidenceRationale","reason"]}}}},"responses":{"200":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","properties":{"submission":{"$ref":"#/components/schemas/Submission"},"findingId":{"type":"string"}},"required":["submission","findingId"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/review/submissions/{id}/decline":{"post":{"tags":["Review"],"summary":"Decline a submission with a reason the submitter can read (reviewers)","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":20,"maxLength":4000}},"required":["reason"]}}}},"responses":{"200":{"description":"Declined","content":{"application/json":{"schema":{"type":"object","properties":{"submission":{"$ref":"#/components/schemas/Submission"}},"required":["submission"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/review/submissions/{id}/duplicate":{"post":{"tags":["Review"],"summary":"Mark a submission as a duplicate of a finding (reviewers)","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"findingId":{"type":"string","maxLength":40},"reason":{"type":"string","minLength":20,"maxLength":4000}},"required":["findingId","reason"]}}}},"responses":{"200":{"description":"Marked","content":{"application/json":{"schema":{"type":"object","properties":{"submission":{"$ref":"#/components/schemas/Submission"}},"required":["submission"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/review/submissions/{id}/appeal-decision":{"post":{"tags":["Review"],"summary":"Decide an appeal (a different reviewer from the one who declined)","description":"Overturning moves the submission back into triage so it can be accepted.","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["upheld","overturned"]},"reason":{"type":"string","minLength":20,"maxLength":4000}},"required":["outcome","reason"]}}}},"responses":{"200":{"description":"Decided","content":{"application/json":{"schema":{"type":"object","properties":{"submission":{"$ref":"#/components/schemas/Submission"}},"required":["submission"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/review/reviewers":{"get":{"tags":["Review"],"summary":"Reviewers and admins, to assign findings to (reviewers)","description":"Id and display name only.","responses":{"200":{"description":"Reviewers","content":{"application/json":{"schema":{"type":"object","properties":{"reviewers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"role":{"type":"string","enum":["reviewer","admin"]}},"required":["id","name","role"]}}},"required":["reviewers"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/scans":{"post":{"tags":["Scans"],"summary":"Scan uploaded files or a public GitHub repository","description":"Anonymous scans are allowed with tight rate limits, are unlisted and expire after 30 days. Signed-in and API key scans are saved to a workspace.","requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ScanUpload"},{"$ref":"#/components/schemas/ScanRepository"}]}}}},"responses":{"201":{"description":"Scanned","content":{"application/json":{"schema":{"type":"object","properties":{"scan":{"$ref":"#/components/schemas/ScanMeta"},"report":{"$ref":"#/components/schemas/ScanReport"},"ignoredFiles":{"type":"array","items":{"type":"string"}}},"required":["scan","report","ignoredFiles"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream source failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/scans/{id}":{"get":{"tags":["Scans"],"summary":"Read a scan report, or export it","description":"Anyone with the id of an unlisted scan can read it. A private workspace scan needs membership. `format` returns Markdown, CycloneDX 1.6 JSON (cryptographic bill of materials) or a short text summary, each as a download.","parameters":[{"schema":{"type":"string","maxLength":40},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["json","markdown","cyclonedx","text"],"default":"json"},"required":false,"name":"format","in":"query"}],"responses":{"200":{"description":"The report","content":{"application/json":{"schema":{"type":"object","properties":{"scan":{"$ref":"#/components/schemas/ScanMeta"},"report":{"$ref":"#/components/schemas/ScanReport"}},"required":["scan","report"]}},"text/markdown":{"schema":{"type":"string"}},"application/vnd.cyclonedx+json":{"schema":{"type":"object","additionalProperties":{}}},"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{workspaceId}/scans":{"get":{"tags":["Scans"],"summary":"A workspace's saved scans","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page (1 to 100)."},"required":false,"description":"Items per page (1 to 100).","name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0,"description":"Items to skip."},"required":false,"description":"Items to skip.","name":"offset","in":"query"}],"responses":{"200":{"description":"Scans","content":{"application/json":{"schema":{"type":"object","properties":{"scans":{"type":"array","items":{"$ref":"#/components/schemas/ScanMeta"}}},"required":["scans"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{workspaceId}/scans/{scanId}":{"delete":{"tags":["Scans"],"summary":"Delete a saved scan","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string","maxLength":40},"required":true,"name":"scanId","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Scans"],"summary":"Change who can open a saved scan","description":"`private`: workspace members only. `unlisted`: anyone with the link. Making a scan private takes effect at once for every link already shared.","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string","maxLength":40},"required":true,"name":"scanId","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"visibility":{"type":"string","enum":["private","unlisted"]}},"required":["visibility"]}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"scan":{"$ref":"#/components/schemas/ScanMeta"}},"required":["scan"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{workspaceId}/monitors":{"get":{"tags":["Monitors"],"summary":"A workspace's monitored repositories","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"}],"responses":{"200":{"description":"Monitors","content":{"application/json":{"schema":{"type":"object","properties":{"monitors":{"type":"array","items":{"$ref":"#/components/schemas/Monitor"}},"limit":{"type":"integer"}},"required":["monitors","limit"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Monitors"],"summary":"Monitor a public GitHub repository","description":"Rescanned once a day; changes are stored and alerted. Current limit: 10 monitors per workspace.","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"repository":{"type":"string","maxLength":400},"branch":{"type":"string","maxLength":200,"description":"Defaults to the default branch."}},"required":["repository"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"monitor":{"$ref":"#/components/schemas/Monitor"}},"required":["monitor"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream source failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{workspaceId}/monitors/{monitorId}":{"get":{"tags":["Monitors"],"summary":"One monitor","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"monitorId","in":"path"}],"responses":{"200":{"description":"Monitor","content":{"application/json":{"schema":{"type":"object","properties":{"monitor":{"$ref":"#/components/schemas/Monitor"}},"required":["monitor"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Monitors"],"summary":"Pause or resume a monitor","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"monitorId","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","paused"]}},"required":["status"]}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"monitor":{"$ref":"#/components/schemas/Monitor"}},"required":["monitor"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Monitors"],"summary":"Delete a monitor with its runs and changes","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"monitorId","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{workspaceId}/monitors/{monitorId}/run":{"post":{"tags":["Monitors"],"summary":"Run a monitor now","description":"Rate limited per workspace member or key. Downloads the branch head and compares with the previous run.","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"monitorId","in":"path"}],"responses":{"200":{"description":"Run finished","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"$ref":"#/components/schemas/MonitorRun"}},"required":["run"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{workspaceId}/monitors/{monitorId}/runs":{"get":{"tags":["Monitors"],"summary":"A monitor's runs, newest first","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"monitorId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page (1 to 100)."},"required":false,"description":"Items per page (1 to 100).","name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0,"description":"Items to skip."},"required":false,"description":"Items to skip.","name":"offset","in":"query"}],"responses":{"200":{"description":"Runs","content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/MonitorRun"}}},"required":["runs"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{workspaceId}/monitors/{monitorId}/changes":{"get":{"tags":["Monitors"],"summary":"Changes found between runs, newest first","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"monitorId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page (1 to 100)."},"required":false,"description":"Items per page (1 to 100).","name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0,"description":"Items to skip."},"required":false,"description":"Items to skip.","name":"offset","in":"query"}],"responses":{"200":{"description":"Changes","content":{"application/json":{"schema":{"type":"object","properties":{"changes":{"type":"array","items":{"$ref":"#/components/schemas/MonitorChange"}}},"required":["changes"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{workspaceId}/alerts":{"get":{"tags":["Monitors"],"summary":"A workspace's alerts, with what happened to the email for each","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page (1 to 100)."},"required":false,"description":"Items per page (1 to 100).","name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0,"description":"Items to skip."},"required":false,"description":"Items to skip.","name":"offset","in":"query"}],"responses":{"200":{"description":"Alerts","content":{"application/json":{"schema":{"type":"object","properties":{"alerts":{"type":"array","items":{"$ref":"#/components/schemas/Alert"}}},"required":["alerts"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{workspaceId}/webhooks":{"get":{"tags":["Webhooks"],"summary":"A workspace's webhooks","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"}],"responses":{"200":{"description":"Webhooks","content":{"application/json":{"schema":{"type":"object","properties":{"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}},"required":["webhooks"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Webhooks"],"summary":"Add a webhook","description":"https only. The host must resolve to public addresses; private, loopback, link-local and metadata ranges are refused here and again at each delivery. The signing secret is in this response only. Deliveries carry `Noumen-Signature: t=<unix>,v1=<hex HMAC-SHA256 of \"t.body\">`. Failed deliveries are retried on later job runs, up to 5 attempts; then the endpoint is marked failing.","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2000},"events":{"type":"array","items":{"type":"string","enum":["monitor.changed","advisory.matched","finding.state_changed","ping"]},"minItems":1,"maxItems":4}},"required":["url","events"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/Webhook"},"secret":{"type":"string"}},"required":["webhook","secret"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{workspaceId}/webhooks/{webhookId}":{"patch":{"tags":["Webhooks"],"summary":"Change subscribed events, pause or resume, or reactivate a failing webhook","description":"`status: \"disabled\"` pauses the webhook: events are recorded as skipped deliveries and pending retries are skipped. `status: \"active\"` (or `reactivate: true`) resumes it and clears the failure count.","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"webhookId","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"string","enum":["monitor.changed","advisory.matched","finding.state_changed","ping"]},"minItems":1,"maxItems":4},"reactivate":{"type":"boolean"},"status":{"type":"string","enum":["active","disabled"]}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/Webhook"}},"required":["webhook"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete a webhook and its delivery log","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"webhookId","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{workspaceId}/webhooks/{webhookId}/test":{"post":{"tags":["Webhooks"],"summary":"Send a signed ping","description":"Answers 409 while the webhook is disabled.","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"webhookId","in":"path"}],"responses":{"200":{"description":"Sent","content":{"application/json":{"schema":{"type":"object","properties":{"deliveryId":{"type":"string","format":"uuid"},"outcome":{"type":"string","enum":["succeeded","retry","failed"]}},"required":["deliveryId","outcome"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{workspaceId}/webhooks/{webhookId}/deliveries":{"get":{"tags":["Webhooks"],"summary":"Recent deliveries with each attempt","description":"Up to 5 attempts per delivery.","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"webhookId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page (1 to 100)."},"required":false,"description":"Items per page (1 to 100).","name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0,"description":"Items to skip."},"required":false,"description":"Items to skip.","name":"offset","in":"query"}],"responses":{"200":{"description":"Deliveries","content":{"application/json":{"schema":{"type":"object","properties":{"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}},"required":["deliveries"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/applications":{"post":{"tags":["Join"],"summary":"Apply to join as a researcher, validator, developer, protocol or partner","description":"Stored for Noumen admins to read. Nothing is shared with anyone else.","requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"responses":{"202":{"description":"Received","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["ok","message"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/users":{"get":{"tags":["Admin"],"summary":"List users (admins)","parameters":[{"schema":{"type":"string","enum":["member","researcher","reviewer","admin"]},"required":false,"name":"role","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page (1 to 100)."},"required":false,"description":"Items per page (1 to 100).","name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0,"description":"Items to skip."},"required":false,"description":"Items to skip.","name":"offset","in":"query"}],"responses":{"200":{"description":"Users","content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/AdminUser"}},"page":{"$ref":"#/components/schemas/PageInfo"}},"required":["users","page"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/users/{userId}/role":{"patch":{"tags":["Admin"],"summary":"Change a user's role (admins). Recorded in the audit log.","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"userId","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["member","researcher","reviewer","admin"]}},"required":["role"]}}}},"responses":{"200":{"description":"Changed","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/AdminUser"}},"required":["user"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/applications":{"get":{"tags":["Admin"],"summary":"Applications to join (admins)","parameters":[{"schema":{"type":"string","enum":["new","reviewing","accepted","declined","closed"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page (1 to 100)."},"required":false,"description":"Items per page (1 to 100).","name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0,"description":"Items to skip."},"required":false,"description":"Items to skip.","name":"offset","in":"query"}],"responses":{"200":{"description":"Applications","content":{"application/json":{"schema":{"type":"object","properties":{"applications":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationRecord"}},"page":{"$ref":"#/components/schemas/PageInfo"}},"required":["applications","page"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/applications/{id}":{"patch":{"tags":["Admin"],"summary":"Set the status of an application, with a note (admins)","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"description":"Request body","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["new","reviewing","accepted","declined","closed"]},"note":{"type":"string","maxLength":4000}},"required":["status"]}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"application":{"$ref":"#/components/schemas/ApplicationRecord"}},"required":["application"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete an application (admins). Recorded in the audit log.","description":"For deletion requests. Applications are also deleted automatically 24 months after they arrive.","parameters":[{"schema":{"type":"string","maxLength":64,"format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not visible to this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/findings/verify-chains":{"post":{"tags":["Admin"],"summary":"Recompute every finding's event hash chain (admins)","responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","properties":{"checked":{"type":"integer"},"broken":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"integer"},"problem":{"type":"string"}},"required":["id","seq","problem"]}}},"required":["checked","broken"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/jobs":{"get":{"tags":["Admin"],"summary":"Recent job runs (admins)","parameters":[{"schema":{"type":"string","enum":["advisory-monitor","monitor-rescan","webhook-retry","cleanup"]},"required":false,"name":"job","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page (1 to 100)."},"required":false,"description":"Items per page (1 to 100).","name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0,"description":"Items to skip."},"required":false,"description":"Items to skip.","name":"offset","in":"query"}],"responses":{"200":{"description":"Runs","content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/JobRun"}}},"required":["runs"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/jobs/{job}/run":{"post":{"tags":["Admin"],"summary":"Run one job now (admins)","parameters":[{"schema":{"type":"string","enum":["advisory-monitor","monitor-rescan","webhook-retry","cleanup"]},"required":true,"name":"job","in":"path"}],"responses":{"200":{"description":"Ran","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["succeeded","partial","failed","skipped"]},"stats":{"type":"object","additionalProperties":{}},"labels":{"type":"object","additionalProperties":{"type":"string"}}},"required":["status","stats","labels"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/advisory-sync":{"get":{"tags":["Admin"],"summary":"Advisory sync status per catalogued package (admins)","responses":{"200":{"description":"Status","content":{"application/json":{"schema":{"type":"object","properties":{"packages":{"type":"array","items":{"type":"object","properties":{"ecosystem":{"type":"string"},"name":{"type":"string"},"lastSyncedAt":{"type":["string","null"],"description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"lastAttemptAt":{"type":["string","null"],"description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"},"lastError":{"type":["string","null"]},"advisories":{"type":"integer"}},"required":["ecosystem","name","lastSyncedAt","lastAttemptAt","lastError","advisories"]}},"cataloguePackages":{"type":"integer","description":"Packages in the catalogue: the total the sync works through."},"lastRun":{"allOf":[{"$ref":"#/components/schemas/JobRun"},{"type":["object","null"]}]}},"required":["packages","cataloguePackages","lastRun"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/audit-log":{"get":{"tags":["Admin"],"summary":"Admin and reviewer actions (admins)","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page (1 to 100)."},"required":false,"description":"Items per page (1 to 100).","name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0,"description":"Items to skip."},"required":false,"description":"Items to skip.","name":"offset","in":"query"}],"responses":{"200":{"description":"Entries","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"actorUserId":{"type":["string","null"]},"actorRole":{"type":"string"},"action":{"type":"string"},"target":{"type":"string"},"detail":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","description":"ISO-8601 UTC timestamp.","example":"2026-12-03T12:00:00.000Z"}},"required":["id","actorUserId","actorRole","action","target","detail","createdAt"]}}},"required":["entries"]}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/internal/cron/daily":{"get":{"tags":["Operations"],"summary":"Run the daily jobs","description":"Guarded by `Authorization: Bearer <CRON_SECRET>` (Vercel Cron sends this). Runs the Advisory Monitor, monitor rescans, webhook retries and cleanup within a time budget. Each job takes an advisory lock and records a run. Safe to rerun.","security":[{"cronSecret":[]}],"responses":{"200":{"description":"Jobs ran","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyJobs"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"This feature is not configured on this deployment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Operations"],"summary":"Run the daily jobs","description":"Guarded by `Authorization: Bearer <CRON_SECRET>` (Vercel Cron sends this). Runs the Advisory Monitor, monitor rescans, webhook retries and cleanup within a time budget. Each job takes an advisory lock and records a run. Safe to rerun.","security":[{"cronSecret":[]}],"responses":{"200":{"description":"Jobs ran","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyJobs"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in or send an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"This feature is not configured on this deployment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{}}