{"openapi":"3.1.0","info":{"title":"Hera API","version":"1.0.0","description":"KYT, AML screening and Travel Rule for Stellar and EVM chains. Every error is `{ error: { code, message, fields? } }`. Every response carries an `x-request-id` header. All timestamps are ISO 8601 UTC."},"servers":[{"url":"https://api.heralayer.com","description":"Production"},{"url":"http://localhost:4000","description":"Local development"}],"tags":[{"name":"System"},{"name":"Auth"},{"name":"Team"},{"name":"Screening"},{"name":"Wallets"},{"name":"Alerts"},{"name":"Travel Rule"},{"name":"API keys"},{"name":"Audit"},{"name":"Overview"},{"name":"Webhooks"},{"name":"Reports"}],"components":{"securitySchemes":{"sessionCookie":{"type":"apiKey","in":"cookie","name":"hera_session","description":"Dashboard session from POST /v1/auth/login or /signup. Mutations must send `Content-Type: application/json` (CSRF defence). Roles: viewer < analyst < admin < owner; each operation lists its minimum in `x-hera-min-role`."},"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"hera_live_<prefix>_<secret>","description":"API key as `Authorization: Bearer hera_live_…`. Keys carry scopes (read, screen, monitor, travel_rule); the scope an operation needs is listed in its security requirement and in `x-hera-api-key-scope`. Keys get 403 on every route without a scope."}},"schemas":{"ApiErrorBody":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"fields":{"type":"object","additionalProperties":{"type":"string"},"description":"Field path → first message, on 422 validation_failed."}},"required":["code","message"]}},"required":["error"],"description":"Every error, whatever the status, has this shape."},"OkResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]},"ChainId":{"type":"string","pattern":"^(stellar|evm:\\d+)$","example":"evm:1"},"SubjectRef":{"anyOf":[{"type":"object","properties":{"chain":{"type":"string","enum":["stellar"]},"account":{"type":"string","description":"Base G… account."},"sub":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["muxed"]},"id":{"type":"string","description":"uint64 as a decimal string"},"muxed":{"type":"string"}},"required":["kind","id","muxed"]},{"type":"object","properties":{"kind":{"type":"string","enum":["memo"]},"type":{"type":"string","enum":["id","text","hash"]},"value":{"type":"string"}},"required":["kind","type","value"]}]}},"required":["chain","account"]},{"type":"object","properties":{"chain":{"type":"string","pattern":"^evm:\\d+$"},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},"required":["chain","address"]}]},"UserDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"emailVerified":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"}},"required":["id","name","email","emailVerified","createdAt"]},"OrgDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"plan":{"type":"string","enum":["developer","enterprise"]},"createdAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"}},"required":["id","name","plan","createdAt"]},"MeResponse":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/UserDto"},"org":{"$ref":"#/components/schemas/OrgDto"},"role":{"type":"string","enum":["owner","admin","analyst","viewer"]}},"required":["user","org","role"]},"MemberDto":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","analyst","viewer"]},"joinedAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"}},"required":["userId","name","email","role","joinedAt"]},"OrgDetailResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"plan":{"type":"string","enum":["developer","enterprise"]},"createdAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"},"members":{"type":"array","items":{"$ref":"#/components/schemas/MemberDto"}}},"required":["id","name","plan","createdAt","members"]},"MembershipDto":{"type":"object","properties":{"orgId":{"type":"string","format":"uuid"},"orgName":{"type":"string"},"plan":{"type":"string","enum":["developer","enterprise"]},"role":{"type":"string","enum":["owner","admin","analyst","viewer"]}},"required":["orgId","orgName","plan","role"]},"InviteDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","analyst","viewer"]},"invitedBy":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"},"acceptedAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"},"revokedAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"}},"required":["id","email","role","invitedBy","expiresAt","createdAt"]},"InviteLookupResponse":{"type":"object","properties":{"email":{"type":"string"},"orgName":{"type":"string"},"role":{"type":"string","enum":["owner","admin","analyst","viewer"]},"invitedBy":{"type":"string"},"existingUser":{"type":"boolean"},"expired":{"type":"boolean"}},"required":["email","orgName","role","invitedBy","existingUser","expired"]},"ChainDto":{"type":"object","properties":{"id":{"type":"string","pattern":"^(stellar|evm:\\d+)$"},"name":{"type":"string"},"family":{"type":"string","enum":["stellar","evm"]},"nativeSymbol":{"type":"string"},"live":{"type":"boolean"}},"required":["id","name","family","nativeSymbol","live"]},"Label":{"type":"object","properties":{"chain":{"type":"string","pattern":"^(stellar|evm:\\d+)$"},"address":{"type":"string"},"category":{"type":"string","enum":["sanctions","terrorist_financing","stolen_funds","ransomware","darknet","mixer","scam","gambling","high_risk_exchange","bridge","exchange","anchor","issuer","defi"]},"entity":{"type":"string"},"source":{"type":"string","description":"Provenance. Every label must be explainable."},"sourceUrl":{"type":"string"},"confidence":{"type":"number","minimum":0,"maximum":1},"addedAt":{"type":"string"},"note":{"type":"string"}},"required":["chain","address","category","entity","source","confidence","addedAt"]},"Reason":{"type":"object","properties":{"code":{"type":"string","enum":["SANCTIONS_DIRECT","CATEGORY_DIRECT","KNOWN_ENTITY","COUNTERPARTY_EXPOSURE","FRESH_ACCOUNT","HIGH_VELOCITY","RAPID_IN_OUT","STRUCTURING","SHARED_ACCOUNT_NO_SUBACCOUNT","SUBACCOUNT_RESOLVED","UNVERIFIED_HOME_DOMAIN","CLAWBACK_ENABLED","NO_HISTORY","SMART_CONTRACT","EIP7702_DELEGATED","FAILED_RISKY_ATTEMPT","CHAIN_DATA_PARTIAL"]},"points":{"type":"number"},"severity":{"type":"string","enum":["info","low","medium","high","critical"]},"title":{"type":"string"},"detail":{"type":"string"},"evidence":{"type":"object","properties":{"label":{"$ref":"#/components/schemas/Label"},"txHashes":{"type":"array","items":{"type":"string"}},"counterparty":{"type":"string"}}}},"required":["code","points","severity","title","detail"]},"Transfer":{"type":"object","properties":{"id":{"type":"string"},"chain":{"type":"string","pattern":"^(stellar|evm:\\d+)$"},"txHash":{"type":"string"},"timestamp":{"type":"string"},"kind":{"type":"string","enum":["payment","path_payment","create_account","merge","native","erc20","erc721","erc1155","claim"]},"from":{"type":"object","properties":{"address":{"type":"string"},"muxedId":{"type":"string"}},"required":["address"]},"to":{"type":"object","properties":{"address":{"type":"string"},"muxedId":{"type":"string"}},"required":["address"]},"asset":{"type":"object","properties":{"code":{"type":"string"},"issuer":{"type":"string"},"decimals":{"type":"integer"}},"required":["code","decimals"]},"amount":{"type":"string","description":"Decimal string, never a float."},"memo":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}},"required":["type","value"]},"successful":{"type":"boolean"},"sourceAsset":{"type":"object","properties":{"code":{"type":"string"},"issuer":{"type":"string"},"decimals":{"type":"integer"}},"required":["code","decimals"],"description":"Path payments: what the sender actually spent."},"sourceAmount":{"type":"string"}},"required":["id","chain","txHash","timestamp","kind","from","to","asset","amount","successful"]},"CounterpartySummary":{"type":"object","properties":{"address":{"type":"string"},"muxedId":{"type":"string"},"inbound":{"type":"number"},"outbound":{"type":"number"},"labels":{"type":"array","items":{"$ref":"#/components/schemas/Label"}}},"required":["address","inbound","outbound","labels"]},"SubjectProfile":{"type":"object","properties":{"exists":{"type":"boolean"},"createdAt":{"type":"string"},"firstSeen":{"type":"string"},"observedTransfers":{"type":"number"},"fullHistory":{"type":"boolean"},"nativeBalance":{"type":"string"},"homeDomain":{"type":"string"},"toml":{"type":"object","properties":{"domain":{"type":"string"},"orgName":{"type":"string"},"status":{"type":"string","enum":["verified","unlisted","unavailable"]},"signingKey":{"type":"string"},"seps":{"type":"array","items":{"type":"string"}}},"required":["domain","status","seps"]},"flags":{"type":"object","properties":{"authRequired":{"type":"boolean"},"authRevocable":{"type":"boolean"},"clawbackEnabled":{"type":"boolean"}},"required":["authRequired","authRevocable","clawbackEnabled"]},"sharedAccountRatio":{"type":"number"},"isContract":{"type":"boolean"},"delegatedTo":{"type":"string","description":"EIP-7702: the contract this EOA delegates its code to."},"ensName":{"type":"string"},"dataStatus":{"type":"string","enum":["complete","partial","unavailable"],"description":"partial/unavailable: some chain sources timed out; the score uses what arrived (labels always apply)."},"window":{"type":"object","properties":{"pages":{"type":"object","additionalProperties":{"type":"number"}},"records":{"type":"number"},"truncatedBy":{"type":"string","enum":["page_budget","deadline","error"]},"missing":{"type":"array","items":{"type":"string"},"description":"Sources that didn't answer in time."},"claimsResolved":{"type":"number"},"claimsSkipped":{"type":"number"},"oldest":{"type":"string"}},"required":["pages","records"],"description":"What the adapter actually read."}},"required":["exists","observedTransfers","fullHistory"]},"ScreeningResponse":{"type":"object","properties":{"subject":{"$ref":"#/components/schemas/SubjectRef"},"display":{"type":"string"},"score":{"type":"integer","minimum":0,"maximum":100},"band":{"type":"string","enum":["low","medium","high","severe"]},"decision":{"type":"string","enum":["allow","review","block"]},"reasons":{"type":"array","items":{"$ref":"#/components/schemas/Reason"}},"profile":{"$ref":"#/components/schemas/SubjectProfile"},"counterparties":{"type":"array","items":{"$ref":"#/components/schemas/CounterpartySummary"}},"transfers":{"type":"array","items":{"$ref":"#/components/schemas/Transfer"}},"stats":{"type":"object","properties":{"transfers":{"type":"number"},"inbound":{"type":"number"},"outbound":{"type":"number"},"dustFiltered":{"type":"number"},"failed":{"type":"number"},"firstSeen":{"type":"string"},"lastSeen":{"type":"string"}},"required":["transfers","inbound","outbound","dustFiltered"]},"screenedAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"},"engineVersion":{"type":"string"},"id":{"type":"string","format":"uuid"}},"required":["subject","display","score","band","decision","reasons","profile","counterparties","transfers","stats","screenedAt","engineVersion","id"]},"ScreeningSummaryDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"chain":{"type":"string","pattern":"^(stellar|evm:\\d+)$"},"display":{"type":"string"},"score":{"type":"integer"},"band":{"type":"string","enum":["low","medium","high","severe"]},"decision":{"type":"string","enum":["allow","review","block"]},"topReason":{"type":"string"},"createdAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"}},"required":["id","chain","display","score","band","decision","createdAt"]},"PaginatedScreeningSummary":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ScreeningSummaryDto"}},"total":{"type":"integer"}},"required":["items","total"]},"WalletDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"chain":{"type":"string","pattern":"^(stellar|evm:\\d+)$"},"subject":{"$ref":"#/components/schemas/SubjectRef"},"display":{"type":"string"},"label":{"type":"string"},"customerRef":{"type":"string"},"lastScore":{"type":"integer"},"lastBand":{"type":"string","enum":["low","medium","high","severe"]},"lastCheckedAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"},"lastActivityAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"}},"required":["id","chain","subject","display","label","createdAt"]},"AlertNoteDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"author":{"type":"string"},"body":{"type":"string"},"createdAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"}},"required":["id","author","body","createdAt"]},"AlertDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"walletId":{"type":"string","format":"uuid"},"walletLabel":{"type":"string"},"chain":{"type":"string","pattern":"^(stellar|evm:\\d+)$"},"subjectDisplay":{"type":"string"},"reasonCode":{"type":"string","enum":["SANCTIONS_DIRECT","CATEGORY_DIRECT","KNOWN_ENTITY","COUNTERPARTY_EXPOSURE","FRESH_ACCOUNT","HIGH_VELOCITY","RAPID_IN_OUT","STRUCTURING","SHARED_ACCOUNT_NO_SUBACCOUNT","SUBACCOUNT_RESOLVED","UNVERIFIED_HOME_DOMAIN","CLAWBACK_ENABLED","NO_HISTORY","SMART_CONTRACT","EIP7702_DELEGATED","FAILED_RISKY_ATTEMPT","CHAIN_DATA_PARTIAL"]},"title":{"type":"string"},"detail":{"type":"string"},"severity":{"type":"string","enum":["low","medium","high","critical"]},"status":{"type":"string","enum":["open","in_review","escalated","closed"]},"disposition":{"type":"string","enum":["true_positive","false_positive"]},"score":{"type":"integer"},"txHash":{"type":"string"},"notes":{"type":"array","items":{"$ref":"#/components/schemas/AlertNoteDto"}},"createdAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"}},"required":["id","chain","subjectDisplay","reasonCode","title","detail","severity","status","score","notes","createdAt","updatedAt"]},"IvmsPerson":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["natural"]},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"type":"string"},"placeOfBirth":{"type":"string"},"nationalId":{"type":"string"},"customerId":{"type":"string"},"address":{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2}}}},"required":["type","firstName","lastName"]},{"type":"object","properties":{"type":{"type":"string","enum":["legal"]},"legalName":{"type":"string","minLength":1},"lei":{"anyOf":[{"type":"string","pattern":"^[A-Z0-9]{18}\\d{2}$"},{"type":"string","enum":[""]}]},"customerId":{"type":"string"},"address":{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2}}}},"required":["type","legalName"]}]},"TravelRuleCheck":{"type":"object","properties":{"required":{"type":"boolean"},"thresholdUsd":{"type":"number"},"unhostedProofRequired":{"type":"boolean"},"explanation":{"type":"string"}},"required":["required","thresholdUsd","unhostedProofRequired","explanation"]},"TravelRuleEventDto":{"type":"object","properties":{"status":{"type":"string","enum":["draft","awaiting_counterparty","acknowledged","accepted","rejected","unhosted_verification","settled"]},"note":{"type":"string"},"actor":{"type":"string"},"at":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"}},"required":["status","actor","at"]},"TravelRuleTransferDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"reference":{"type":"string","example":"TR-7F3K2Q"},"direction":{"type":"string","enum":["outgoing","incoming"]},"chain":{"type":"string","pattern":"^(stellar|evm:\\d+)$"},"asset":{"type":"string"},"amount":{"type":"string"},"amountUsd":{"type":"number"},"txHash":{"type":"string"},"jurisdiction":{"type":"string"},"originator":{"$ref":"#/components/schemas/IvmsPerson"},"originatorAccount":{"$ref":"#/components/schemas/SubjectRef"},"beneficiary":{"$ref":"#/components/schemas/IvmsPerson"},"beneficiaryAccount":{"$ref":"#/components/schemas/SubjectRef"},"beneficiaryVasp":{"type":["object","null"],"properties":{"name":{"type":"string"},"lei":{"type":"string"},"domain":{"type":"string"}},"required":["name"]},"status":{"type":"string","enum":["draft","awaiting_counterparty","acknowledged","accepted","rejected","unhosted_verification","settled"]},"check":{"$ref":"#/components/schemas/TravelRuleCheck"},"events":{"type":"array","items":{"$ref":"#/components/schemas/TravelRuleEventDto"}},"createdAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"}},"required":["id","reference","direction","chain","asset","amount","amountUsd","jurisdiction","originator","originatorAccount","beneficiary","beneficiaryAccount","beneficiaryVasp","status","check","events","createdAt","updatedAt"]},"ApiKeyDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"prefix":{"type":"string","example":"hera_live_ab12cd34"},"scopes":{"type":"array","items":{"type":"string","enum":["read","screen","monitor","travel_rule"]}},"createdAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"},"lastUsedAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"},"revokedAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"}},"required":["id","name","prefix","scopes","createdAt"]},"CreateApiKeyResponse":{"type":"object","properties":{"key":{"$ref":"#/components/schemas/ApiKeyDto"},"secret":{"type":"string","description":"Shown exactly once."}},"required":["key","secret"]},"AuditEventDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"seq":{"type":"integer"},"actor":{"type":"string"},"action":{"type":"string"},"target":{"type":"string"},"metadata":{"type":"object","additionalProperties":{}},"hash":{"type":"string"},"prevHash":{"type":"string"},"createdAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"}},"required":["id","seq","actor","action","metadata","hash","prevHash","createdAt"]},"AuditVerifyResponse":{"type":"object","properties":{"valid":{"type":"boolean"},"checked":{"type":"integer"},"brokenAt":{"type":"integer"}},"required":["valid","checked"]},"OverviewResponse":{"type":"object","properties":{"screenings24h":{"type":"integer"},"screeningsTotal":{"type":"integer"},"openAlerts":{"type":"integer"},"watchedWallets":{"type":"integer"},"travelRuleOpen":{"type":"integer"},"bandMix":{"type":"object","properties":{"low":{"type":"number"},"medium":{"type":"number"},"high":{"type":"number"},"severe":{"type":"number"}},"required":["low","medium","high","severe"]},"daily":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"screenings":{"type":"number"},"flagged":{"type":"number"}},"required":["date","screenings","flagged"]}},"recentScreenings":{"type":"array","items":{"$ref":"#/components/schemas/ScreeningSummaryDto"}},"recentAlerts":{"type":"array","items":{"$ref":"#/components/schemas/AlertDto"}}},"required":["screenings24h","screeningsTotal","openAlerts","watchedWallets","travelRuleOpen","bandMix","daily","recentScreenings","recentAlerts"]},"WebhookEndpointDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["screening.completed","alert.created","alert.updated","wallet.activity","travel_rule.updated","report.ready"]}},"description":{"type":"string"},"enabled":{"type":"boolean"},"secretPrefix":{"type":"string","example":"whsec_Ab12Cd"},"failureCount":{"type":"integer","description":"Consecutive failed delivery attempts; the endpoint auto-disables at 20."},"lastDeliveryAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"}},"required":["id","url","events","enabled","secretPrefix","failureCount","createdAt"]},"CreateWebhookResponse":{"type":"object","properties":{"endpoint":{"$ref":"#/components/schemas/WebhookEndpointDto"},"secret":{"type":"string","description":"`whsec_…`, shown exactly once."}},"required":["endpoint","secret"]},"WebhookDeliveryDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"endpointId":{"type":"string","format":"uuid"},"eventId":{"type":"string","example":"evt_3kq9…"},"eventType":{"type":"string","enum":["screening.completed","alert.created","alert.updated","wallet.activity","travel_rule.updated","report.ready"]},"status":{"type":"string","enum":["pending","succeeded","failed"]},"attempts":{"type":"integer"},"responseStatus":{"type":"integer"},"error":{"type":"string"},"nextAttemptAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"},"lastAttemptAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"}},"required":["id","endpointId","eventId","eventType","status","attempts","createdAt"]},"WalletActivityData":{"type":"object","properties":{"wallet":{"$ref":"#/components/schemas/WalletDto"},"newTransfers":{"type":"integer"}},"required":["wallet","newTransfers"]},"ReportDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"reference":{"type":"string","example":"RPT-2026Q3-7KX2"},"type":{"type":"string","enum":["screening_evidence","travel_rule","audit"]},"title":{"type":"string"},"status":{"type":"string","enum":["queued","rendering","ready","failed"]},"jsonSha256":{"type":"string"},"pdfSha256":{"type":"string"},"requestedBy":{"type":"string"},"error":{"type":"string"},"createdAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"},"readyAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"}},"required":["id","reference","type","title","status","requestedBy","createdAt"]},"ReportVerifyResponse":{"type":"object","properties":{"valid":{"type":"boolean"},"reference":{"type":"string"},"type":{"type":"string","enum":["screening_evidence","travel_rule","audit"]},"orgName":{"type":"string"},"createdAt":{"type":"string","format":"date-time","example":"2026-10-18T12:00:00.000Z"},"matched":{"type":"string","enum":["pdf","json"]}},"required":["valid"]},"NotificationPrefs":{"type":"object","properties":{"alertEmails":{"type":"boolean"}},"required":["alertEmails"]},"SignupInput":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80},"email":{"type":"string","maxLength":254,"format":"email"},"company":{"type":"string","minLength":2,"maxLength":120},"password":{"type":"string","minLength":10,"maxLength":128},"plan":{"type":"string","enum":["developer","enterprise"],"default":"developer"}},"required":["name","email","company","password"]},"LoginInput":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string","minLength":1}},"required":["email","password"]},"ForgotPasswordInput":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"]},"ResetPasswordInput":{"type":"object","properties":{"token":{"type":"string","minLength":16,"maxLength":256},"password":{"type":"string","minLength":10,"maxLength":128}},"required":["token","password"]},"VerifyEmailInput":{"type":"object","properties":{"token":{"type":"string","minLength":16,"maxLength":256}},"required":["token"]},"SwitchOrgInput":{"type":"object","properties":{"orgId":{"type":"string","format":"uuid"}},"required":["orgId"]},"UpdateProfileInput":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80}},"required":["name"]},"UpdateOrgInput":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120}},"required":["name"]},"UpdateMemberInput":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","analyst","viewer"]}},"required":["role"]},"CreateInviteInput":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email"},"role":{"type":"string","enum":["admin","analyst","viewer"]}},"required":["email","role"]},"AcceptInviteInput":{"type":"object","properties":{"token":{"type":"string","minLength":16,"maxLength":256},"name":{"type":"string","minLength":2,"maxLength":80},"password":{"type":"string","minLength":1,"maxLength":128}},"required":["token","password"]},"ScreenRequest":{"type":"object","properties":{"address":{"type":"string","minLength":1,"maxLength":128},"chain":{"type":"string","pattern":"^(stellar|evm:\\d+)$"},"memo":{"type":"object","properties":{"type":{"type":"string","enum":["id","text","hash"]},"value":{"type":"string","maxLength":64}},"required":["type","value"]}},"required":["address"]},"CreateWalletInput":{"type":"object","properties":{"address":{"type":"string","minLength":1,"maxLength":128},"chain":{"type":"string","pattern":"^(stellar|evm:\\d+)$"},"memo":{"type":"object","properties":{"type":{"type":"string","enum":["id","text","hash"]},"value":{"type":"string","maxLength":64}},"required":["type","value"]},"label":{"type":"string","minLength":1,"maxLength":80},"customerRef":{"type":"string","maxLength":120}},"required":["address","label"]},"UpdateAlertInput":{"type":"object","properties":{"status":{"type":"string","enum":["open","in_review","escalated","closed"]},"disposition":{"type":"string","enum":["true_positive","false_positive"]},"note":{"type":"string","maxLength":2000}}},"CreateTravelRuleInput":{"type":"object","properties":{"direction":{"type":"string","enum":["outgoing","incoming"]},"chain":{"type":"string","pattern":"^(stellar|evm:\\d+)$"},"asset":{"type":"string","minLength":1,"maxLength":12},"amount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"amountUsd":{"type":["number","null"],"minimum":0},"txHash":{"type":"string","maxLength":100},"jurisdiction":{"type":"string","minLength":2,"maxLength":8},"originator":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["natural"]},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"type":"string"},"placeOfBirth":{"type":"string"},"nationalId":{"type":"string"},"customerId":{"type":"string"},"address":{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2}}}},"required":["type","firstName","lastName"]},{"type":"object","properties":{"type":{"type":"string","enum":["legal"]},"legalName":{"type":"string","minLength":1},"lei":{"anyOf":[{"type":"string","pattern":"^[A-Z0-9]{18}\\d{2}$"},{"type":"string","enum":[""]}]},"customerId":{"type":"string"},"address":{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2}}}},"required":["type","legalName"]}]},"originatorAccount":{"type":"object","properties":{"address":{"type":"string","minLength":1,"maxLength":128},"chain":{"type":"string","pattern":"^(stellar|evm:\\d+)$"},"memo":{"type":"object","properties":{"type":{"type":"string","enum":["id","text","hash"]},"value":{"type":"string","maxLength":64}},"required":["type","value"]}},"required":["address"]},"beneficiary":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["natural"]},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"dateOfBirth":{"type":"string"},"placeOfBirth":{"type":"string"},"nationalId":{"type":"string"},"customerId":{"type":"string"},"address":{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2}}}},"required":["type","firstName","lastName"]},{"type":"object","properties":{"type":{"type":"string","enum":["legal"]},"legalName":{"type":"string","minLength":1},"lei":{"anyOf":[{"type":"string","pattern":"^[A-Z0-9]{18}\\d{2}$"},{"type":"string","enum":[""]}]},"customerId":{"type":"string"},"address":{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2}}}},"required":["type","legalName"]}]},"beneficiaryAccount":{"type":"object","properties":{"address":{"type":"string","minLength":1,"maxLength":128},"chain":{"type":"string","pattern":"^(stellar|evm:\\d+)$"},"memo":{"type":"object","properties":{"type":{"type":"string","enum":["id","text","hash"]},"value":{"type":"string","maxLength":64}},"required":["type","value"]}},"required":["address"]},"beneficiaryVasp":{"type":["object","null"],"properties":{"name":{"type":"string","minLength":1},"lei":{"type":"string"},"domain":{"type":"string"}},"required":["name"]}},"required":["direction","chain","asset","amount","amountUsd","jurisdiction","originator","originatorAccount","beneficiary","beneficiaryAccount","beneficiaryVasp"]},"TransitionTravelRuleInput":{"type":"object","properties":{"to":{"type":"string","enum":["draft","awaiting_counterparty","acknowledged","accepted","rejected","unhosted_verification","settled"]},"note":{"type":"string","maxLength":1000}},"required":["to"]},"CreateApiKeyInput":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60},"scopes":{"type":"array","items":{"type":"string","enum":["read","screen","monitor","travel_rule"]},"minItems":1}},"required":["name","scopes"]},"CreateWebhookInput":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["screening.completed","alert.created","alert.updated","wallet.activity","travel_rule.updated","report.ready"]},"minItems":1},"description":{"type":"string","maxLength":200}},"required":["url","events"]},"UpdateWebhookInput":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["screening.completed","alert.created","alert.updated","wallet.activity","travel_rule.updated","report.ready"]},"minItems":1},"description":{"type":"string","maxLength":200},"enabled":{"type":"boolean"}}},"CreateReportInput":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["screening_evidence"]},"screeningId":{"type":"string","format":"uuid"}},"required":["type","screeningId"]},{"type":"object","properties":{"type":{"type":"string","enum":["travel_rule"]},"transferId":{"type":"string","format":"uuid"}},"required":["type","transferId"]},{"type":"object","properties":{"type":{"type":"string","enum":["audit"]},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"}},"required":["type","from","to"]}]}},"parameters":{}},"paths":{"/v1/health":{"get":{"operationId":"getHealth","tags":["System"],"summary":"Liveness check","description":"Public.","security":[],"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Healthy","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}}}}},"/v1/chains":{"get":{"operationId":"getChains","tags":["System"],"summary":"Supported chains","description":"Public.","security":[],"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Chains","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChainDto"}}}}}}}},"/v1/openapi.json":{"get":{"operationId":"getOpenapiJson","tags":["System"],"summary":"This OpenAPI 3.1 document","description":"Public.","security":[],"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"The spec","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}}}}},"/v1/auth/signup":{"post":{"operationId":"postAuthSignup","tags":["Auth"],"summary":"Create an account and org","description":"Creates the user as owner of a new org, starts a session (Set-Cookie) and emails a verification link.\n\nPublic.\n\nRate limit group: auth.","security":[],"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupInput"}}}},"responses":{"201":{"description":"Signed in","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"429":{"description":"Rate limited","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/auth/login":{"post":{"operationId":"postAuthLogin","tags":["Auth"],"summary":"Sign in","description":"Public.\n\nRate limit group: auth.","security":[],"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInput"}}}},"responses":{"200":{"description":"Signed in (Set-Cookie)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"429":{"description":"Rate limited","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/auth/logout":{"post":{"operationId":"postAuthLogout","tags":["Auth"],"summary":"Sign out","description":"Public.","security":[],"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"204":{"description":"Done. No body.","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/auth/me":{"get":{"operationId":"getAuthMe","tags":["Auth"],"summary":"The signed-in user, org and role","description":"Session: viewer or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Me","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/auth/forgot-password":{"post":{"operationId":"postAuthForgotPassword","tags":["Auth"],"summary":"Email a password reset link","description":"Always 202, whether or not the email has an account.\n\nPublic.\n\nRate limit group: auth.","security":[],"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordInput"}}}},"responses":{"202":{"description":"Accepted","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"429":{"description":"Rate limited","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/auth/reset-password":{"post":{"operationId":"postAuthResetPassword","tags":["Auth"],"summary":"Set a new password from a reset link","description":"Public.\n\nRate limit group: auth.","security":[],"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordInput"}}}},"responses":{"200":{"description":"Password changed; every session is revoked","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"429":{"description":"Rate limited","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/auth/verify-email":{"post":{"operationId":"postAuthVerifyEmail","tags":["Auth"],"summary":"Confirm an email address","description":"Links expire after 24 hours.\n\nPublic.\n\nRate limit group: auth.","security":[],"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailInput"}}}},"responses":{"200":{"description":"Verified","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"429":{"description":"Rate limited","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/auth/resend-verification":{"post":{"operationId":"postAuthResendVerification","tags":["Auth"],"summary":"Email a new verification link","description":"Session: viewer or above. API keys: not allowed (403).\n\nRate limit group: auth.","security":[{"sessionCookie":[]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"202":{"description":"Accepted","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"429":{"description":"Rate limited","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/auth/switch-org":{"post":{"operationId":"postAuthSwitchOrg","tags":["Auth"],"summary":"Point the session at another org you belong to","description":"Session: viewer or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwitchOrgInput"}}}},"responses":{"200":{"description":"Switched","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/me":{"patch":{"operationId":"patchMe","tags":["Auth"],"summary":"Update your profile","description":"Session: viewer or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileInput"}}}},"responses":{"200":{"description":"Updated","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/me/orgs":{"get":{"operationId":"getMeOrgs","tags":["Auth"],"summary":"Every org you belong to","description":"Session: viewer or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Memberships","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MembershipDto"}}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/me/notifications":{"patch":{"operationId":"patchMeNotifications","tags":["Auth"],"summary":"Email notification preferences","description":"`alertEmails: false` stops high and critical alert emails.\n\nSession: viewer or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPrefs"}}}},"responses":{"200":{"description":"Updated","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPrefs"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/org":{"get":{"operationId":"getOrg","tags":["Team"],"summary":"Org details and members","description":"Session: viewer or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Org","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDetailResponse"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}},"patch":{"operationId":"patchOrg","tags":["Team"],"summary":"Rename the org","description":"Session: admin or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"admin","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgInput"}}}},"responses":{"200":{"description":"Updated","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDetailResponse"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/org/members/{userId}":{"patch":{"operationId":"patchOrgMembersByUserId","tags":["Team"],"summary":"Change a member's role","description":"Owners can set any role. Admins can't change owners or grant owner. The last owner can't be demoted (409 last_owner).\n\nSession: admin or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"admin","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"userId","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemberInput"}}}},"responses":{"200":{"description":"Updated","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberDto"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"409":{"description":"Conflict with the current state","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}},"delete":{"operationId":"deleteOrgMembersByUserId","tags":["Team"],"summary":"Remove a member, or leave","description":"Removing someone else needs admin (and owner to remove an owner). Anyone can remove themselves, except the last owner. The member's sessions for this org are revoked.\n\nSession: viewer or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"userId","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"204":{"description":"Done. No body.","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"409":{"description":"Conflict with the current state","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/invites":{"get":{"operationId":"getInvites","tags":["Team"],"summary":"List invites","description":"Session: admin or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"admin","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Invites","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InviteDto"}}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"409":{"description":"Conflict with the current state","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}},"post":{"operationId":"postInvites","tags":["Team"],"summary":"Invite someone by email","description":"Invites expire after 7 days. 409 already_member or invite_pending.\n\nSession: admin or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"admin","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInviteInput"}}}},"responses":{"201":{"description":"Invited","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteDto"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"409":{"description":"Conflict with the current state","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/invites/{id}":{"delete":{"operationId":"deleteInvitesById","tags":["Team"],"summary":"Revoke an invite","description":"Session: admin or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"admin","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"204":{"description":"Done. No body.","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"409":{"description":"Conflict with the current state","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/invites/{id}/resend":{"post":{"operationId":"postInvitesByIdResend","tags":["Team"],"summary":"Send a fresh invite link","description":"Issues a new token and resets the 7 day expiry. The old link stops working.\n\nSession: admin or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"admin","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Resent","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteDto"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"409":{"description":"Conflict with the current state","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/invites/lookup":{"get":{"operationId":"getInvitesLookup","tags":["Team"],"summary":"Describe an invite from its token","description":"Public.\n\nRate limit group: auth.","security":[],"parameters":[{"schema":{"type":"string","minLength":16},"required":true,"name":"token","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Invite","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteLookupResponse"}}}},"409":{"description":"Conflict with the current state","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"429":{"description":"Rate limited","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/invites/accept":{"post":{"operationId":"postInvitesAccept","tags":["Team"],"summary":"Accept an invite","description":"New users send `name` and a new `password`; existing users send their current password. Starts a session in the inviting org. 410 invite_expired for expired or revoked invites.\n\nPublic.\n\nRate limit group: auth.","security":[],"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInviteInput"}}}},"responses":{"200":{"description":"Signed in (Set-Cookie)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"409":{"description":"Conflict with the current state","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"410":{"description":"Gone (expired or revoked invite)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"429":{"description":"Rate limited","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/screen":{"post":{"operationId":"postScreen","tags":["Screening"],"summary":"Screen an address","description":"Live chain data, scored with reasons. Emits `screening.completed`. A chain the registry knows but hasn't switched on is 422 `chain_not_live` (with `fields.chain`); 502 `chain_unavailable` means the upstream data source failed.\n\nSession: analyst or above. API keys: `screen` scope.\n\nRate limit group: screen.","security":[{"sessionCookie":[]},{"apiKey":["screen"]}],"x-hera-min-role":"analyst","x-hera-api-key-scope":"screen","parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Retries with the same key (per org and route) within 24 h replay the first 2xx response instead of running again. Same key with a different body: 422 idempotency_key_reused. Concurrent duplicate: 409 idempotency_in_progress."},"required":false,"name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenRequest"}}}},"responses":{"200":{"description":"Result","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true},"idempotent-replayed":{"schema":{"type":"string","enum":["true"],"description":"Present when this is a stored response replayed for a repeated Idempotency-Key."},"required":false}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreeningResponse"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"409":{"description":"Conflict with the current state","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"429":{"description":"Rate limited","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"502":{"description":"A chain data source is unavailable","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/screenings":{"get":{"operationId":"getScreenings","tags":["Screening"],"summary":"Screening history","description":"Session: viewer or above. API keys: `read` scope.","security":[{"sessionCookie":[]},{"apiKey":["read"]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":"read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"Default 50, max 200."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Page","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedScreeningSummary"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/screenings/{id}":{"get":{"operationId":"getScreeningsById","tags":["Screening"],"summary":"One screening, in full","description":"Session: viewer or above. API keys: `read` scope.","security":[{"sessionCookie":[]},{"apiKey":["read"]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":"read","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Result","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreeningResponse"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/wallets":{"get":{"operationId":"getWallets","tags":["Wallets"],"summary":"Watched wallets","description":"Session: viewer or above. API keys: `read` scope.","security":[{"sessionCookie":[]},{"apiKey":["read"]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":"read","parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Wallets","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WalletDto"}}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"409":{"description":"Conflict with the current state","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"502":{"description":"A chain data source is unavailable","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}},"post":{"operationId":"postWallets","tags":["Wallets"],"summary":"Watch a wallet","description":"Screens immediately. 409 wallet_exists; 422 chain_not_live.\n\nSession: analyst or above. API keys: `monitor` scope.","security":[{"sessionCookie":[]},{"apiKey":["monitor"]}],"x-hera-min-role":"analyst","x-hera-api-key-scope":"monitor","parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWalletInput"}}}},"responses":{"201":{"description":"Watching","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletDto"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"409":{"description":"Conflict with the current state","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"502":{"description":"A chain data source is unavailable","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/wallets/{id}":{"delete":{"operationId":"deleteWalletsById","tags":["Wallets"],"summary":"Stop watching","description":"Session: analyst or above. API keys: `monitor` scope.","security":[{"sessionCookie":[]},{"apiKey":["monitor"]}],"x-hera-min-role":"analyst","x-hera-api-key-scope":"monitor","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"204":{"description":"Done. No body.","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"502":{"description":"A chain data source is unavailable","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/wallets/{id}/refresh":{"post":{"operationId":"postWalletsByIdRefresh","tags":["Wallets"],"summary":"Rescreen now","description":"Session: analyst or above. API keys: `monitor` scope.","security":[{"sessionCookie":[]},{"apiKey":["monitor"]}],"x-hera-min-role":"analyst","x-hera-api-key-scope":"monitor","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Rescreened","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletDto"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"502":{"description":"A chain data source is unavailable","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/alerts":{"get":{"operationId":"getAlerts","tags":["Alerts"],"summary":"Alerts","description":"Session: viewer or above. API keys: `read` scope.","security":[{"sessionCookie":[]},{"apiKey":["read"]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":"read","parameters":[{"schema":{"type":"string","enum":["open","in_review","escalated","closed"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Alerts","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertDto"}}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/alerts/{id}":{"get":{"operationId":"getAlertsById","tags":["Alerts"],"summary":"One alert","description":"Session: viewer or above. API keys: `read` scope.","security":[{"sessionCookie":[]},{"apiKey":["read"]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":"read","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Alert","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDto"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}},"patch":{"operationId":"patchAlertsById","tags":["Alerts"],"summary":"Review, escalate or close an alert","description":"Emits `alert.updated`.\n\nSession: analyst or above. API keys: `monitor` scope.","security":[{"sessionCookie":[]},{"apiKey":["monitor"]}],"x-hera-min-role":"analyst","x-hera-api-key-scope":"monitor","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAlertInput"}}}},"responses":{"200":{"description":"Updated","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDto"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/travel-rule/transfers":{"get":{"operationId":"getTravelRuleTransfers","tags":["Travel Rule"],"summary":"Transfers","description":"Session: viewer or above. API keys: `travel_rule` scope.","security":[{"sessionCookie":[]},{"apiKey":["travel_rule"]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":"travel_rule","parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Transfers","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TravelRuleTransferDto"}}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}},"post":{"operationId":"postTravelRuleTransfers","tags":["Travel Rule"],"summary":"Create a transfer record","description":"Session: analyst or above. API keys: `travel_rule` scope.","security":[{"sessionCookie":[]},{"apiKey":["travel_rule"]}],"x-hera-min-role":"analyst","x-hera-api-key-scope":"travel_rule","parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Retries with the same key (per org and route) within 24 h replay the first 2xx response instead of running again. Same key with a different body: 422 idempotency_key_reused. Concurrent duplicate: 409 idempotency_in_progress."},"required":false,"name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTravelRuleInput"}}}},"responses":{"201":{"description":"Created","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true},"idempotent-replayed":{"schema":{"type":"string","enum":["true"],"description":"Present when this is a stored response replayed for a repeated Idempotency-Key."},"required":false}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TravelRuleTransferDto"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"409":{"description":"Conflict with the current state","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/travel-rule/transfers/{id}":{"get":{"operationId":"getTravelRuleTransfersById","tags":["Travel Rule"],"summary":"One transfer","description":"Session: viewer or above. API keys: `travel_rule` scope.","security":[{"sessionCookie":[]},{"apiKey":["travel_rule"]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":"travel_rule","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Transfer","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TravelRuleTransferDto"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/travel-rule/transfers/{id}/transition":{"post":{"operationId":"postTravelRuleTransfersByIdTransition","tags":["Travel Rule"],"summary":"Move a transfer to its next status","description":"409 invalid_transition for moves the status machine doesn't allow.\n\nSession: analyst or above. API keys: `travel_rule` scope.","security":[{"sessionCookie":[]},{"apiKey":["travel_rule"]}],"x-hera-min-role":"analyst","x-hera-api-key-scope":"travel_rule","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransitionTravelRuleInput"}}}},"responses":{"200":{"description":"Moved","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TravelRuleTransferDto"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"409":{"description":"Conflict with the current state","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/keys":{"get":{"operationId":"getKeys","tags":["API keys"],"summary":"API keys","description":"Session: viewer or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Keys","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyDto"}}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}},"post":{"operationId":"postKeys","tags":["API keys"],"summary":"Create an API key","description":"Session: admin or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"admin","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyInput"}}}},"responses":{"201":{"description":"Created; the secret is shown once","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponse"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/keys/{id}":{"delete":{"operationId":"deleteKeysById","tags":["API keys"],"summary":"Revoke an API key","description":"Session: admin or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"admin","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"204":{"description":"Done. No body.","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/audit":{"get":{"operationId":"getAudit","tags":["Audit"],"summary":"Audit log, newest first","description":"Session: viewer or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100,"description":"Default 100, max 500."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Events","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuditEventDto"}}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/audit/verify":{"get":{"operationId":"getAuditVerify","tags":["Audit"],"summary":"Recompute the hash chain","description":"Session: viewer or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Result","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditVerifyResponse"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/overview":{"get":{"operationId":"getOverview","tags":["Overview"],"summary":"Dashboard aggregates","description":"Session: viewer or above. API keys: `read` scope.","security":[{"sessionCookie":[]},{"apiKey":["read"]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":"read","parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Overview","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverviewResponse"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/webhooks":{"get":{"operationId":"getWebhooks","tags":["Webhooks"],"summary":"Webhook endpoints","description":"Session: analyst or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"analyst","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Endpoints","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpointDto"}}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}},"post":{"operationId":"postWebhooks","tags":["Webhooks"],"summary":"Add an endpoint","description":"Session: admin or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"admin","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookInput"}}}},"responses":{"201":{"description":"Created; the signing secret is shown once","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookResponse"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/webhooks/{id}":{"patch":{"operationId":"patchWebhooksById","tags":["Webhooks"],"summary":"Change an endpoint","description":"Re-enabling an endpoint resets its failure count.\n\nSession: admin or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"admin","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookInput"}}}},"responses":{"200":{"description":"Updated","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointDto"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}},"delete":{"operationId":"deleteWebhooksById","tags":["Webhooks"],"summary":"Delete an endpoint","description":"Session: admin or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"admin","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"204":{"description":"Done. No body.","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/webhooks/{id}/rotate-secret":{"post":{"operationId":"postWebhooksByIdRotateSecret","tags":["Webhooks"],"summary":"Issue a new signing secret","description":"The old secret stops working immediately.\n\nSession: admin or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"admin","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Rotated; the new secret is shown once","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookResponse"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/webhooks/{id}/test":{"post":{"operationId":"postWebhooksByIdTest","tags":["Webhooks"],"summary":"Send a test event","description":"Queues the endpoint's first subscribed event type with `data: { test: true }`.\n\nSession: admin or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"admin","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"202":{"description":"Queued","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryDto"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/webhooks/{id}/deliveries":{"get":{"operationId":"getWebhooksByIdDeliveries","tags":["Webhooks"],"summary":"Recent deliveries to an endpoint","description":"Session: analyst or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"analyst","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"Default 50, max 200."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Deliveries","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDeliveryDto"}}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/webhooks/deliveries/{id}/redeliver":{"post":{"operationId":"postWebhooksDeliveriesByIdRedeliver","tags":["Webhooks"],"summary":"Send a delivery's event again","description":"Queues a new delivery of the same, byte-identical event.\n\nSession: admin or above. API keys: not allowed (403).","security":[{"sessionCookie":[]}],"x-hera-min-role":"admin","x-hera-api-key-scope":null,"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"202":{"description":"Queued","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryDto"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/reports":{"post":{"operationId":"postReports","tags":["Reports"],"summary":"Generate a compliance report","description":"`screening_evidence` and `travel_rule` render synchronously (201, status ready). `audit` is queued (202) and renders in the background; poll `GET /v1/reports/{id}` or subscribe to `report.ready`. API keys: `travel_rule` reports also need the travel_rule scope, and `audit` reports need a dashboard session.\n\nSession: analyst or above. API keys: `read` scope.","security":[{"sessionCookie":[]},{"apiKey":["read"]}],"x-hera-min-role":"analyst","x-hera-api-key-scope":"read","parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReportInput"}}}},"responses":{"201":{"description":"Rendered","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportDto"}}}},"202":{"description":"Queued","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportDto"}}}},"400":{"description":"Malformed request (e.g. invalid JSON)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"415":{"description":"Mutations must send Content-Type: application/json","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}},"get":{"operationId":"getReports","tags":["Reports"],"summary":"Reports, newest first","description":"Session: viewer or above. API keys: `read` scope.","security":[{"sessionCookie":[]},{"apiKey":["read"]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":"read","parameters":[{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Reports","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportDto"}}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/reports/verify":{"get":{"operationId":"getReportsVerify","tags":["Reports"],"summary":"Check a report's SHA-256","description":"Matches the hash of either the PDF or the JSON snapshot. Never returns contents. 30 requests a minute per IP.\n\nPublic.\n\nRate limit group: verify.","security":[],"parameters":[{"schema":{"type":"string","description":"64 hex characters"},"required":true,"name":"sha256","in":"query"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Result","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportVerifyResponse"}}}},"422":{"description":"Validation failed; `error.fields` maps each field to its message","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"429":{"description":"Rate limited","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/reports/{id}":{"get":{"operationId":"getReportsById","tags":["Reports"],"summary":"Report metadata and hashes","description":"Session: viewer or above. API keys: `read` scope.","security":[{"sessionCookie":[]},{"apiKey":["read"]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":"read","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Report","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportDto"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/reports/{id}/pdf":{"get":{"operationId":"getReportsByIdPdf","tags":["Reports"],"summary":"Download the PDF","description":"Session: viewer or above. API keys: `read` scope.","security":[{"sessionCookie":[]},{"apiKey":["read"]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":"read","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"`<reference>.pdf` as an attachment","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/v1/reports/{id}/json":{"get":{"operationId":"getReportsByIdJson","tags":["Reports"],"summary":"Download the frozen JSON snapshot","description":"The exact canonical bytes whose SHA-256 is `jsonSha256`.\n\nSession: viewer or above. API keys: `read` scope.","security":[{"sessionCookie":[]},{"apiKey":["read"]}],"x-hera-min-role":"viewer","x-hera-api-key-scope":"read","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":128,"description":"Optional correlation id ([A-Za-z0-9._:-], up to 128 chars), echoed back."},"required":false,"name":"x-request-id","in":"header"}],"responses":{"200":{"description":"Snapshot","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Missing, invalid or expired credentials","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Authenticated, but the role or API key scope doesn't allow this","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (records from other orgs are 404 too)","headers":{"x-request-id":{"schema":{"type":"string","description":"Echoes the request's `x-request-id`, or a generated uuid. Quote it when reporting problems."},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}}},"webhooks":{"screening.completed":{"post":{"operationId":"webhook_screening_completed","tags":["Webhooks"],"summary":"A screening finished (POST /v1/screen)","description":"POSTed to every enabled endpoint subscribed to this event, with `User-Agent: Hera-Webhooks/1.0`. Any 2xx within 10 seconds is success. Failures retry after 30s, 2m, 10m, 30m, 1h, 2h, 4h, 8h and 8h (10 attempts over about 24 hours). An endpoint auto-disables after 20 consecutive failed attempts.","parameters":[{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, `${t}.${rawBody}`)>`. Verify with `verifyWebhookSignature` from @hera/core or the SDK, and reject timestamps older than 5 minutes.","example":"t=1792340708,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"},"required":true,"name":"hera-signature","in":"header"},{"schema":{"type":"string","description":"The event id (`evt_…`). Redeliveries reuse it, so dedupe on it."},"required":true,"name":"hera-event-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"evt_9fK2mQ4xT1bZ7cW3"},"type":{"type":"string","enum":["screening.completed"]},"createdAt":{"type":"string","format":"date-time"},"orgId":{"type":"string","format":"uuid"},"data":{"$ref":"#/components/schemas/ScreeningSummaryDto"}},"required":["id","type","createdAt","orgId","data"]}}}},"responses":{"200":{"description":"Any 2xx acknowledges the delivery."}}}},"alert.created":{"post":{"operationId":"webhook_alert_created","tags":["Webhooks"],"summary":"A watched wallet raised a new alert","description":"POSTed to every enabled endpoint subscribed to this event, with `User-Agent: Hera-Webhooks/1.0`. Any 2xx within 10 seconds is success. Failures retry after 30s, 2m, 10m, 30m, 1h, 2h, 4h, 8h and 8h (10 attempts over about 24 hours). An endpoint auto-disables after 20 consecutive failed attempts.","parameters":[{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, `${t}.${rawBody}`)>`. Verify with `verifyWebhookSignature` from @hera/core or the SDK, and reject timestamps older than 5 minutes.","example":"t=1792340708,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"},"required":true,"name":"hera-signature","in":"header"},{"schema":{"type":"string","description":"The event id (`evt_…`). Redeliveries reuse it, so dedupe on it."},"required":true,"name":"hera-event-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"evt_9fK2mQ4xT1bZ7cW3"},"type":{"type":"string","enum":["alert.created"]},"createdAt":{"type":"string","format":"date-time"},"orgId":{"type":"string","format":"uuid"},"data":{"$ref":"#/components/schemas/AlertDto"}},"required":["id","type","createdAt","orgId","data"]}}}},"responses":{"200":{"description":"Any 2xx acknowledges the delivery."}}}},"alert.updated":{"post":{"operationId":"webhook_alert_updated","tags":["Webhooks"],"summary":"An alert's status, disposition or notes changed","description":"POSTed to every enabled endpoint subscribed to this event, with `User-Agent: Hera-Webhooks/1.0`. Any 2xx within 10 seconds is success. Failures retry after 30s, 2m, 10m, 30m, 1h, 2h, 4h, 8h and 8h (10 attempts over about 24 hours). An endpoint auto-disables after 20 consecutive failed attempts.","parameters":[{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, `${t}.${rawBody}`)>`. Verify with `verifyWebhookSignature` from @hera/core or the SDK, and reject timestamps older than 5 minutes.","example":"t=1792340708,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"},"required":true,"name":"hera-signature","in":"header"},{"schema":{"type":"string","description":"The event id (`evt_…`). Redeliveries reuse it, so dedupe on it."},"required":true,"name":"hera-event-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"evt_9fK2mQ4xT1bZ7cW3"},"type":{"type":"string","enum":["alert.updated"]},"createdAt":{"type":"string","format":"date-time"},"orgId":{"type":"string","format":"uuid"},"data":{"$ref":"#/components/schemas/AlertDto"}},"required":["id","type","createdAt","orgId","data"]}}}},"responses":{"200":{"description":"Any 2xx acknowledges the delivery."}}}},"wallet.activity":{"post":{"operationId":"webhook_wallet_activity","tags":["Webhooks"],"summary":"A watched wallet has newer on-chain activity","description":"POSTed to every enabled endpoint subscribed to this event, with `User-Agent: Hera-Webhooks/1.0`. Any 2xx within 10 seconds is success. Failures retry after 30s, 2m, 10m, 30m, 1h, 2h, 4h, 8h and 8h (10 attempts over about 24 hours). An endpoint auto-disables after 20 consecutive failed attempts.","parameters":[{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, `${t}.${rawBody}`)>`. Verify with `verifyWebhookSignature` from @hera/core or the SDK, and reject timestamps older than 5 minutes.","example":"t=1792340708,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"},"required":true,"name":"hera-signature","in":"header"},{"schema":{"type":"string","description":"The event id (`evt_…`). Redeliveries reuse it, so dedupe on it."},"required":true,"name":"hera-event-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"evt_9fK2mQ4xT1bZ7cW3"},"type":{"type":"string","enum":["wallet.activity"]},"createdAt":{"type":"string","format":"date-time"},"orgId":{"type":"string","format":"uuid"},"data":{"$ref":"#/components/schemas/WalletActivityData"}},"required":["id","type","createdAt","orgId","data"]}}}},"responses":{"200":{"description":"Any 2xx acknowledges the delivery."}}}},"travel_rule.updated":{"post":{"operationId":"webhook_travel_rule_updated","tags":["Webhooks"],"summary":"A Travel Rule transfer was created or changed status","description":"POSTed to every enabled endpoint subscribed to this event, with `User-Agent: Hera-Webhooks/1.0`. Any 2xx within 10 seconds is success. Failures retry after 30s, 2m, 10m, 30m, 1h, 2h, 4h, 8h and 8h (10 attempts over about 24 hours). An endpoint auto-disables after 20 consecutive failed attempts.","parameters":[{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, `${t}.${rawBody}`)>`. Verify with `verifyWebhookSignature` from @hera/core or the SDK, and reject timestamps older than 5 minutes.","example":"t=1792340708,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"},"required":true,"name":"hera-signature","in":"header"},{"schema":{"type":"string","description":"The event id (`evt_…`). Redeliveries reuse it, so dedupe on it."},"required":true,"name":"hera-event-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"evt_9fK2mQ4xT1bZ7cW3"},"type":{"type":"string","enum":["travel_rule.updated"]},"createdAt":{"type":"string","format":"date-time"},"orgId":{"type":"string","format":"uuid"},"data":{"$ref":"#/components/schemas/TravelRuleTransferDto"}},"required":["id","type","createdAt","orgId","data"]}}}},"responses":{"200":{"description":"Any 2xx acknowledges the delivery."}}}},"report.ready":{"post":{"operationId":"webhook_report_ready","tags":["Webhooks"],"summary":"A report finished rendering","description":"POSTed to every enabled endpoint subscribed to this event, with `User-Agent: Hera-Webhooks/1.0`. Any 2xx within 10 seconds is success. Failures retry after 30s, 2m, 10m, 30m, 1h, 2h, 4h, 8h and 8h (10 attempts over about 24 hours). An endpoint auto-disables after 20 consecutive failed attempts.","parameters":[{"schema":{"type":"string","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256(secret, `${t}.${rawBody}`)>`. Verify with `verifyWebhookSignature` from @hera/core or the SDK, and reject timestamps older than 5 minutes.","example":"t=1792340708,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"},"required":true,"name":"hera-signature","in":"header"},{"schema":{"type":"string","description":"The event id (`evt_…`). Redeliveries reuse it, so dedupe on it."},"required":true,"name":"hera-event-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"evt_9fK2mQ4xT1bZ7cW3"},"type":{"type":"string","enum":["report.ready"]},"createdAt":{"type":"string","format":"date-time"},"orgId":{"type":"string","format":"uuid"},"data":{"$ref":"#/components/schemas/ReportDto"}},"required":["id","type","createdAt","orgId","data"]}}}},"responses":{"200":{"description":"Any 2xx acknowledges the delivery."}}}}}}