{"openapi":"3.0.0","paths":{"/api/v1/orgs/{orgId}/audit-logs":{"get":{"description":"Paginated, org-scoped feed combining identity, billing, ledger and auth audit logs (enriched with actor and organization info). Only customer-visible events are returned (admin/ops and internal ledger/MPC diagnostics are excluded). Filter by sources, actions, actorType, actorId, objectType, IP, correlationId and createdAt range. Use `snapshotAt` for stable pagination during infinite scroll. Payload excluded.\n\n**Required API key scope(s):** `audit-logs:read`","operationId":"AuditLogsController_listAuditLogs_v1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"orgId","required":true,"in":"path","description":"Organization UUID","schema":{"example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","type":"string"}},{"name":"sources","required":false,"in":"query","description":"Filter by source domain(s). Logs matching any of the given sources are returned.","schema":{"type":"array","items":{"type":"string","enum":["identity","billing","ledger","mpc","auth","admin"]}}},{"name":"actions","required":false,"in":"query","description":"Filter by action(s). Logs matching any of the given actions are returned.","schema":{"example":["MEMBER_INVITED","AUTH_SUCCESS"],"type":"array","items":{"type":"string"}}},{"name":"actorType","required":false,"in":"query","description":"Filter by actor type.","schema":{"type":"string","enum":["USER","API_KEY","SERVICE","ADMIN","SYSTEM"]}},{"name":"actorId","required":false,"in":"query","description":"Filter by actor ID (UUID)","schema":{"example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","type":"string"}},{"name":"objectType","required":false,"in":"query","description":"Filter by object type","schema":{"example":"apikey","type":"string"}},{"name":"ip","required":false,"in":"query","description":"Filter by client IP","schema":{"example":"192.168.1.1","type":"string"}},{"name":"correlationId","required":false,"in":"query","description":"Filter by correlation / trace ID (exact match)","schema":{"example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","type":"string"}},{"name":"createdFrom","required":false,"in":"query","description":"Logs created on or after (ISO 8601)","schema":{"example":"2026-01-01T00:00:00.000Z","type":"string"}},{"name":"createdTo","required":false,"in":"query","description":"Logs created on or before (ISO 8601)","schema":{"example":"2026-12-31T23:59:59.999Z","type":"string"}},{"name":"snapshotAt","required":false,"in":"query","description":"Pagination snapshot (ISO 8601). When provided, only logs created at or before this instant are returned, so newly inserted logs do not shift pages. Omit on the first request; reuse the `snapshotAt` from the response on subsequent pages.","schema":{"example":"2026-06-25T12:00:00.000Z","type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order by createdAt","schema":{"default":"desc","type":"string","enum":["asc","desc"]}},{"name":"page","required":false,"in":"query","description":"Page number (1-based)","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"responses":{"200":{"description":"Paginated audit log entries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAuditLogsResponseDto"}}}}},"security":[{"Ed25519ApiKey":[]}],"summary":"List audit logs (combined)","tags":["Audit Logs"],"x-bro-integration-api":["audit-logs:read"]}},"/api/v1/orgs/{orgId}/audit-logs/{id}":{"get":{"description":"Returns a single org-scoped audit log entry including domain payload. Only customer-visible events are returned; admin-only rows are hidden. ADMIN actor id/email are omitted and actorName is masked. Requires `audit-logs:read:detail`.\n\n**Required API key scope(s):** `audit-logs:read:detail`","operationId":"AuditLogsController_getAuditLogById_v1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"orgId","required":true,"in":"path","description":"Organization UUID","schema":{"example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","type":"string"}},{"name":"id","required":true,"in":"path","description":"Audit log entry UUID","schema":{"example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","type":"string"}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"responses":{"200":{"description":"Audit log detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogDetailDto"}}}},"404":{"description":"Audit log not found"}},"security":[{"Ed25519ApiKey":[]}],"summary":"Get audit log by ID","tags":["Audit Logs"],"x-bro-integration-api":["audit-logs:read:detail"]}},"/api/v1/mpc/initialize":{"post":{"description":"Idempotent per organization and `X-Idempotency-Key`: retry the same request body `{}` with the same key for safe replay. Same key with a different fingerprint returns 400 (`mpc.errors.IDEMPOTENCY_CONFLICT`). Requires JSON empty object `{}` (not a zero-length HTTP body). Zero-length body → `mpc.errors.EMPTY_INITIALIZE_BODY_REQUIRED`; wrong body hash → `BODY_HASH_MISMATCH`.\n\n**Required API key scope(s):** `mpc:initialize`","operationId":"initializeMpcV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"X-Idempotency-Key","in":"header","description":"Trimmed non-empty ASCII value of at most 128 bytes. Reuse only for the same logical retry.","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"X-Api-Body-Hash","in":"header","description":"Lowercase SHA-256 hex of the exact raw request body bytes. Required whenever body bytes are sent (including JSON `{}`). Omit only for a true zero-byte body. Never use sha256 of empty bytes (`e3b0c442…`) for a zero-byte body — use an empty canonical BODY_HASH line instead.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{64}$"}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"requestBody":{"required":true,"description":"Must be the empty JSON object `{}` (exactly two bytes on the wire). This is not a zero-length HTTP body. Sign with X-Api-Body-Hash = sha256(\"{}\") = `44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a` (same value in the canonical BODY_HASH line).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitializeMpcRequestDto"},"examples":{"emptyObject":{"summary":"Empty JSON object","value":{}}}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitializeMpcResponseDto"}}}},"400":{"description":"Missing/invalid idempotency key, idempotency conflict, or body that is not the empty JSON object `{}`"}},"security":[{"Ed25519ApiKey":[]}],"summary":"Initialize default MPC key for current organization","tags":["MPC"],"x-bro-integration-api":["mpc:initialize"]}},"/api/v1/mpc/status":{"get":{"operationId":"getMpcStatusV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MpcStatusResponseDto"}}}}},"security":[{"Ed25519ApiKey":[]}],"summary":"Get default MPC key and per-chain readiness status for current organization","tags":["MPC"],"x-bro-integration-api":["mpc:read"],"description":"**Required API key scope(s):** `mpc:read`"}},"/api/v1/co-signer/intents/pending":{"get":{"operationId":"listPendingCoSignerIntentsV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPendingIntentsResponseDto"}}}}},"security":[{"Ed25519ApiKey":[]}],"summary":"Get pending co-signer intents for current API key organization","tags":["MPC Co-Signer"],"x-bro-integration-api":["mpc:raw"],"description":"**Required API key scope(s):** `mpc:raw`"}},"/api/v1/co-signer/intents/{intentType}/{intentId}/claim":{"post":{"description":"A claim is scoped to the authenticated organization. Retries from that organization return the same authoritative claim.\n\n**Required API key scope(s):** `mpc:raw`","operationId":"claimCoSignerIntentV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"intentType","required":true,"in":"path","schema":{"type":"string"}},{"name":"intentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"X-Idempotency-Key","in":"header","description":"Trimmed non-empty string. Reuse only for the same logical retry.","required":true,"schema":{"type":"string","minLength":1}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ClaimIntentResponseDto"},{"$ref":"#/components/schemas/ClaimSignIntentResponseDto"}]}}}},"409":{"description":"Intent already claimed or claim conflict"}},"security":[{"Ed25519ApiKey":[]}],"summary":"Claim pending co-signer intent","tags":["MPC Co-Signer"],"x-bro-integration-api":["mpc:raw"]}},"/api/v1/co-signer/intents/{intentType}/{intentId}/result":{"post":{"operationId":"reportCoSignerIntentResultV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"intentType","required":true,"in":"path","schema":{"type":"string"}},{"name":"intentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"X-Api-Body-Hash","in":"header","description":"Lowercase SHA-256 hex of the exact raw request body bytes. Required whenever body bytes are sent (including JSON `{}`). Omit only for a true zero-byte body. Never use sha256 of empty bytes (`e3b0c442…`) for a zero-byte body — use an empty canonical BODY_HASH line instead.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{64}$"}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"responses":{"200":{"description":""},"409":{"description":""}},"security":[{"Ed25519ApiKey":[]}],"summary":"Report terminal result for claimed co-signer intent","tags":["MPC Co-Signer"],"x-bro-integration-api":["mpc:raw"],"description":"**Required API key scope(s):** `mpc:raw`"}},"/api/v1/co-signer/sessions/{sessionId}/messages":{"post":{"operationId":"pushCoSignerMessageV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"sessionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"X-Idempotency-Key","in":"header","description":"Trimmed non-empty string. Reuse only for the same logical retry.","required":true,"schema":{"type":"string","minLength":1}},{"name":"X-Api-Body-Hash","in":"header","description":"Lowercase SHA-256 hex of the exact raw request body bytes. Required whenever body bytes are sent (including JSON `{}`). Omit only for a true zero-byte body. Never use sha256 of empty bytes (`e3b0c442…`) for a zero-byte body — use an empty canonical BODY_HASH line instead.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{64}$"}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushMessageDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"deliverySeq":{"type":"number","example":1}},"required":["deliverySeq"]}}}}},"security":[{"Ed25519ApiKey":[]}],"summary":"Push outbound co-signer message into session","tags":["MPC Co-Signer"],"x-bro-integration-api":["mpc:raw"],"description":"**Required API key scope(s):** `mpc:raw`"},"get":{"operationId":"listCoSignerMessagesV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"sessionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"afterSeq","required":false,"in":"query","description":"Return messages with seq > afterSeq","schema":{"minimum":0,"default":0,"example":0,"type":"number"}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMessagesResponseDto"}}}}},"security":[{"Ed25519ApiKey":[]}],"summary":"Get inbound co-signer messages for session","tags":["MPC Co-Signer"],"x-bro-integration-api":["mpc:raw"],"description":"**Required API key scope(s):** `mpc:raw`"}},"/api/v1/assets":{"get":{"operationId":"listAssetsV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"cursor","required":false,"in":"query","description":"Opaque cursor returned by the previous page.","schema":{"example":"eyJ2IjoxfQ.signature","type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"integer"}},{"name":"chain","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"asset","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"status","required":false,"in":"query","schema":{"type":"array","items":{"type":"string","enum":["ACTIVE","ARCHIVED"]}}},{"name":"tokenStandard","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientAssetListResponseDto"}}}},"400":{"description":"UNEXPECTED_REQUEST_BODY: Request body is not allowed; INVALID_QUERY_PARAMETER: Query parameter is invalid; INVALID_CURSOR: Cursor is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"401":{"description":"AUTHENTICATION_REQUIRED: Authentication required; AMBIGUOUS_AUTH: Ambiguous authentication credentials; MISSING_AUTH_HEADER: Required authentication header is missing; INVALID_AUTH_HEADER: Authentication header is invalid; INVALID_TIMESTAMP: Authentication timestamp is invalid; CLOCK_SKEW: Authentication timestamp is outside the allowed window; REPLAY_DETECTED: Replay detected; BODY_HASH_MISMATCH: Body hash mismatch; INVALID_SIGNATURE: Invalid signature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"403":{"description":"IP_NOT_ALLOWED: Client IP is not allowed; INSUFFICIENT_SCOPE: Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"413":{"description":"PAYLOAD_TOO_LARGE: Request payload is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"500":{"description":"INTERNAL_ERROR: Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}}},"security":[{"Ed25519ApiKey":[]}],"summary":"List supported assets for the current client","tags":["Assets"],"x-bro-integration-api":["wallets:read"],"description":"**Required API key scope(s):** `wallets:read`"}},"/api/v1/wallets":{"post":{"description":"Idempotent per organization and `X-Idempotency-Key`: retry the same request with the same key for safe replay. Same key with a different request returns an idempotency conflict.\n\n**Required API key scope(s):** `wallets:create`","operationId":"createWalletV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"X-Idempotency-Key","in":"header","description":"Trimmed non-empty ASCII value of at most 128 bytes. Reuse only for the same logical retry.","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"X-Api-Body-Hash","in":"header","description":"Lowercase SHA-256 hex of the exact raw request body bytes. Required whenever body bytes are sent (including JSON `{}`). Omit only for a true zero-byte body. Never use sha256 of empty bytes (`e3b0c442…`) for a zero-byte body — use an empty canonical BODY_HASH line instead.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{64}$"}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWalletDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletResponseDto"}}}},"400":{"description":"INVALID_REQUEST: Request validation failed; IDEMPOTENCY_KEY_REQUIRED: Idempotency key is required; IDEMPOTENCY_KEY_INVALID: Idempotency key is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"401":{"description":"AUTHENTICATION_REQUIRED: Authentication required; AMBIGUOUS_AUTH: Ambiguous authentication credentials; MISSING_AUTH_HEADER: Required authentication header is missing; INVALID_AUTH_HEADER: Authentication header is invalid; INVALID_TIMESTAMP: Authentication timestamp is invalid; CLOCK_SKEW: Authentication timestamp is outside the allowed window; REPLAY_DETECTED: Replay detected; BODY_HASH_MISMATCH: Body hash mismatch; INVALID_SIGNATURE: Invalid signature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"403":{"description":"IP_NOT_ALLOWED: Client IP is not allowed; INSUFFICIENT_SCOPE: Insufficient scope; ORGANIZATION_RESTRICTED: Organization is restricted; PLAN_LIMIT_REACHED: Plan limit is reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"404":{"description":"RESOURCE_NOT_FOUND: Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"409":{"description":"IDEMPOTENCY_CONFLICT: Idempotency key conflicts with a previous request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"413":{"description":"PAYLOAD_TOO_LARGE: Request payload is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"422":{"description":"UNSUPPORTED_CHAIN: Unsupported chain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"500":{"description":"INTERNAL_ERROR: Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"503":{"description":"UPSTREAM_UNAVAILABLE: Upstream service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}}},"security":[{"Ed25519ApiKey":[]}],"summary":"Create wallet address for current organization","tags":["Wallets"],"x-bro-integration-api":["wallets:create"]},"get":{"operationId":"listWalletsV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"cursor","required":false,"in":"query","description":"Opaque cursor returned by the previous page.","schema":{"example":"eyJ2IjoxfQ.signature","type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"integer"}},{"name":"status","required":false,"in":"query","description":"Filter by wallet status(es)","schema":{"type":"array","items":{"type":"string","enum":["ACTIVE","DISABLED","ARCHIVED"]}}},{"name":"chain","required":false,"in":"query","description":"Filter by chain identifier(s), e.g. tron:mainnet","schema":{"type":"array","items":{"type":"string"}}},{"name":"addressContains","required":false,"in":"query","description":"Case-insensitive partial match on wallet address","schema":{"example":"TNDX","type":"string"}},{"name":"createdFrom","required":false,"in":"query","description":"Wallets created on or after this date (ISO 8601)","schema":{"format":"date-time","example":"2026-01-01T00:00:00.000Z","type":"string"}},{"name":"createdTo","required":false,"in":"query","description":"Wallets created on or before this date (ISO 8601)","schema":{"format":"date-time","example":"2026-01-31T23:59:59.999Z","type":"string"}},{"name":"accountId","required":false,"in":"query","description":"Exact ledger account identifier","schema":{"type":"string"}},{"name":"sortBy","required":false,"in":"query","schema":{"default":"createdAt","type":"string","enum":["createdAt","updatedAt","chain","address","status"]}},{"name":"sortOrder","required":false,"in":"query","schema":{"default":"desc","type":"string","enum":["asc","desc"]}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListWalletsResponseDto"}}}},"400":{"description":"UNEXPECTED_REQUEST_BODY: Request body is not allowed; INVALID_QUERY_PARAMETER: Query parameter is invalid; INVALID_DATE_RANGE: Date range is invalid; INVALID_CURSOR: Cursor is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"401":{"description":"AUTHENTICATION_REQUIRED: Authentication required; AMBIGUOUS_AUTH: Ambiguous authentication credentials; MISSING_AUTH_HEADER: Required authentication header is missing; INVALID_AUTH_HEADER: Authentication header is invalid; INVALID_TIMESTAMP: Authentication timestamp is invalid; CLOCK_SKEW: Authentication timestamp is outside the allowed window; REPLAY_DETECTED: Replay detected; BODY_HASH_MISMATCH: Body hash mismatch; INVALID_SIGNATURE: Invalid signature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"403":{"description":"IP_NOT_ALLOWED: Client IP is not allowed; INSUFFICIENT_SCOPE: Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"413":{"description":"PAYLOAD_TOO_LARGE: Request payload is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"500":{"description":"INTERNAL_ERROR: Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}}},"security":[{"Ed25519ApiKey":[]}],"summary":"List wallets for current organization","tags":["Wallets"],"x-bro-integration-api":["wallets:read"],"description":"**Required API key scope(s):** `wallets:read`"}},"/api/v1/wallets/{walletId}":{"get":{"operationId":"getWalletV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"walletId","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletResponseDto"}}}},"400":{"description":"UNEXPECTED_REQUEST_BODY: Request body is not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"401":{"description":"AUTHENTICATION_REQUIRED: Authentication required; AMBIGUOUS_AUTH: Ambiguous authentication credentials; MISSING_AUTH_HEADER: Required authentication header is missing; INVALID_AUTH_HEADER: Authentication header is invalid; INVALID_TIMESTAMP: Authentication timestamp is invalid; CLOCK_SKEW: Authentication timestamp is outside the allowed window; REPLAY_DETECTED: Replay detected; BODY_HASH_MISMATCH: Body hash mismatch; INVALID_SIGNATURE: Invalid signature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"403":{"description":"IP_NOT_ALLOWED: Client IP is not allowed; INSUFFICIENT_SCOPE: Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"404":{"description":"RESOURCE_NOT_FOUND: Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"413":{"description":"PAYLOAD_TOO_LARGE: Request payload is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"500":{"description":"INTERNAL_ERROR: Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}}},"security":[{"Ed25519ApiKey":[]}],"summary":"Get wallet by id for current organization","tags":["Wallets"],"x-bro-integration-api":["wallets:read"],"description":"**Required API key scope(s):** `wallets:read`"}},"/api/v1/ledger/accounts":{"get":{"operationId":"listLedgerAccountsV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"cursor","required":false,"in":"query","description":"Opaque cursor returned by the previous page.","schema":{"example":"eyJ2IjoxfQ.signature","type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"integer"}},{"name":"search","required":false,"in":"query","schema":{"example":"Treasury","type":"string"}},{"name":"externalId","required":false,"in":"query","schema":{"minLength":1,"maxLength":128,"type":"string"}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerAccountListResponseDto"}}}},"400":{"description":"UNEXPECTED_REQUEST_BODY: Request body is not allowed; INVALID_QUERY_PARAMETER: Query parameter is invalid; INVALID_CURSOR: Cursor is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"401":{"description":"AUTHENTICATION_REQUIRED: Authentication required; AMBIGUOUS_AUTH: Ambiguous authentication credentials; MISSING_AUTH_HEADER: Required authentication header is missing; INVALID_AUTH_HEADER: Authentication header is invalid; INVALID_TIMESTAMP: Authentication timestamp is invalid; CLOCK_SKEW: Authentication timestamp is outside the allowed window; REPLAY_DETECTED: Replay detected; BODY_HASH_MISMATCH: Body hash mismatch; INVALID_SIGNATURE: Invalid signature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"403":{"description":"IP_NOT_ALLOWED: Client IP is not allowed; INSUFFICIENT_SCOPE: Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"413":{"description":"PAYLOAD_TOO_LARGE: Request payload is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"500":{"description":"INTERNAL_ERROR: Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}}},"security":[{"Ed25519ApiKey":[]}],"summary":"List ledger accounts for the current organization","tags":["Ledger"],"x-bro-integration-api":["accounts:read"],"description":"**Required API key scope(s):** `accounts:read`"},"post":{"description":"Creates a ledger account. This operation does not currently apply fingerprint-based replay/conflict handling for X-Idempotency-Key.\n\n**Required API key scope(s):** `accounts:create`","operationId":"createLedgerAccountV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"X-Api-Body-Hash","in":"header","description":"Lowercase SHA-256 hex of the exact raw request body bytes. Required whenever body bytes are sent (including JSON `{}`). Omit only for a true zero-byte body. Never use sha256 of empty bytes (`e3b0c442…`) for a zero-byte body — use an empty canonical BODY_HASH line instead.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{64}$"}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLedgerAccountDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerAccountResponseDto"}}}},"400":{"description":"INVALID_REQUEST: Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"401":{"description":"AUTHENTICATION_REQUIRED: Authentication required; AMBIGUOUS_AUTH: Ambiguous authentication credentials; MISSING_AUTH_HEADER: Required authentication header is missing; INVALID_AUTH_HEADER: Authentication header is invalid; INVALID_TIMESTAMP: Authentication timestamp is invalid; CLOCK_SKEW: Authentication timestamp is outside the allowed window; REPLAY_DETECTED: Replay detected; BODY_HASH_MISMATCH: Body hash mismatch; INVALID_SIGNATURE: Invalid signature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"403":{"description":"IP_NOT_ALLOWED: Client IP is not allowed; INSUFFICIENT_SCOPE: Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"409":{"description":"ACCOUNT_EXTERNAL_ID_CONFLICT: Account external ID already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"413":{"description":"PAYLOAD_TOO_LARGE: Request payload is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"422":{"description":"ACCOUNT_METADATA_TOO_LARGE: Account metadata exceeds 16 KiB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"500":{"description":"INTERNAL_ERROR: Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}}},"security":[{"Ed25519ApiKey":[]}],"summary":"Create a ledger account for the current organization","tags":["Ledger"],"x-bro-integration-api":["accounts:create"]}},"/api/v1/ledger/accounts/{accountId}":{"get":{"operationId":"getLedgerAccountV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"accountId","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerAccountDetailDto"}}}},"400":{"description":"UNEXPECTED_REQUEST_BODY: Request body is not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"401":{"description":"AUTHENTICATION_REQUIRED: Authentication required; AMBIGUOUS_AUTH: Ambiguous authentication credentials; MISSING_AUTH_HEADER: Required authentication header is missing; INVALID_AUTH_HEADER: Authentication header is invalid; INVALID_TIMESTAMP: Authentication timestamp is invalid; CLOCK_SKEW: Authentication timestamp is outside the allowed window; REPLAY_DETECTED: Replay detected; BODY_HASH_MISMATCH: Body hash mismatch; INVALID_SIGNATURE: Invalid signature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"403":{"description":"IP_NOT_ALLOWED: Client IP is not allowed; INSUFFICIENT_SCOPE: Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"404":{"description":"RESOURCE_NOT_FOUND: Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"413":{"description":"PAYLOAD_TOO_LARGE: Request payload is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"500":{"description":"INTERNAL_ERROR: Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}}},"security":[{"Ed25519ApiKey":[]}],"summary":"Read a ledger account in the current organization","tags":["Ledger"],"x-bro-integration-api":["accounts:read"],"description":"**Required API key scope(s):** `accounts:read`"}},"/api/v1/ledger/accounts/{accountId}/wallets":{"get":{"operationId":"listLedgerAccountWalletsV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"accountId","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Opaque cursor returned by the previous page.","schema":{"example":"eyJ2IjoxfQ.signature","type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"integer"}},{"name":"status","required":false,"in":"query","schema":{"type":"array","items":{"type":"string","enum":["ACTIVE","DISABLED","ARCHIVED"]}}},{"name":"chain","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"addressContains","required":false,"in":"query","schema":{"type":"string"}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLedgerAccountWalletsResponseDto"}}}},"400":{"description":"UNEXPECTED_REQUEST_BODY: Request body is not allowed; INVALID_QUERY_PARAMETER: Query parameter is invalid; INVALID_CURSOR: Cursor is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"401":{"description":"AUTHENTICATION_REQUIRED: Authentication required; AMBIGUOUS_AUTH: Ambiguous authentication credentials; MISSING_AUTH_HEADER: Required authentication header is missing; INVALID_AUTH_HEADER: Authentication header is invalid; INVALID_TIMESTAMP: Authentication timestamp is invalid; CLOCK_SKEW: Authentication timestamp is outside the allowed window; REPLAY_DETECTED: Replay detected; BODY_HASH_MISMATCH: Body hash mismatch; INVALID_SIGNATURE: Invalid signature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"403":{"description":"IP_NOT_ALLOWED: Client IP is not allowed; INSUFFICIENT_SCOPE: Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"404":{"description":"RESOURCE_NOT_FOUND: Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"413":{"description":"PAYLOAD_TOO_LARGE: Request payload is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"500":{"description":"INTERNAL_ERROR: Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}}},"security":[{"Ed25519ApiKey":[]}],"summary":"List wallets for a ledger account in the current organization","tags":["Ledger"],"x-bro-integration-api":["wallets:read"],"description":"**Required API key scope(s):** `wallets:read`"}},"/api/v1/ledger/accounts/{accountId}/balances":{"get":{"operationId":"listLedgerAccountBalancesV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"accountId","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Opaque cursor returned by the previous page.","schema":{"example":"eyJ2IjoxfQ.signature","type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"integer"}},{"name":"chain","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"asset","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLedgerAccountBalancesResponseDto"}}}},"400":{"description":"UNEXPECTED_REQUEST_BODY: Request body is not allowed; INVALID_QUERY_PARAMETER: Query parameter is invalid; INVALID_CURSOR: Cursor is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"401":{"description":"AUTHENTICATION_REQUIRED: Authentication required; AMBIGUOUS_AUTH: Ambiguous authentication credentials; MISSING_AUTH_HEADER: Required authentication header is missing; INVALID_AUTH_HEADER: Authentication header is invalid; INVALID_TIMESTAMP: Authentication timestamp is invalid; CLOCK_SKEW: Authentication timestamp is outside the allowed window; REPLAY_DETECTED: Replay detected; BODY_HASH_MISMATCH: Body hash mismatch; INVALID_SIGNATURE: Invalid signature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"403":{"description":"IP_NOT_ALLOWED: Client IP is not allowed; INSUFFICIENT_SCOPE: Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"404":{"description":"RESOURCE_NOT_FOUND: Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"413":{"description":"PAYLOAD_TOO_LARGE: Request payload is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"500":{"description":"INTERNAL_ERROR: Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}}},"security":[{"Ed25519ApiKey":[]}],"summary":"List account balance projections for the current organization","tags":["Ledger"],"x-bro-integration-api":["wallets:read"],"description":"**Required API key scope(s):** `wallets:read`"}},"/api/v1/ledger/accounts/{accountId}/transactions":{"get":{"operationId":"listLedgerAccountTransactionsV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"accountId","required":true,"in":"path","description":"Ledger account id","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Opaque cursor returned by the previous page.","schema":{"example":"eyJ2IjoxfQ.signature","type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"integer"}},{"name":"walletId","required":false,"in":"query","schema":{"type":"string"}},{"name":"clientReference","required":false,"in":"query","schema":{"type":"string"}},{"name":"chain","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"asset","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"status","required":false,"in":"query","schema":{"type":"array","items":{"type":"string","enum":["PENDING","CONFIRMED","FAILED","FAILED_ON_CHAIN"]}}},{"name":"type","required":false,"in":"query","schema":{"type":"array","items":{"type":"string","enum":["DEPOSIT","WITHDRAWAL","INTERNAL_TRANSFER","ADJUSTMENT"]}}},{"name":"createdFrom","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"createdTo","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTransactionsResponseDto"}}}},"400":{"description":"UNEXPECTED_REQUEST_BODY: Request body is not allowed; INVALID_QUERY_PARAMETER: Query parameter is invalid; INVALID_DATE_RANGE: Date range is invalid; INVALID_CURSOR: Cursor is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"401":{"description":"AUTHENTICATION_REQUIRED: Authentication required; AMBIGUOUS_AUTH: Ambiguous authentication credentials; MISSING_AUTH_HEADER: Required authentication header is missing; INVALID_AUTH_HEADER: Authentication header is invalid; INVALID_TIMESTAMP: Authentication timestamp is invalid; CLOCK_SKEW: Authentication timestamp is outside the allowed window; REPLAY_DETECTED: Replay detected; BODY_HASH_MISMATCH: Body hash mismatch; INVALID_SIGNATURE: Invalid signature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"403":{"description":"IP_NOT_ALLOWED: Client IP is not allowed; INSUFFICIENT_SCOPE: Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"404":{"description":"RESOURCE_NOT_FOUND: Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"413":{"description":"PAYLOAD_TOO_LARGE: Request payload is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"500":{"description":"INTERNAL_ERROR: Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}}},"security":[{"Ed25519ApiKey":[]}],"summary":"List ledger transactions for a ledger account in the current organization","tags":["Ledger"],"x-bro-integration-api":["transactions:read"],"description":"**Required API key scope(s):** `transactions:read`"}},"/api/v1/wallets/{walletId}/balances":{"get":{"operationId":"listWalletBalancesV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"walletId","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Opaque cursor returned by the previous page.","schema":{"example":"eyJ2IjoxfQ.signature","type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"integer"}},{"name":"asset","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLedgerBalancesResponseDto"}}}},"400":{"description":"UNEXPECTED_REQUEST_BODY: Request body is not allowed; INVALID_QUERY_PARAMETER: Query parameter is invalid; INVALID_CURSOR: Cursor is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"401":{"description":"AUTHENTICATION_REQUIRED: Authentication required; AMBIGUOUS_AUTH: Ambiguous authentication credentials; MISSING_AUTH_HEADER: Required authentication header is missing; INVALID_AUTH_HEADER: Authentication header is invalid; INVALID_TIMESTAMP: Authentication timestamp is invalid; CLOCK_SKEW: Authentication timestamp is outside the allowed window; REPLAY_DETECTED: Replay detected; BODY_HASH_MISMATCH: Body hash mismatch; INVALID_SIGNATURE: Invalid signature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"403":{"description":"IP_NOT_ALLOWED: Client IP is not allowed; INSUFFICIENT_SCOPE: Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"404":{"description":"RESOURCE_NOT_FOUND: Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"413":{"description":"PAYLOAD_TOO_LARGE: Request payload is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"500":{"description":"INTERNAL_ERROR: Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}}},"security":[{"Ed25519ApiKey":[]}],"summary":"List wallet balance projections for the current organization","tags":["Ledger"],"x-bro-integration-api":["wallets:read"],"description":"**Required API key scope(s):** `wallets:read`"}},"/api/v1/wallets/{walletId}/ledger-entries":{"get":{"operationId":"listWalletLedgerEntriesV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"walletId","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Opaque cursor returned by the previous page.","schema":{"example":"eyJ2IjoxfQ.signature","type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"integer"}},{"name":"transactionId","required":false,"in":"query","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"type":"array","items":{"type":"string","enum":["PENDING","POSTED","VOIDED"]}}},{"name":"direction","required":false,"in":"query","schema":{"type":"array","items":{"type":"string","enum":["CREDIT","DEBIT"]}}},{"name":"entryType","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"asset","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"createdFrom","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"createdTo","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLedgerEntriesResponseDto"}}}},"400":{"description":"UNEXPECTED_REQUEST_BODY: Request body is not allowed; INVALID_QUERY_PARAMETER: Query parameter is invalid; INVALID_DATE_RANGE: Date range is invalid; INVALID_CURSOR: Cursor is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"401":{"description":"AUTHENTICATION_REQUIRED: Authentication required; AMBIGUOUS_AUTH: Ambiguous authentication credentials; MISSING_AUTH_HEADER: Required authentication header is missing; INVALID_AUTH_HEADER: Authentication header is invalid; INVALID_TIMESTAMP: Authentication timestamp is invalid; CLOCK_SKEW: Authentication timestamp is outside the allowed window; REPLAY_DETECTED: Replay detected; BODY_HASH_MISMATCH: Body hash mismatch; INVALID_SIGNATURE: Invalid signature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"403":{"description":"IP_NOT_ALLOWED: Client IP is not allowed; INSUFFICIENT_SCOPE: Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"404":{"description":"RESOURCE_NOT_FOUND: Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"413":{"description":"PAYLOAD_TOO_LARGE: Request payload is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"500":{"description":"INTERNAL_ERROR: Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}}},"security":[{"Ed25519ApiKey":[]}],"summary":"List wallet ledger entries for the current organization","tags":["Ledger"],"x-bro-integration-api":["wallets:read"],"description":"**Required API key scope(s):** `wallets:read`"}},"/api/v1/transactions":{"post":{"description":"Creates a withdrawal for the authenticated organization. Idempotent per organization and `X-Idempotency-Key`: retry the same request with the same key for safe replay (returns the same transaction). Same key with a different body/params returns 409.\n\n**Required API key scope(s):** `withdrawals:create`","operationId":"createTransactionV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"X-Idempotency-Key","in":"header","description":"Trimmed non-empty ASCII value of at most 128 bytes. Reuse only for the same logical retry.","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"X-Api-Body-Hash","in":"header","description":"Lowercase SHA-256 hex of the exact raw request body bytes. Required whenever body bytes are sent (including JSON `{}`). Omit only for a true zero-byte body. Never use sha256 of empty bytes (`e3b0c442…`) for a zero-byte body — use an empty canonical BODY_HASH line instead.","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{64}$"}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTransactionDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionDetailDto"}}}},"400":{"description":"INVALID_REQUEST: Request validation failed; IDEMPOTENCY_KEY_REQUIRED: Idempotency key is required; IDEMPOTENCY_KEY_INVALID: Idempotency key is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"401":{"description":"AUTHENTICATION_REQUIRED: Authentication required; AMBIGUOUS_AUTH: Ambiguous authentication credentials; MISSING_AUTH_HEADER: Required authentication header is missing; INVALID_AUTH_HEADER: Authentication header is invalid; INVALID_TIMESTAMP: Authentication timestamp is invalid; CLOCK_SKEW: Authentication timestamp is outside the allowed window; REPLAY_DETECTED: Replay detected; BODY_HASH_MISMATCH: Body hash mismatch; INVALID_SIGNATURE: Invalid signature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"403":{"description":"IP_NOT_ALLOWED: Client IP is not allowed; INSUFFICIENT_SCOPE: Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"409":{"description":"IDEMPOTENCY_CONFLICT: Idempotency key conflicts with a previous request; CLIENT_REFERENCE_CONFLICT: Transaction client reference already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"413":{"description":"PAYLOAD_TOO_LARGE: Request payload is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"422":{"description":"UNSUPPORTED_CHAIN: Unsupported chain; UNSUPPORTED_ASSET: Unsupported asset; INVALID_ADDRESS: Invalid address; INVALID_FEE_LIMIT: Invalid fee limit; INSUFFICIENT_AVAILABLE_BALANCE: Insufficient available balance; WITHDRAWALS_BLOCKED: Withdrawals are blocked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"500":{"description":"INTERNAL_ERROR: Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"503":{"description":"UPSTREAM_UNAVAILABLE: Upstream service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}}},"security":[{"Ed25519ApiKey":[]}],"summary":"Create outgoing transaction","tags":["Transactions"],"x-bro-integration-api":["withdrawals:create"]},"get":{"description":"Returns ledger-backed transactions for the authenticated organization with cursor pagination. Optional filters narrow by wallet, ledger account, status, type, chain, asset, and creation time range.\n\n**Required API key scope(s):** `transactions:read`","operationId":"listTransactionsV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"cursor","required":false,"in":"query","description":"Opaque cursor returned by the previous page.","schema":{"example":"eyJ2IjoxfQ.signature","type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"integer"}},{"name":"accountId","required":false,"in":"query","schema":{"type":"string"}},{"name":"walletId","required":false,"in":"query","schema":{"type":"string"}},{"name":"clientReference","required":false,"in":"query","schema":{"type":"string"}},{"name":"chain","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"asset","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"status","required":false,"in":"query","schema":{"type":"array","items":{"type":"string","enum":["PENDING","CONFIRMED","FAILED","FAILED_ON_CHAIN"]}}},{"name":"type","required":false,"in":"query","schema":{"type":"array","items":{"type":"string","enum":["DEPOSIT","WITHDRAWAL","INTERNAL_TRANSFER","ADJUSTMENT"]}}},{"name":"createdFrom","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"createdTo","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTransactionsResponseDto"}}}},"400":{"description":"UNEXPECTED_REQUEST_BODY: Request body is not allowed; INVALID_QUERY_PARAMETER: Query parameter is invalid; INVALID_DATE_RANGE: Date range is invalid; INVALID_CURSOR: Cursor is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"401":{"description":"AUTHENTICATION_REQUIRED: Authentication required; AMBIGUOUS_AUTH: Ambiguous authentication credentials; MISSING_AUTH_HEADER: Required authentication header is missing; INVALID_AUTH_HEADER: Authentication header is invalid; INVALID_TIMESTAMP: Authentication timestamp is invalid; CLOCK_SKEW: Authentication timestamp is outside the allowed window; REPLAY_DETECTED: Replay detected; BODY_HASH_MISMATCH: Body hash mismatch; INVALID_SIGNATURE: Invalid signature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"403":{"description":"IP_NOT_ALLOWED: Client IP is not allowed; INSUFFICIENT_SCOPE: Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"413":{"description":"PAYLOAD_TOO_LARGE: Request payload is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"500":{"description":"INTERNAL_ERROR: Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}}},"security":[{"Ed25519ApiKey":[]}],"summary":"List transactions","tags":["Transactions"],"x-bro-integration-api":["transactions:read"]}},"/api/v1/transactions/{id}":{"get":{"description":"Returns one ledger-backed transaction with balance effects and on-chain details when available. The transaction must belong to the authenticated organization.\n\n**Required API key scope(s):** `transactions:read`","operationId":"getTransactionV1","parameters":[{"name":"X-Api-Key-Id","in":"header","description":"Lowercase RFC 4122 API key UUID used for request signing.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"X-Api-Timestamp","in":"header","description":"Minimal unsigned decimal Unix timestamp in seconds (UTC). Must match the value in the canonical signing string.","required":true,"schema":{"type":"string","pattern":"^(?:0|[1-9][0-9]*)$"}},{"name":"X-Api-Nonce","in":"header","description":"Unique 16–128 character value from [A-Za-z0-9._~-] per request. Must match the canonical signing string.","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._~-]{16,128}$"}},{"name":"X-Api-Signature","in":"header","description":"Padded standard RFC 4648 Base64 encoding of the 64-byte Ed25519 signature of the canonical string.","required":true,"schema":{"type":"string","minLength":88,"maxLength":88,"pattern":"^[A-Za-z0-9+/]{86}==$"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-request-id","in":"header","description":"Unique request tracking ID","required":false,"schema":{"type":"string"}},{"name":"x-lang","in":"header","description":"Language override through headers.","required":false,"schema":{"type":"string","default":"en","enum":["en","uk","ru","tr"]}},{"name":"lang","in":"query","description":"Language override through query params (e.g., ?lang=uk)","required":false,"schema":{"type":"string","enum":["en","uk","ru","tr"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionDetailDto"}}}},"400":{"description":"UNEXPECTED_REQUEST_BODY: Request body is not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"401":{"description":"AUTHENTICATION_REQUIRED: Authentication required; AMBIGUOUS_AUTH: Ambiguous authentication credentials; MISSING_AUTH_HEADER: Required authentication header is missing; INVALID_AUTH_HEADER: Authentication header is invalid; INVALID_TIMESTAMP: Authentication timestamp is invalid; CLOCK_SKEW: Authentication timestamp is outside the allowed window; REPLAY_DETECTED: Replay detected; BODY_HASH_MISMATCH: Body hash mismatch; INVALID_SIGNATURE: Invalid signature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"403":{"description":"IP_NOT_ALLOWED: Client IP is not allowed; INSUFFICIENT_SCOPE: Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"404":{"description":"RESOURCE_NOT_FOUND: Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"413":{"description":"PAYLOAD_TOO_LARGE: Request payload is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}},"500":{"description":"INTERNAL_ERROR: Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorResponseDto"}}}}},"security":[{"Ed25519ApiKey":[]}],"summary":"Get transaction","tags":["Transactions"],"x-bro-integration-api":["transactions:read"]}}},"info":{"title":"BroSettlement Integration API","description":"**BroSettlement Integration API** — programmatic access with **Ed25519-signed API keys**.\n\n### API versioning\nAll endpoints are under **`/api/v1`**.\n \n\n### Required headers\n\n| Header | Required | Description |\n|--------|----------|-------------|\n| `X-Api-Key-Id` | Yes | Key UUID from the dashboard |\n| `X-Api-Timestamp` | Yes | Unix seconds (UTC); ±300s clock skew |\n| `X-Api-Nonce` | Yes | Unique per request |\n| `X-Api-Signature` | Yes | Base64 Ed25519 signature |\n| `X-Api-Body-Hash` | Body-specific | SHA-256 hex of the exact raw body when body bytes are sent; follow the operation definition |\n| `X-Idempotency-Key` | Operation-specific | Required for Wallet and Transaction creation with JWT or API-key auth; non-target operations document their own existing rules |\n\n### Request signing for REST-API calls\n\n**Canonical string (HTTP)**\n\n```\nMETHOD\\nEXACT_REQUEST_TARGET\\nBODY_HASH\\nTIMESTAMP\\nNONCE\\nAPI_KEY_ID\n```\n\n- `METHOD`: uppercase (`GET`, `POST`, …)\n- `EXACT_REQUEST_TARGET`: raw path and query exactly as sent (e.g. `/api/v1/wallets?after=10&empty=`)\n- `BODY_HASH`: SHA-256 hex of the exact raw body when body bytes are sent; otherwise the canonical line is empty. Do **not** use `sha256(\"\")` (`e3b0c442…`) for a zero-byte body. JSON `{}` is two body bytes and must be hashed as such (e.g. `POST /api/v1/mpc/initialize`).\n- `TIMESTAMP` / `NONCE` / `API_KEY_ID`: same as `X-Api-Timestamp` / `X-Api-Nonce` / `X-Api-Key-Id`; strict header grammar applies\n\n**Example (GET)** — note the empty third line:\n\n```\nGET\n/api/v1/accounts?after=10&empty=\n\n1738845600\n018f4df0-5a7f-7352-bd4a-5fd069c2a0c1\n11111111-2222-4333-8444-555555555555\n```\n\n### POST idempotency (`X-Idempotency-Key`)\n\nFor operations that require it:\n\n1. Send a unique `X-Idempotency-Key` per logical operation (UUID recommended).\n2. After a timeout or unknown outcome, retry the same request with the same key for safe replay.\n3. Do not reuse a key with a different body or parameters.\n\n| Endpoint | Conflict HTTP status |\n|----------|----------------------|\n| `POST /api/v1/transactions` | `409` |\n| `POST /api/v1/wallets` | `400` |\n| `POST /api/v1/mpc/initialize` | `400` |\n\nMissing or invalid keys return `400` where the operation requires the header.\n`POST /api/v1/ledger/accounts` does not require or document the header and does **not** currently apply fingerprint replay/conflict.\nSee `apps/client-api/docs/api-tokens.md` for the complete contract.\n\n\n### WebSocket events\n\nOrg-scoped realtime events are not listed as HTTP paths. Connect to `wss://<host>/v1/ws` with scope `websockets:read` \n\n\n**Canonical** — `WS_CONNECT\\n/v1/ws\\n<TIMESTAMP>\\n<NONCE>`.\n\nThe server verifies the Ed25519 signature before body hash, IP allowlist, and replay nonce checks. The five-line format is unsupported. Swagger UI cannot compute signatures — use your SDK or Postman. Full guide: `apps/client-api/docs/api-tokens.md`.\n","version":"1.0","contact":{}},"tags":[],"servers":[{"url":"https://brosettlement-staging-api.brolabel.io","description":"Server"}],"components":{"securitySchemes":{"Ed25519ApiKey":{"type":"apiKey","in":"header","name":"X-Api-Key-Id","description":"API key UUID. With Ed25519 signing, also send X-Api-Timestamp, X-Api-Nonce, X-Api-Signature, and X-Api-Body-Hash on mutations — see the API description."}},"schemas":{"RegisterDto":{"type":"object","properties":{"email":{"type":"string","example":"user@example.com","description":"The email address of the user"},"password":{"type":"string","example":"P@ssword123!","description":"A secure password (min 12 characters)","minLength":12,"maxLength":64}},"required":["email","password"]},"VerifyEmailDto":{"type":"object","properties":{"token":{"type":"string","description":"The one-time token sent to the user email"}},"required":["token"]},"LoginDto":{"type":"object","properties":{"email":{"type":"string","example":"user@example.com"},"password":{"type":"string","example":"P@ssword123!","minLength":12,"maxLength":64}},"required":["email","password"]},"VerificationRequestStatusResponseDto":{"type":"object","properties":{"status":{"type":"string","enum":["PENDING","TOTP_VERIFIED","COMPLETED","INVALIDATED"],"description":"Current status of the verification request"},"totpRequired":{"type":"boolean","description":"Whether TOTP verification is required before completing this request (true only if the account has TOTP enabled)","example":false},"totpAttempts":{"type":"number","description":"Number of TOTP verification attempts made","example":0},"expiresAt":{"format":"date-time","type":"string","description":"ISO 8601 expiry time of the request","example":"2025-02-01T12:00:00.000Z"}},"required":["status","totpRequired","totpAttempts","expiresAt"]},"ForgotPasswordRequestDto":{"type":"object","properties":{"email":{"type":"string","example":"user@example.com","description":"Email address to send the password reset link to"}},"required":["email"]},"ForgotPasswordVerifyTotpDto":{"type":"object","properties":{"resetToken":{"type":"string","description":"The reset token from the password reset email link","example":"a1b2c3d4e5f6..."},"code":{"type":"string","description":"TOTP code (6 digits from authenticator app)","example":"123456","minLength":6,"maxLength":6,"pattern":"^[0-9]{6}$"}},"required":["resetToken","code"]},"ForgotPasswordSetPasswordDto":{"type":"object","properties":{"resetToken":{"type":"string","description":"The reset token from the password reset email (after TOTP verification)","example":"a1b2c3d4e5f6..."},"newPassword":{"type":"string","example":"P@ssword123!","description":"New password (min 12 characters)","minLength":12,"maxLength":64}},"required":["resetToken","newPassword"]},"TotpEnrollmentDto":{"type":"object","properties":{"qrCode":{"type":"string","description":"Base64 QR code for authenticator apps"},"manualEntryKey":{"type":"string","description":"Manual entry secret key"},"recoveryCodes":{"description":"One-time use recovery codes","type":"array","items":{"type":"string"}}},"required":["qrCode","manualEntryKey","recoveryCodes"]},"AuthOrganizationDto":{"type":"object","properties":{"id":{"type":"string","description":"Organization ID","example":"4d0d9c3a-3b9e-4f34-9c32-9e3b9c3a4d0d"},"name":{"type":"string","description":"Organization name","example":"Acme Inc."},"status":{"type":"string","enum":["ACTIVE","RESTRICTED","SUSPENDED","DELETED"],"description":"Organization status"},"roleName":{"type":"object","description":"Role name","example":"Admin"},"joinedAt":{"type":"object","description":"Joined at"}},"required":["id","name","status","roleName","joinedAt"]},"LoginResponseDto":{"type":"object","properties":{"message":{"type":"string","description":"Localization key or message for the user"},"mfaRequired":{"type":"boolean","description":"Indicates if the user must proceed to Step 2 (TOTP)"},"challengeId":{"type":"string","description":"The ID linking Step 1 and Step 2 in the DB"},"enrollmentRequired":{"type":"boolean","description":"True if the user has not set up TOTP yet"},"totpData":{"description":"Data needed to setup TOTP","allOf":[{"$ref":"#/components/schemas/TotpEnrollmentDto"}]},"accessToken":{"type":"string","description":"JWT Access Token (only if MFA is NOT required)"},"organizations":{"description":"Organizations the user is a member of","type":"array","items":{"$ref":"#/components/schemas/AuthOrganizationDto"}}},"required":["message","mfaRequired"]},"VerifyLoginDto":{"type":"object","properties":{"challengeId":{"type":"string","description":"The challengeId received from Step 1","format":"uuid"},"orgId":{"type":"string","description":"Specific organization ID to log into"},"code":{"type":"string","description":"TOTP code (6 digits from authenticator app)","example":"123456","minLength":6,"maxLength":6,"pattern":"^[0-9]{6}$"}},"required":["challengeId","code"]},"VerifyLoginResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","description":"The JWT access token used for Bearer authentication","example":"eyJhbGciOiJIUzI1Ni..."},"message":{"type":"string","description":"Localization key for the success message","example":"auth.success.LOGIN_SUCCESS"},"tokenType":{"type":"string","description":"The type of token being returned","example":"Bearer"},"organizations":{"description":"Organizations the user is a member of","type":"array","items":{"$ref":"#/components/schemas/AuthOrganizationDto"}}},"required":["accessToken","message","tokenType"]},"VerifyTotpDto":{"type":"object","properties":{"challengeId":{"type":"string","description":"The challengeId received from Step 1","format":"uuid"},"orgId":{"type":"string","description":"Specific organization ID to log into"},"code":{"type":"string","description":"TOTP code (6 digits from authenticator app)","example":"123456","minLength":6,"maxLength":6,"pattern":"^[0-9]{6}$"}},"required":["challengeId","code"]},"VerifyTotpResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","description":"The JWT access token used for Bearer authentication","example":"eyJhbGciOiJIUzI1Ni..."},"message":{"type":"string","description":"Localization key for the success message","example":"auth.success.LOGIN_SUCCESS"},"tokenType":{"type":"string","description":"The type of token being returned","example":"Bearer"}},"required":["accessToken","message","tokenType"]},"ChangePasswordDto":{"type":"object","properties":{"currentPassword":{"type":"string","description":"Current account password"},"newPassword":{"type":"string","example":"P@ssword123!","description":"New password (same rules as registration)","minLength":12,"maxLength":64},"code":{"type":"string","description":"TOTP code (6 digits from authenticator app)","example":"123456","minLength":6,"maxLength":6,"pattern":"^[0-9]{6}$"}},"required":["currentPassword","newPassword","code"]},"OrganizationActiveWithdrawalHoldDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"reason":{"type":"string","description":"Reason withdrawals were stopped for this organization"},"blockedAt":{"type":"string","format":"date-time"}},"required":["id","reason","blockedAt"]},"AuthOrganizationSubscriptionDto":{"type":"object","properties":{"id":{"type":"string","description":"Billing plan ID for the organization subscription","example":"4d0d9c3a-3b9e-4f34-9c32-9e3b9c3a4d0d"},"name":{"type":"string","description":"Billing plan display name","example":"Growth"},"code":{"type":"string","description":"Billing plan code","example":"growth"}},"required":["id","name","code"]},"CurrentAuthOrganizationDto":{"type":"object","properties":{"id":{"type":"string","description":"Organization ID","example":"4d0d9c3a-3b9e-4f34-9c32-9e3b9c3a4d0d"},"name":{"type":"string","description":"Organization name","example":"Acme Inc."},"status":{"type":"string","enum":["ACTIVE","RESTRICTED","SUSPENDED","DELETED"],"description":"Organization status"},"roleName":{"type":"object","description":"Role name","example":"Admin"},"joinedAt":{"type":"object","description":"Joined at"},"hasDeclinedBalance":{"type":"boolean","description":"Whether billing credit balance is negative (overdrawn)","example":false},"availableUsdCents":{"type":"number","description":"Available prepaid billing credit balance in USD cents (negative when overdrawn)","example":5000},"withdrawalsBlocked":{"type":"boolean","description":"Whether outgoing withdrawals are currently blocked by platform operations","example":false},"activeWithdrawalHold":{"nullable":true,"description":"Present when withdrawals are blocked; includes the reason notice shown to members","allOf":[{"$ref":"#/components/schemas/OrganizationActiveWithdrawalHoldDto"}]},"subscription":{"nullable":true,"description":"Billing plan for the organization subscription, or null if the org has not subscribed yet.","allOf":[{"$ref":"#/components/schemas/AuthOrganizationSubscriptionDto"}]}},"required":["id","name","status","roleName","joinedAt","hasDeclinedBalance","availableUsdCents","withdrawalsBlocked","subscription"]},"PendingInvitationDto":{"type":"object","properties":{"requestId":{"type":"string","example":"verification-request-uuid"},"orgId":{"type":"string","example":"org-uuid"},"orgName":{"type":"string","example":"Acme Corp"},"roleId":{"type":"string","example":"role-uuid"},"roleName":{"type":"string","example":"Operator"},"expiresAt":{"format":"date-time","type":"string","example":"2026-04-01T12:00:00.000Z"},"scopes":{"example":"scopes","type":"array","items":{"type":"string"}}},"required":["requestId","orgId","orgName","roleId","roleName","expiresAt","scopes"]},"WhoAmIResponseDto":{"type":"object","properties":{"id":{"type":"string","example":"uuid-string"},"email":{"type":"string","example":"user@example.com"},"scopes":{"description":"Scopes the user has access to","type":"array","items":{"type":"array"}},"emailVerifiedAt":{"type":"object","example":"2024-01-01T00:00:00Z"},"displayName":{"type":"object","example":"John Doe"},"phone":{"type":"object","example":"+1234567890"},"status":{"type":"string","enum":["ACTIVE","DISABLED","DELETED"],"description":"User status"},"totpEnabled":{"type":"boolean","example":true},"organizations":{"description":"Organizations the user is a member of","type":"array","items":{"$ref":"#/components/schemas/AuthOrganizationDto"}},"currentOrganization":{"nullable":true,"description":"Organization for the current access-token session (session.orgId). Null if the session has no org yet (pre-onboarding) or the org is no longer an active membership.","allOf":[{"$ref":"#/components/schemas/CurrentAuthOrganizationDto"}]},"pendingInvitations":{"description":"Pending organization invitations for the current user","type":"array","items":{"$ref":"#/components/schemas/PendingInvitationDto"}}},"required":["id","email","scopes","emailVerifiedAt","displayName","phone","totpEnabled","organizations","currentOrganization","pendingInvitations"]},"AuthActivityLogItemDto":{"type":"object","properties":{"id":{"type":"string","example":"uuid-string"},"outcome":{"type":"string","enum":["success","failure"]},"reason":{"type":"string","nullable":true,"example":"mfa_login_succeeded"},"ip":{"type":"string","nullable":true,"example":"192.168.1.1"},"userAgent":{"type":"string","nullable":true,"example":"Mozilla/5.0..."},"occurredAt":{"format":"date-time","type":"string","example":"2025-01-15T12:00:00.000Z"}},"required":["id","outcome","occurredAt"]},"AuthActivityLogsResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AuthActivityLogItemDto"}},"total":{"type":"number","example":42,"description":"Total count matching the filters"},"page":{"type":"number","example":1,"description":"Current page (1-based)"},"limit":{"type":"number","example":20,"description":"Page size"},"hasMore":{"type":"boolean","example":true,"description":"Whether more pages exist (for infinite scroll)"}},"required":["data","total","page","limit","hasMore"]},"SessionListItemDto":{"type":"object","properties":{"id":{"type":"string","example":"uuid-string","description":"Session ID"},"status":{"type":"string","enum":["ACTIVE","REVOKED","EXPIRED"],"description":"Session status"},"createdAt":{"format":"date-time","type":"string","example":"2025-01-15T12:00:00.000Z","description":"When the session was created"},"lastActivityAt":{"type":"string","nullable":true,"example":"2025-01-15T14:30:00.000Z","description":"Last activity timestamp"},"revokedAt":{"type":"string","nullable":true,"example":"2025-01-15T16:00:00.000Z","description":"When the session was revoked (if applicable)"},"currentSession":{"type":"boolean","example":false,"description":"True if this is the session used for the current request"}},"required":["id","status","createdAt","currentSession"]},"SessionsListResponseDto":{"type":"object","properties":{"data":{"description":"List of user sessions","type":"array","items":{"$ref":"#/components/schemas/SessionListItemDto"}},"total":{"type":"number","example":42,"description":"Total count of sessions"},"page":{"type":"number","example":1,"description":"Current page (1-based)"},"limit":{"type":"number","example":20,"description":"Page size"},"hasMore":{"type":"boolean","example":true,"description":"Whether more pages exist (for infinite scroll)"}},"required":["data","total","page","limit","hasMore"]},"RevokeSessionDto":{"type":"object","properties":{"sessionId":{"type":"string","description":"ID of the session to revoke","format":"uuid"},"code":{"type":"string","description":"TOTP code (6 digits from authenticator app)","example":"123456","minLength":6,"maxLength":6,"pattern":"^[0-9]{6}$"}},"required":["sessionId","code"]},"CreateApiKeyWithTotpDto":{"type":"object","properties":{"name":{"type":"string","example":"Staging Backend","maxLength":255},"publicKey":{"type":"string","description":"Ed25519 public key in PEM format (-----BEGIN PUBLIC KEY----- ... -----END PUBLIC KEY-----)","example":"-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA...\n-----END PUBLIC KEY-----"},"scopes":{"description":"Minimal scopes for this key (`resource:action`). Prefer values from backend `RbacScopes` (`rbac-scopes.constants.ts`).","example":["accounts:read","deposits:create"],"minItems":1,"type":"array","items":{"type":"string"}},"ipWhitelist":{"description":"Optional IP allowlist. Bare IPs (e.g. \"31.217.170.61\") or CIDR blocks (e.g. \"192.168.1.0/24\"). Omit or send [] for no IP restriction.","example":["31.217.170.61","10.0.0.0/8"],"type":"array","items":{"type":"string"}},"expiresAt":{"type":"string","description":"Optional expiry (ISO 8601). If omitted, key does not expire.","example":"2027-12-31T23:59:59.000Z","format":"date-time"},"code":{"type":"string","description":"TOTP code (6 digits from authenticator app)","example":"123456","minLength":6,"maxLength":6,"pattern":"^[0-9]{6}$"}},"required":["name","publicKey","scopes","code"]},"CreateApiKeyResponseDto":{"type":"object","properties":{"keyId":{"type":"string","description":"Key ID to send as x-api-key-id with every signed request","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"name":{"type":"string","description":"Friendly name","example":"Staging Backend"},"scopes":{"description":"Scopes granted","example":["accounts:read","deposits:create"],"type":"array","items":{"type":"string"}},"ipWhitelist":{"description":"IP allowlist (CIDR). Empty means no IP restriction.","example":["31.217.170.61/32"],"type":"array","items":{"type":"string"}},"expiresAt":{"type":"object","description":"Expiry if set (ISO 8601), null if no expiry","example":"2027-12-31T23:59:59.000Z","format":"date-time","nullable":true},"createdAt":{"type":"string","description":"Creation time (ISO 8601)","example":"2026-02-19T12:00:00.000Z","format":"date-time"}},"required":["keyId","name","scopes","ipWhitelist","expiresAt","createdAt"]},"ApiKeyListItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Internal database ID of the API key","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"name":{"type":"string","description":"Friendly name for the key","example":"Staging Backend"},"status":{"type":"string","enum":["ACTIVE","REVOKED","ROTATED","EXPIRED"],"description":"Current status of the key"},"ipWhitelist":{"description":"IP allowlist (CIDR). Empty means no IP restriction.","example":["31.217.170.61/32"],"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","description":"Creation time (ISO 8601)","example":"2026-02-19T12:00:00.000Z","format":"date-time"},"lastUsedAt":{"type":"object","description":"Last time the key was used for a signed request (ISO 8601)","example":"2026-02-19T14:30:00.000Z","format":"date-time","nullable":true},"expiresAt":{"type":"object","description":"Expiry time if set (ISO 8601), null if no expiry","example":"2027-02-19T12:00:00.000Z","format":"date-time","nullable":true}},"required":["id","name","status","ipWhitelist","createdAt","lastUsedAt","expiresAt"]},"ListApiKeysResponseDto":{"type":"object","properties":{"data":{"description":"List of API keys for the organization","type":"array","items":{"$ref":"#/components/schemas/ApiKeyListItemDto"}},"total":{"type":"number","description":"Total number of keys matching the filter","example":42},"page":{"type":"number","description":"Current page (1-based)","example":1},"limit":{"type":"number","description":"Page size","example":20},"hasMore":{"type":"boolean","description":"Whether more pages exist","example":true}},"required":["data","total","page","limit","hasMore"]},"ApiKeyRotationHistoryItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Internal API key row ID","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"status":{"type":"string","enum":["ACTIVE","REVOKED","ROTATED","EXPIRED"],"description":"Status of this key version"},"rotatedFromKeyId":{"type":"object","description":"ID of the key row this one replaced (if rotated)","nullable":true,"example":"b2c3d4e5-f6a7-8901-bcde-f23456789012"},"createdAt":{"type":"string","description":"When this key version was created (ISO 8601)","example":"2026-02-19T12:00:00.000Z"},"rotatedAt":{"type":"object","description":"When this key was rotated out (ISO 8601)","nullable":true,"example":"2026-03-01T14:00:00.000Z"},"rotatedById":{"type":"object","description":"User who performed rotation","nullable":true}},"required":["id","status","rotatedFromKeyId","createdAt","rotatedAt","rotatedById"]},"ApiKeyDetailWithHistoryDto":{"type":"object","properties":{"id":{"type":"string","description":"Internal database ID of the API key","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"name":{"type":"string","description":"Friendly name for the key","example":"Staging Backend"},"status":{"type":"string","enum":["ACTIVE","REVOKED","ROTATED","EXPIRED"],"description":"Current status of the key"},"ipWhitelist":{"description":"IP allowlist (CIDR). Empty means no IP restriction.","example":["31.217.170.61/32"],"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","description":"Creation time (ISO 8601)","example":"2026-02-19T12:00:00.000Z","format":"date-time"},"lastUsedAt":{"type":"object","description":"Last time the key was used for a signed request (ISO 8601)","example":"2026-02-19T14:30:00.000Z","format":"date-time","nullable":true},"expiresAt":{"type":"object","description":"Expiry time if set (ISO 8601), null if no expiry","example":"2027-02-19T12:00:00.000Z","format":"date-time","nullable":true},"keyId":{"type":"string","description":"Public key identifier; send as x-api-key-id when signing requests","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"scopes":{"description":"Scopes granted (resource:action)","example":["accounts:read","deposits:create"],"type":"array","items":{"type":"string"}},"rotatedFromKeyId":{"type":"object","description":"API key that replaced this key (if rotated)","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","nullable":true},"createdById":{"type":"string","description":"User who created the key","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","nullable":true},"rotationHistory":{"description":"All key versions for this keyId (same key across rotations), without IP allowlist","type":"array","items":{"$ref":"#/components/schemas/ApiKeyRotationHistoryItemDto"}}},"required":["id","name","status","ipWhitelist","createdAt","lastUsedAt","expiresAt","keyId","scopes","rotatedFromKeyId","createdById","rotationHistory"]},"UpdateApiKeyWithTotpDto":{"type":"object","properties":{"name":{"type":"string","description":"Friendly name","example":"Staging Backend","maxLength":255},"scopes":{"description":"Scopes (resource:action). Replaces existing scopes. Prefer backend `RbacScopes` (`rbac-scopes.constants.ts`).","example":["accounts:read","deposits:create"],"minItems":1,"type":"array","items":{"type":"string"}},"ipWhitelist":{"description":"IP allowlist. Bare IPs or CIDR blocks. Replaces existing list; send [] to clear (no IP restriction).","example":["31.217.170.61","192.168.1.0/24"],"type":"array","items":{"type":"string"}},"expiresAt":{"type":"object","description":"Expiry (ISO 8601). Omit or send null to clear expiry.","example":"2027-12-31T23:59:59.000Z","format":"date-time","nullable":true},"code":{"type":"string","description":"TOTP code (6 digits from authenticator app)","example":"123456","minLength":6,"maxLength":6,"pattern":"^[0-9]{6}$"}},"required":["code"]},"ApiKeyItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Internal database ID of the API key","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"name":{"type":"string","description":"Friendly name for the key","example":"Staging Backend"},"status":{"type":"string","enum":["ACTIVE","REVOKED","ROTATED","EXPIRED"],"description":"Current status of the key"},"ipWhitelist":{"description":"IP allowlist (CIDR). Empty means no IP restriction.","example":["31.217.170.61/32"],"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","description":"Creation time (ISO 8601)","example":"2026-02-19T12:00:00.000Z","format":"date-time"},"lastUsedAt":{"type":"object","description":"Last time the key was used for a signed request (ISO 8601)","example":"2026-02-19T14:30:00.000Z","format":"date-time","nullable":true},"expiresAt":{"type":"object","description":"Expiry time if set (ISO 8601), null if no expiry","example":"2027-02-19T12:00:00.000Z","format":"date-time","nullable":true},"keyId":{"type":"string","description":"Public key identifier; send as x-api-key-id when signing requests","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"scopes":{"description":"Scopes granted (resource:action)","example":["accounts:read","deposits:create"],"type":"array","items":{"type":"string"}},"rotatedFromKeyId":{"type":"object","description":"API key that replaced this key (if rotated)","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","nullable":true},"createdById":{"type":"string","description":"User who created the key","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","nullable":true}},"required":["id","name","status","ipWhitelist","createdAt","lastUsedAt","expiresAt","keyId","scopes","rotatedFromKeyId","createdById"]},"RotateApiKeyWithTotpDto":{"type":"object","properties":{"code":{"type":"string","description":"TOTP code (6 digits from authenticator app)","example":"123456","minLength":6,"maxLength":6,"pattern":"^[0-9]{6}$"},"publicKey":{"type":"string","description":"Ed25519 public key in PEM format (-----BEGIN PUBLIC KEY----- ... -----END PUBLIC KEY-----)","example":"-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA...\n-----END PUBLIC KEY-----"}},"required":["code","publicKey"]},"TotpCodeDto":{"type":"object","properties":{"code":{"type":"string","description":"TOTP code (6 digits from authenticator app)","example":"123456","minLength":6,"maxLength":6,"pattern":"^[0-9]{6}$"}},"required":["code"]},"AuditLogItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Log entry ID","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"source":{"type":"string","enum":["identity","billing","ledger","mpc","auth","admin"],"description":"Source domain of the log entry"},"actorType":{"type":"string","description":"Actor type","example":"USER"},"actorId":{"type":"object","description":"Actor ID (null when actorType is ADMIN)","nullable":true,"example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"actorName":{"type":"object","description":"Resolved actor label. ADMIN actors are masked (e.g. \"Farhad Aliyev\" → \"F***** A*****\").","nullable":true,"example":"Jane Doe"},"actorEmail":{"type":"object","description":"Resolved actor email (null when actorType is ADMIN)","nullable":true,"example":"jane@example.com"},"orgId":{"type":"object","description":"Organization ID","nullable":true},"orgName":{"type":"object","description":"Organization name","nullable":true,"example":"Acme Inc."},"action":{"type":"object","description":"Action","nullable":true,"example":"MEMBER_INVITED"},"objectType":{"type":"object","description":"Object type","nullable":true,"example":"apikey"},"objectId":{"type":"object","description":"Object ID","nullable":true},"ip":{"type":"object","description":"Client IP","nullable":true},"userAgent":{"type":"object","description":"User-Agent","nullable":true},"outcome":{"type":"object","description":"Auth outcome (auth source only)","nullable":true,"example":"success"},"reason":{"type":"object","description":"Auth failure reason (auth source only)","nullable":true},"correlationId":{"type":"object","description":"Request/trace correlation id","nullable":true,"example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"isAdminLog":{"type":"boolean","description":"When true, entry is admin/ops-only and hidden from org client APIs","example":false},"createdAt":{"type":"string","description":"Created at (ISO 8601)","example":"2026-02-19T12:00:00.000Z"}},"required":["id","source","actorType","actorId","actorName","actorEmail","orgId","orgName","action","objectType","objectId","ip","userAgent","outcome","reason","correlationId","isAdminLog","createdAt"]},"ListAuditLogsResponseDto":{"type":"object","properties":{"data":{"description":"Combined audit log entries (payload excluded)","type":"array","items":{"$ref":"#/components/schemas/AuditLogItemDto"}},"total":{"type":"number","description":"Total number of entries matching the filter (within the snapshot)","example":42},"page":{"type":"number","description":"Current page (1-based)","example":1},"limit":{"type":"number","description":"Page size","example":20},"hasMore":{"type":"boolean","description":"Whether more pages exist","example":true},"snapshotAt":{"type":"string","description":"Pagination snapshot (ISO 8601). Pass this back as `snapshotAt` on subsequent page requests for stable pagination.","example":"2026-06-25T12:00:00.000Z"}},"required":["data","total","page","limit","hasMore","snapshotAt"]},"AuditLogDetailDto":{"type":"object","properties":{"id":{"type":"string","description":"Log entry ID","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"source":{"type":"string","enum":["identity","billing","ledger","mpc","auth","admin"],"description":"Source domain of the log entry"},"actorType":{"type":"string","description":"Actor type","example":"USER"},"actorId":{"type":"object","description":"Actor ID (null when actorType is ADMIN)","nullable":true,"example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"actorName":{"type":"object","description":"Resolved actor label. ADMIN actors are masked (e.g. \"Farhad Aliyev\" → \"F***** A*****\").","nullable":true,"example":"Jane Doe"},"actorEmail":{"type":"object","description":"Resolved actor email (null when actorType is ADMIN)","nullable":true,"example":"jane@example.com"},"orgId":{"type":"object","description":"Organization ID","nullable":true},"orgName":{"type":"object","description":"Organization name","nullable":true,"example":"Acme Inc."},"action":{"type":"object","description":"Action","nullable":true,"example":"MEMBER_INVITED"},"objectType":{"type":"object","description":"Object type","nullable":true,"example":"apikey"},"objectId":{"type":"object","description":"Object ID","nullable":true},"ip":{"type":"object","description":"Client IP","nullable":true},"userAgent":{"type":"object","description":"User-Agent","nullable":true},"outcome":{"type":"object","description":"Auth outcome (auth source only)","nullable":true,"example":"success"},"reason":{"type":"object","description":"Auth failure reason (auth source only)","nullable":true},"correlationId":{"type":"object","description":"Request/trace correlation id","nullable":true,"example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"isAdminLog":{"type":"boolean","description":"When true, entry is admin/ops-only and hidden from org client APIs","example":false},"createdAt":{"type":"string","description":"Created at (ISO 8601)","example":"2026-02-19T12:00:00.000Z"},"payload":{"type":"object","description":"Domain-specific event payload (JSON). Null when the source row has no payload.","nullable":true,"additionalProperties":true}},"required":["id","source","actorType","actorId","actorName","actorEmail","orgId","orgName","action","objectType","objectId","ip","userAgent","outcome","reason","correlationId","isAdminLog","createdAt","payload"]},"OrganizationInfoResponseDto":{"type":"object","properties":{"id":{"type":"string","example":"org-uuid"},"name":{"type":"string","example":"Acme Corp"},"status":{"type":"string","example":"ACTIVE"},"isSystemOrg":{"type":"boolean","description":"Whether this organization is the platform system org (at most one globally)","example":false},"createdAt":{"type":"string","example":"2026-03-20T12:00:00.000Z"},"updatedAt":{"type":"string","example":"2026-03-20T12:00:00.000Z"},"membersCount":{"type":"number","example":12,"description":"Total members in this organization"},"apiKeysCount":{"type":"number","example":5,"description":"Total API keys in this organization"},"walletsCount":{"type":"number","example":3,"description":"Total wallets in this organization"},"withdrawalsBlocked":{"type":"boolean","description":"Whether outgoing withdrawals are currently blocked by platform operations","example":false},"activeWithdrawalHold":{"nullable":true,"description":"Present when withdrawals are blocked; reason is visible to organization members","allOf":[{"$ref":"#/components/schemas/OrganizationActiveWithdrawalHoldDto"}]}},"required":["id","name","status","isSystemOrg","createdAt","updatedAt","membersCount","apiKeysCount","walletsCount","withdrawalsBlocked"]},"CreateOrganizationDto":{"type":"object","properties":{"name":{"type":"string","description":"Human-readable organization name","maxLength":255,"example":"Acme Inc."}},"required":["name"]},"CreateOrganizationResponseDto":{"type":"object","properties":{"id":{"type":"string","example":"org-uuid"},"name":{"type":"string","example":"Acme Inc."},"status":{"type":"string","example":"ACTIVE"},"createdAt":{"type":"string","example":"2026-03-20T12:00:00.000Z"},"updatedAt":{"type":"string","example":"2026-03-20T12:00:00.000Z"},"accessToken":{"type":"string","description":"Fresh access token after org creation"},"tokenType":{"type":"string","example":"Bearer"}},"required":["id","name","status","createdAt","updatedAt","accessToken","tokenType"]},"UpdateOrganizationWithTotpDto":{"type":"object","properties":{"name":{"type":"string","description":"Human-readable organization name","maxLength":255,"example":"Acme Inc. Updated"},"code":{"type":"string","description":"TOTP code (6 digits from authenticator app)","example":"123456","minLength":6,"maxLength":6,"pattern":"^[0-9]{6}$"}},"required":["name","code"]},"UpdateProfileWithTotpDto":{"type":"object","properties":{"displayName":{"type":"string","description":"Display name shown in the product","maxLength":255,"example":"Jane Doe"},"phone":{"type":"string","description":"E.164 international number: leading +, then 7–15 digits (ITU-T). Spaces/dashes in the value are stripped server-side.","maxLength":32,"example":"+14155552671"},"code":{"type":"string","description":"TOTP code (6 digits from authenticator app)","example":"123456","minLength":6,"maxLength":6,"pattern":"^[0-9]{6}$"}},"required":["code"]},"ProfileResponseDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"displayName":{"type":"object","nullable":true},"phone":{"type":"object","nullable":true},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","updatedAt"]},"ChainAdapterHealth":{"type":"object","properties":{"chain":{"type":"string","description":"Chain identifier, e.g. \"tron:nile\"","example":"tron:nile"},"status":{"type":"string","enum":["ok","idle","degraded","down","disabled"],"example":"ok"},"reason":{"type":"string","description":"Human-readable reason when status is not ok"},"details":{"type":"object","description":"Adapter-specific health details (poller, config, cursor, etc.)"}},"required":["chain","status"]},"ChainHealthResponse":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded","down"],"example":"ok"},"chains":{"example":[],"type":"array","items":{"$ref":"#/components/schemas/ChainAdapterHealth"}},"timestamp":{"type":"string","example":"2024-01-15T10:30:00.000Z"}},"required":["status","chains","timestamp"]},"InitializeMpcRequestDto":{"type":"object","properties":{}},"InitializeMpcResponseDto":{"type":"object","properties":{"orgId":{"type":"string"},"keyId":{"type":"string"},"keyStatus":{"type":"string","enum":["PROVISIONING","ACTIVE"]}},"required":["orgId","keyId","keyStatus"]},"MpcCoSignerStatusDto":{"type":"object","properties":{"status":{"type":"string","enum":["ONLINE","STALE","OFFLINE"]},"lastSeenAt":{"type":"string","nullable":true}},"required":["status","lastSeenAt"]},"MpcChainStatusDto":{"type":"object","properties":{"chain":{"type":"string"},"status":{"type":"string","enum":["READY","PROFILE_NOT_AVAILABLE","PROFILE_AMBIGUOUS","SIGNER_UNAVAILABLE","MPC_KEY_NOT_READY"]}},"required":["chain","status"]},"MpcStatusResponseDto":{"type":"object","properties":{"orgId":{"type":"string"},"keyId":{"type":"string","nullable":true},"keyStatus":{"type":"string","nullable":true,"enum":["PROVISIONING","ACTIVE"]},"coSigner":{"$ref":"#/components/schemas/MpcCoSignerStatusDto"},"chains":{"type":"array","items":{"$ref":"#/components/schemas/MpcChainStatusDto"}}},"required":["orgId","keyId","keyStatus","coSigner","chains"]},"MpcSignerHealthCapabilitiesDto":{"type":"object","properties":{"sign":{"type":"boolean","example":true},"dkg":{"type":"boolean","example":true}},"required":["sign","dkg"]},"MpcSignerHealthCheckDto":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded","fail","disabled"],"example":"ok"},"critical":{"type":"boolean","example":true},"message":{"type":"string","example":"ok"},"latency_ms":{"type":"number","example":4}},"required":["status","critical","message","latency_ms"]},"MpcSignerHealthResponse":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded","fail","unreachable"],"example":"ok"},"state":{"type":"string","enum":["report","unreachable","integration_error"],"example":"report"},"ready":{"type":"boolean","example":true},"version":{"type":"string","example":"1.2.3"},"timestamp":{"type":"string","example":"2026-03-30T09:10:11Z"},"capabilities":{"$ref":"#/components/schemas/MpcSignerHealthCapabilitiesDto"},"checks":{"additionalProperties":true,"allOf":[{"$ref":"#/components/schemas/MpcSignerHealthCheckDto"}]},"httpStatus":{"type":"number","example":200},"reason":{"type":"string","example":"connection_error"},"message":{"type":"string","example":"fetch failed"},"rawBody":{"type":"string","example":"{bad json"}},"required":["status","state"]},"PendingDkgIntentDto":{"type":"object","properties":{"intentId":{"type":"string","format":"uuid"},"sessionId":{"type":"string","format":"uuid"},"keyId":{"type":"string"},"orgId":{"type":"string"},"type":{"type":"string","example":"DKG"},"status":{"type":"string","enum":["PENDING","CLAIMED"]},"createdAt":{"type":"string","format":"date-time"},"deadline":{"type":"string","format":"date-time"},"descriptorBytesBase64":{"type":"string","format":"byte"},"descriptorFingerprint":{"type":"string"}},"required":["intentId","sessionId","keyId","orgId","type","status","createdAt","deadline","descriptorBytesBase64","descriptorFingerprint"]},"PendingSignIntentDto":{"type":"object","properties":{"intentId":{"type":"string","format":"uuid"},"keyId":{"type":"string"},"orgId":{"type":"string"},"type":{"type":"string","example":"SIGN"},"status":{"type":"string","example":"PENDING"},"createdAt":{"type":"string","format":"date-time"}},"required":["intentId","keyId","orgId","type","status","createdAt"]},"OwnClaimedSignIntentDto":{"type":"object","properties":{"intentId":{"type":"string","format":"uuid"},"sessionId":{"type":"string","format":"uuid"},"keyId":{"type":"string"},"orgId":{"type":"string"},"type":{"type":"string","example":"SIGN"},"status":{"type":"string","example":"CLAIMED"},"createdAt":{"type":"string","format":"date-time"},"deadline":{"type":"string","format":"date-time"}},"required":["intentId","sessionId","keyId","orgId","type","status","createdAt","deadline"]},"ClaimIntentResponseDto":{"type":"object","properties":{"httpStatus":{"type":"number","example":200},"intentId":{"type":"string","format":"uuid"},"sessionId":{"type":"string","format":"uuid"},"keyId":{"type":"string"},"orgId":{"type":"string"},"status":{"type":"string","example":"CLAIMED"},"deadline":{"type":"string","format":"date-time"},"descriptorBytesBase64":{"type":"string","format":"byte"},"descriptorFingerprint":{"type":"string"},"chainCodeBase64":{"type":"string","format":"byte","description":"The only plaintext chain-code delivery path."}},"required":["httpStatus","intentId","sessionId","keyId","orgId","status","deadline","descriptorBytesBase64","descriptorFingerprint","chainCodeBase64"]},"ClaimSignIntentResponseDto":{"type":"object","properties":{"httpStatus":{"type":"number","example":200},"intentId":{"type":"string","format":"uuid"},"sessionId":{"type":"string","format":"uuid"},"type":{"type":"string","example":"SIGN"},"payload":{"type":"object","additionalProperties":true},"status":{"type":"string","example":"CLAIMED"},"deadline":{"type":"string","format":"date-time"}},"required":["httpStatus","intentId","sessionId","type","payload","status","deadline"]},"GetPendingIntentsResponseDto":{"type":"object","properties":{"httpStatus":{"type":"number","example":200},"ownClaimedDkg":{"type":"array","items":{"$ref":"#/components/schemas/PendingDkgIntentDto"}},"ownClaimedSign":{"type":"array","items":{"$ref":"#/components/schemas/OwnClaimedSignIntentDto"}},"pending":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/PendingDkgIntentDto"},{"$ref":"#/components/schemas/PendingSignIntentDto"}]}}},"required":["httpStatus","ownClaimedDkg","ownClaimedSign","pending"]},"PushMessageDto":{"type":"object","properties":{"intentId":{"type":"string","example":"30000000-0000-4000-8000-000000000003","format":"uuid","maxLength":255},"orgId":{"type":"string","example":"org-123","maxLength":255},"sessionId":{"type":"string","example":"123e4567-e89b-42d3-a456-426614174123","format":"uuid","maxLength":255},"authenticatedPartyId":{"type":"string","example":"co-signer-primary","maxLength":255},"fromPartyId":{"type":"string","example":"co-signer-primary","maxLength":255},"toPartyId":{"type":"string","example":"mpc-signer","maxLength":255},"messageId":{"type":"string","example":"msg_0123456789abcdef","maxLength":255},"protocolSeq":{"type":"number","example":1,"minimum":0,"description":"Protocol frame sequence used by MPC transport dedupe"},"round":{"type":"number","example":1,"minimum":0},"broadcast":{"type":"boolean","example":false,"description":"Whether the MPC frame should be treated as a reliable broadcast"},"payload":{"type":"string","example":"AQ==","description":"Base64-encoded message payload"}},"required":["intentId","orgId","sessionId","authenticatedPartyId","fromPartyId","toPartyId","messageId","protocolSeq","round","payload"]},"CoSignerMessageDto":{"type":"object","properties":{"deliverySeq":{"type":"number","example":1,"description":"Delivery cursor for polling/afterSeq"},"protocolSeq":{"type":"number","example":1,"description":"Protocol frame sequence used by MPC transport dedupe"},"messageId":{"type":"string","example":"msg-1"},"round":{"type":"number","example":1},"fromPartyId":{"type":"string","example":"party-a"},"toPartyId":{"type":"string","example":"party-b"},"broadcast":{"type":"boolean","example":false,"description":"Whether the inbound MPC frame is a reliable broadcast"},"payload":{"type":"string","example":"AQ==","description":"Base64-encoded message payload"},"derivationContextHash":{"type":"string","example":"9ac15963b2b145e32ff0c463f50b85677326de1c8a56c53f7f7f60921cbf6d60"}},"required":["deliverySeq","protocolSeq","messageId","round","fromPartyId","toPartyId","broadcast","payload"]},"GetMessagesResponseDto":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/CoSignerMessageDto"}}},"required":["messages"]},"ClientAssetListItemDto":{"type":"object","properties":{"chain":{"type":"string"},"asset":{"type":"string"},"displayName":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"tokenStandard":{"type":"string","nullable":true},"tokenContract":{"type":"string","nullable":true},"decimals":{"type":"integer","minimum":0},"depositsEnabled":{"type":"boolean"},"withdrawalsEnabled":{"type":"boolean"},"requiredConfirmations":{"type":"integer","minimum":0,"nullable":true,"description":"Required confirmations before an incoming transfer is considered final."}},"required":["chain","asset","displayName","status","tokenStandard","tokenContract","decimals","depositsEnabled","withdrawalsEnabled","requiredConfirmations"]},"ClientAssetListResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ClientAssetListItemDto"}},"nextCursor":{"type":"string","nullable":true,"description":"Opaque cursor for the next page."}},"required":["items","nextCursor"]},"PublicErrorDetailDto":{"type":"object","properties":{"field":{"type":"string","example":"limit"},"reason":{"type":"string","example":"must be an integer"}},"required":["field","reason"]},"PublicErrorResponseDto":{"type":"object","properties":{"code":{"type":"string","example":"INVALID_QUERY_PARAMETER"},"message":{"type":"string","example":"Invalid query parameter"},"details":{"type":"array","items":{"$ref":"#/components/schemas/PublicErrorDetailDto"}},"requestId":{"type":"string","example":"a4b2b2d6-2c9d-4a04-a630-df669f1e93a0"},"retryable":{"type":"boolean","example":false}},"required":["code","message","details","requestId","retryable"]},"CreateWalletDto":{"type":"object","properties":{"chain":{"type":"string","enum":["tron:mainnet","tron:nile"],"example":"tron:mainnet"},"accountId":{"type":"string"}},"required":["chain","accountId"]},"WalletResponseDto":{"type":"object","properties":{"id":{"type":"string"},"chain":{"type":"string"},"accountId":{"type":"string"},"accountName":{"type":"string"},"address":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","DISABLED","ARCHIVED"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","chain","accountId","accountName","address","status","createdAt","updatedAt"]},"ListWalletsResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WalletResponseDto"}},"nextCursor":{"type":"string","nullable":true,"description":"Opaque cursor for the next page."}},"required":["items","nextCursor"]},"ListOrgWalletsResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WalletResponseDto"}},"nextCursor":{"type":"object","nullable":true}},"required":["items"]},"LedgerAccountBalanceSummaryDto":{"type":"object","properties":{"decimals":{"type":"integer","minimum":0,"nullable":true},"displayAsset":{"type":"string"},"displayName":{"type":"string"},"displaySource":{"type":"string","enum":["asset_config","atomic"]},"chain":{"type":"string"},"asset":{"type":"string"},"postedBalance":{"type":"string"},"postedBalanceDisplay":{"type":"string"},"reservedBalance":{"type":"string"},"reservedBalanceDisplay":{"type":"string"},"availableBalance":{"type":"string"},"availableBalanceDisplay":{"type":"string"}},"required":["decimals","displayAsset","displayName","displaySource","chain","asset","postedBalance","postedBalanceDisplay","reservedBalance","reservedBalanceDisplay","availableBalance","availableBalanceDisplay"]},"LedgerAccountListItemDto":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"externalId":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":true,"nullable":true},"walletsCount":{"type":"number"},"assetsCount":{"type":"number"},"balanceSummary":{"type":"array","items":{"$ref":"#/components/schemas/LedgerAccountBalanceSummaryDto"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","externalId","metadata","walletsCount","assetsCount","balanceSummary","createdAt","updatedAt"]},"LedgerAccountListResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LedgerAccountListItemDto"}},"nextCursor":{"type":"string","nullable":true,"description":"Opaque cursor for the next page."}},"required":["items","nextCursor"]},"LedgerAccountDetailDto":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"externalId":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":true,"nullable":true},"walletsCount":{"type":"number"},"assetsCount":{"type":"number"},"balanceSummary":{"type":"array","items":{"$ref":"#/components/schemas/LedgerAccountBalanceSummaryDto"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","externalId","metadata","walletsCount","assetsCount","balanceSummary","createdAt","updatedAt"]},"CreateLedgerAccountDto":{"type":"object","properties":{"name":{"type":"string","example":"Treasury"},"externalId":{"type":"string","nullable":true,"minLength":1,"maxLength":128},"metadata":{"type":"object","additionalProperties":true,"nullable":true}},"required":["name"]},"LedgerAccountResponseDto":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"externalId":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":true,"nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","orgId","name","externalId","metadata","createdAt","updatedAt"]},"LedgerAccountWalletResponseDto":{"type":"object","properties":{"id":{"type":"string"},"accountId":{"type":"string"},"accountName":{"type":"string"},"chain":{"type":"string"},"address":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","accountId","accountName","chain","address","status","createdAt","updatedAt"]},"ListLedgerAccountWalletsResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LedgerAccountWalletResponseDto"}},"nextCursor":{"type":"string","nullable":true,"description":"Opaque cursor for the next page."}},"required":["items","nextCursor"]},"LedgerAccountBalanceResponseDto":{"type":"object","properties":{"decimals":{"type":"integer","minimum":0,"nullable":true},"displayAsset":{"type":"string"},"displayName":{"type":"string"},"displaySource":{"type":"string","enum":["asset_config","atomic"]},"accountId":{"type":"string"},"chain":{"type":"string"},"asset":{"type":"string"},"postedBalance":{"type":"string"},"postedBalanceDisplay":{"type":"string"},"reservedBalance":{"type":"string"},"reservedBalanceDisplay":{"type":"string"},"availableBalance":{"type":"string"},"availableBalanceDisplay":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"}},"required":["decimals","displayAsset","displayName","displaySource","accountId","chain","asset","postedBalance","postedBalanceDisplay","reservedBalance","reservedBalanceDisplay","availableBalance","availableBalanceDisplay","updatedAt"]},"ListLedgerAccountBalancesResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LedgerAccountBalanceResponseDto"}},"nextCursor":{"type":"string","nullable":true,"description":"Opaque cursor for the next page."}},"required":["items","nextCursor"]},"TransactionNetworkFeeSummaryDto":{"type":"object","properties":{"asset":{"type":"string","nullable":true},"amountAtomic":{"type":"string","nullable":true},"amountDisplay":{"type":"string","nullable":true},"decimals":{"type":"integer","minimum":0,"nullable":true},"displayAsset":{"type":"string","nullable":true},"displayName":{"type":"string","nullable":true},"displaySource":{"type":"string","enum":["asset_config","atomic","none"]},"source":{"type":"string","enum":["posted","reservation","none"]},"postedAmountAtomic":{"type":"string","nullable":true},"reservationAmountAtomic":{"type":"string","nullable":true}},"required":["asset","amountAtomic","amountDisplay","decimals","displayAsset","displayName","displaySource","source","postedAmountAtomic","reservationAmountAtomic"]},"TransactionListItemDto":{"type":"object","properties":{"id":{"type":"string"},"accountId":{"type":"string"},"accountName":{"type":"string"},"walletId":{"type":"string"},"type":{"type":"string","enum":["DEPOSIT","WITHDRAWAL","INTERNAL_TRANSFER","ADJUSTMENT"]},"status":{"type":"string","enum":["PENDING","CONFIRMED","FAILED","FAILED_ON_CHAIN"]},"chain":{"type":"string"},"asset":{"type":"string"},"amountAtomic":{"type":"string"},"amountDirection":{"type":"string","enum":["CREDIT","DEBIT"]},"amountDisplay":{"type":"string"},"signedAmountAtomic":{"type":"string"},"signedAmountDisplay":{"type":"string"},"decimals":{"type":"integer","minimum":0,"nullable":true},"displayAsset":{"type":"string"},"displayName":{"type":"string"},"displaySource":{"type":"string","enum":["asset_config","atomic"]},"billingClassification":{"type":"string","nullable":true},"clientReference":{"type":"string","nullable":true},"networkFeeSummary":{"$ref":"#/components/schemas/TransactionNetworkFeeSummaryDto"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","accountId","accountName","walletId","type","status","chain","asset","amountAtomic","amountDirection","amountDisplay","signedAmountAtomic","signedAmountDisplay","decimals","displayAsset","displayName","displaySource","billingClassification","clientReference","networkFeeSummary","createdAt","updatedAt"]},"ListTransactionsResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TransactionListItemDto"}},"nextCursor":{"type":"string","nullable":true,"description":"Opaque cursor for the next page."}},"required":["items","nextCursor"]},"LedgerBalanceResponseDto":{"type":"object","properties":{"decimals":{"type":"integer","minimum":0,"nullable":true},"displayAsset":{"type":"string"},"displayName":{"type":"string"},"displaySource":{"type":"string","enum":["asset_config","atomic"]},"walletId":{"type":"string"},"accountId":{"type":"string"},"chain":{"type":"string"},"asset":{"type":"string"},"postedBalance":{"type":"string"},"postedBalanceDisplay":{"type":"string"},"reservedBalance":{"type":"string"},"reservedBalanceDisplay":{"type":"string"},"availableBalance":{"type":"string"},"availableBalanceDisplay":{"type":"string"},"assetStatus":{"type":"string","enum":["ACTIVE","ARCHIVED"],"nullable":true,"description":"Catalog lifecycle status; null when a projected or historical asset is missing from the catalog."},"balanceSource":{"type":"string","enum":["PROJECTION","SYNTHETIC_ZERO"],"description":"Distinguishes a persisted projection from a successful read with no projection."},"depositsEnabled":{"type":"boolean"},"withdrawalsEnabled":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["decimals","displayAsset","displayName","displaySource","walletId","accountId","chain","asset","postedBalance","postedBalanceDisplay","reservedBalance","reservedBalanceDisplay","availableBalance","availableBalanceDisplay","assetStatus","balanceSource","depositsEnabled","withdrawalsEnabled","updatedAt"]},"ListLedgerBalancesResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LedgerBalanceResponseDto"}},"nextCursor":{"type":"string","nullable":true,"description":"Opaque cursor for the next page."}},"required":["items","nextCursor"]},"LedgerEntryResponseDto":{"type":"object","properties":{"decimals":{"type":"integer","minimum":0,"nullable":true},"displayAsset":{"type":"string"},"displayName":{"type":"string"},"displaySource":{"type":"string","enum":["asset_config","atomic"]},"id":{"type":"string"},"transactionId":{"type":"string"},"walletId":{"type":"string"},"chain":{"type":"string"},"asset":{"type":"string"},"direction":{"type":"string","enum":["CREDIT","DEBIT"]},"status":{"type":"string","enum":["PENDING","POSTED","VOIDED"]},"amountAtomic":{"type":"string"},"amountDisplay":{"type":"string"},"signedAmountAtomic":{"type":"string"},"signedAmountDisplay":{"type":"string"},"entryType":{"type":"string"},"effectKey":{"type":"string"},"sourceRecordType":{"type":"string","nullable":true},"sourceRecordId":{"type":"string","nullable":true},"effectiveChainTime":{"type":"string","format":"date-time","nullable":true},"effectiveBlockHeight":{"type":"string","nullable":true},"effectiveChainTxid":{"type":"string","nullable":true},"effectiveLogIndex":{"type":"integer","minimum":0,"nullable":true},"effectiveFinalityCursor":{"type":"string","nullable":true,"description":"Opaque cursor for the next page."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["decimals","displayAsset","displayName","displaySource","id","transactionId","walletId","chain","asset","direction","status","amountAtomic","amountDisplay","signedAmountAtomic","signedAmountDisplay","entryType","effectKey","sourceRecordType","sourceRecordId","effectiveChainTime","effectiveBlockHeight","effectiveChainTxid","effectiveLogIndex","effectiveFinalityCursor","createdAt","updatedAt"]},"ListLedgerEntriesResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LedgerEntryResponseDto"}},"nextCursor":{"type":"string","nullable":true,"description":"Opaque cursor for the next page."}},"required":["items","nextCursor"]},"TronTransactionParamsDto":{"type":"object","properties":{"feeLimitSun":{"type":"string","example":"30000000"}}},"CreateTransactionChainParamsDto":{"type":"object","properties":{"tron":{"$ref":"#/components/schemas/TronTransactionParamsDto"}}},"CreateTransactionDto":{"type":"object","properties":{"clientReference":{"type":"string","minLength":1,"maxLength":128},"walletId":{"type":"string"},"asset":{"type":"string","example":"USDT"},"toAddress":{"type":"string"},"amountAtomic":{"type":"string","example":"1000000"},"chainParams":{"$ref":"#/components/schemas/CreateTransactionChainParamsDto"}},"required":["walletId","asset","toAddress","amountAtomic"]},"TransactionBalanceEffectDto":{"type":"object","properties":{"entryId":{"type":"string"},"effectKey":{"type":"string"},"entryType":{"type":"string"},"asset":{"type":"string"},"direction":{"type":"string","enum":["CREDIT","DEBIT"]},"status":{"type":"string","enum":["PENDING","POSTED","VOIDED"]},"amountAtomic":{"type":"string"},"amountDisplay":{"type":"string"},"signedAmountAtomic":{"type":"string"},"signedAmountDisplay":{"type":"string"},"postedDeltaAtomic":{"type":"string"},"postedDeltaDisplay":{"type":"string"},"reservedDeltaAtomic":{"type":"string"},"reservedDeltaDisplay":{"type":"string"},"decimals":{"type":"integer","minimum":0,"nullable":true},"displayAsset":{"type":"string"},"displayName":{"type":"string"},"displaySource":{"type":"string","enum":["asset_config","atomic"]},"createdAt":{"type":"string","format":"date-time"},"effectiveBlockHeight":{"type":"string","nullable":true},"effectiveChainTxid":{"type":"string","nullable":true},"effectiveLogIndex":{"type":"integer","minimum":0,"nullable":true},"effectiveChainTime":{"type":"string","format":"date-time","nullable":true},"effectiveFinalityCursor":{"type":"string","nullable":true}},"required":["entryId","effectKey","entryType","asset","direction","status","amountAtomic","amountDisplay","signedAmountAtomic","signedAmountDisplay","postedDeltaAtomic","postedDeltaDisplay","reservedDeltaAtomic","reservedDeltaDisplay","decimals","displayAsset","displayName","displaySource","createdAt","effectiveBlockHeight","effectiveChainTxid","effectiveLogIndex","effectiveChainTime","effectiveFinalityCursor"]},"ChainTransferDetailDto":{"type":"object","properties":{"txHash":{"type":"string","nullable":true},"fromAddress":{"type":"string","nullable":true},"toAddress":{"type":"string","nullable":true},"amountAtomic":{"type":"string"},"amountDecimal":{"type":"string","nullable":true},"asset":{"type":"string"},"decimals":{"type":"integer","minimum":0,"nullable":true},"direction":{"type":"string","enum":["INCOMING","OUTGOING","INTERNAL"]}},"required":["txHash","fromAddress","toAddress","amountAtomic","amountDecimal","asset","decimals","direction"]},"ChainResultDetailDto":{"type":"object","properties":{"result":{"type":"string","enum":["SUCCESSFUL","FAILED","PENDING"]},"status":{"type":"string","enum":["CONFIRMED","UNCONFIRMED","FAILED","PENDING"]},"confirmations":{"type":"integer","minimum":0,"nullable":true},"requiredConfirmations":{"type":"integer","minimum":0,"nullable":true},"confirmedByBlocks":{"type":"integer","minimum":0,"nullable":true}},"required":["result","status","confirmations","requiredConfirmations","confirmedByBlocks"]},"ChainBlockDetailDto":{"type":"object","properties":{"blockHeight":{"type":"string","nullable":true},"blockHash":{"type":"string","nullable":true},"blockTime":{"type":"string","format":"date-time","nullable":true},"observedAt":{"type":"string","format":"date-time","nullable":true}}},"ChainResourcesDetailDto":{"type":"object","properties":{"feeAmountAtomic":{"type":"string","nullable":true},"feeAmountDecimal":{"type":"string","nullable":true},"feeAsset":{"type":"string","nullable":true},"energyUsed":{"type":"string","nullable":true},"energyFeeLimit":{"type":"string","nullable":true},"bandwidthUsed":{"type":"string","nullable":true},"netFeeAmountAtomic":{"type":"string","nullable":true}}},"ChainValidatorSrDto":{"type":"object","properties":{"name":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"blockHeight":{"type":"string","nullable":true}}},"ChainValidatorsDetailDto":{"type":"object","properties":{"confirmedSrCount":{"type":"integer","minimum":0,"nullable":true},"confirmedSrs":{"type":"array","items":{"$ref":"#/components/schemas/ChainValidatorSrDto"}}},"required":["confirmedSrs"]},"ChainExplorerDetailDto":{"type":"object","properties":{"url":{"type":"string","nullable":true},"txUrl":{"type":"string","nullable":true}}},"TransactionOnChainDetailsDto":{"type":"object","properties":{"chainTransfer":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ChainTransferDetailDto"}]},"chainResult":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ChainResultDetailDto"}]},"chainBlock":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ChainBlockDetailDto"}]},"chainResources":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ChainResourcesDetailDto"}]},"chainValidators":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ChainValidatorsDetailDto"}]},"explorer":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ChainExplorerDetailDto"}]}}},"TransactionDetailDto":{"type":"object","properties":{"id":{"type":"string"},"accountId":{"type":"string"},"accountName":{"type":"string"},"walletId":{"type":"string"},"type":{"type":"string","enum":["DEPOSIT","WITHDRAWAL","INTERNAL_TRANSFER","ADJUSTMENT"]},"status":{"type":"string","enum":["PENDING","CONFIRMED","FAILED","FAILED_ON_CHAIN"]},"chain":{"type":"string"},"asset":{"type":"string"},"amountAtomic":{"type":"string"},"amountDirection":{"type":"string","enum":["CREDIT","DEBIT"]},"amountDisplay":{"type":"string"},"signedAmountAtomic":{"type":"string"},"signedAmountDisplay":{"type":"string"},"decimals":{"type":"integer","minimum":0,"nullable":true},"displayAsset":{"type":"string"},"displayName":{"type":"string"},"displaySource":{"type":"string","enum":["asset_config","atomic"]},"billingClassification":{"type":"string","nullable":true},"clientReference":{"type":"string","nullable":true},"networkFeeSummary":{"$ref":"#/components/schemas/TransactionNetworkFeeSummaryDto"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"balanceEffects":{"type":"array","items":{"$ref":"#/components/schemas/TransactionBalanceEffectDto"}},"onChainDetails":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/TransactionOnChainDetailsDto"}]}},"required":["id","accountId","accountName","walletId","type","status","chain","asset","amountAtomic","amountDirection","amountDisplay","signedAmountAtomic","signedAmountDisplay","decimals","displayAsset","displayName","displaySource","billingClassification","clientReference","networkFeeSummary","createdAt","updatedAt","balanceEffects","onChainDetails"]},"AddMemberWithTotpDto":{"type":"object","properties":{"email":{"type":"string","description":"Email address of the user to add as a member","example":"user@example.com"},"roleId":{"type":"string","description":"Role ID to assign to the member","example":"5e1f9c3a-3b9e-4f34-9c32-9e3b9c3a5e1f"},"code":{"type":"string","description":"TOTP code (6 digits from authenticator app)","example":"123456","minLength":6,"maxLength":6,"pattern":"^[0-9]{6}$"}},"required":["email","roleId","code"]},"MemberListItemDto":{"type":"object","properties":{"orgId":{"type":"string","description":"Organization ID"},"userId":{"type":"string","description":"User ID"},"roleId":{"type":"string","description":"Role ID"},"status":{"type":"string","enum":["ACTIVE","PENDING","REVOKED","DECLINED"],"description":"Membership status"},"displayName":{"type":"object","description":"User display name, if set","nullable":true},"email":{"type":"object","description":"User email","nullable":true},"roleName":{"type":"string","description":"Role name"},"createdAt":{"type":"string","description":"Membership creation time (ISO8601)"}},"required":["orgId","userId","roleId","status","displayName","email","roleName","createdAt"]},"ListMembersResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MemberListItemDto"}},"total":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"},"hasMore":{"type":"boolean"}},"required":["data","total","page","limit","hasMore"]},"RoleListItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Role UUID"},"name":{"type":"string","description":"Role name"},"description":{"type":"object","description":"Role description"},"orgId":{"type":"object","description":"Organization ID if org-scoped, null for global roles"}},"required":["id","name"]},"UpdateMemberRoleWithTotpDto":{"type":"object","properties":{"roleId":{"type":"string","description":"Role ID to assign to the member","example":"5e1f9c3a-3b9e-4f34-9c32-9e3b9c3a5e1f"},"code":{"type":"string","description":"TOTP code (6 digits from authenticator app)","example":"123456","minLength":6,"maxLength":6,"pattern":"^[0-9]{6}$"}},"required":["roleId","code"]},"InvitationInfoResponseDto":{"type":"object","properties":{"orgName":{"type":"string","description":"Organization name"},"roleName":{"type":"string","description":"Role name the user is invited as"},"expiresAt":{"type":"string","description":"Invitation expiry timestamp (ISO)"},"status":{"type":"string","description":"Verification request status"},"email":{"type":"string","description":"Invited user email"},"expired":{"type":"boolean","description":"Whether the invitation has expired"},"requiresLogin":{"type":"boolean","description":"Whether invited user must log in to accept/decline"}},"required":["orgName","roleName","expiresAt","status","email","expired","requiresLogin"]},"DeclineInvitationDto":{"type":"object","properties":{"token":{"type":"string","description":"Invitation token from email link"}},"required":["token"]},"AcceptMemberInviteDto":{"type":"object","properties":{"token":{"type":"string","description":"Invitation token from email link"},"password":{"type":"string","description":"Password to set for new users.","minLength":12,"maxLength":64},"displayName":{"type":"string","description":"Optional display name (only applied for new-user invite acceptance)"}},"required":["token","password"]},"InvitationRequestIdDto":{"type":"object","properties":{"requestId":{"type":"string","description":"Invitation verification request ID"}},"required":["requestId"]},"BillingPlanVersionDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"number","example":1},"environmentScope":{"type":"string","enum":["TESTNET_ONLY","MAINNET"]},"monthlyPriceUsdCents":{"type":"number","example":9900},"includedVolumeUsdCents":{"type":"string","example":"100000000"},"walletLimit":{"type":"number"},"apiKeyLimit":{"type":"number"},"userLimit":{"type":"number"},"overageBps":{"type":"number"},"rolloutDate":{"type":"string","format":"date-time"},"changelogNotes":{"type":"object","nullable":true}},"required":["id","version","environmentScope","monthlyPriceUsdCents","includedVolumeUsdCents","walletLimit","apiKeyLimit","userLimit","overageBps","rolloutDate"]},"BillingPlanListItemDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string","example":"starter"},"name":{"type":"string","example":"Starter Plan"},"status":{"type":"string","enum":["DRAFT","ACTIVE","ARCHIVED"]},"isEnterprise":{"type":"boolean","description":"True when this plan is exclusive to your organization"},"orgId":{"type":"object","format":"uuid","nullable":true,"description":"Set only for org-exclusive enterprise plans"},"latestVersion":{"nullable":true,"description":"Currently effective pricing version (latest rolled out)","allOf":[{"$ref":"#/components/schemas/BillingPlanVersionDto"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","code","name","status","isEnterprise","latestVersion","createdAt","updatedAt"]},"ListBillingPlansResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BillingPlanListItemDto"}},"total":{"type":"number"}},"required":["data","total"]},"CreateSubscriptionDto":{"type":"object","properties":{"planCode":{"type":"string","description":"Billing plan code to subscribe to","example":"starter"}},"required":["planCode"]},"SubscriptionResponseDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string","format":"uuid"},"planCode":{"type":"string","example":"starter"},"planId":{"type":"string","format":"uuid"},"planVersion":{"type":"number"},"currentVersionId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["ACTIVE","PAST_DUE","RESTRICTED","SUSPENDED","CANCELLED"]},"billingPeriodAnchor":{"type":"number","description":"Billing day of month (1–31)","example":20},"currentPeriodStart":{"type":"string","format":"date-time"},"currentPeriodEnd":{"type":"string","format":"date-time"},"invoiceDeliveryEmail":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","orgId","planCode","planId","planVersion","currentVersionId","status","billingPeriodAnchor","currentPeriodStart","currentPeriodEnd","invoiceDeliveryEmail","createdAt"]},"PreviewPlanChangeDto":{"type":"object","properties":{"planId":{"type":"string","format":"uuid","description":"Intended new subscription plan ID to preview switching to."}},"required":["planId"]},"PlanChangeLimitViolationDto":{"type":"object","properties":{"resource":{"type":"string","enum":["wallets","apiKeys","users","mainnetWallets"],"example":"wallets","description":"Violated resource. 'mainnetWallets' means the target plan is testnet-only but the org still has active mainnet wallets."},"currentUsage":{"type":"number","example":60,"description":"Current usage for this resource"},"newLimit":{"type":"number","example":50,"description":"Limit of this resource on the target plan (0 for 'mainnetWallets' on a testnet-only plan)"}},"required":["resource","currentUsage","newLimit"]},"PlanChangeProrationDto":{"type":"object","properties":{"periodStart":{"type":"string","format":"date-time"},"periodEnd":{"type":"string","format":"date-time"},"evaluatedAt":{"type":"string","format":"date-time","description":"Evaluation moment, clamped within the current period"},"totalDays":{"type":"number","example":30},"usedDays":{"type":"number","example":12.5},"remainingDays":{"type":"number","example":17.5},"usedFraction":{"type":"number","example":0.4167,"description":"Portion of the period already consumed (0..1)"},"remainingFraction":{"type":"number","example":0.5833,"description":"Portion of the period remaining (0..1)"}},"required":["periodStart","periodEnd","evaluatedAt","totalDays","usedDays","remainingDays","usedFraction","remainingFraction"]},"PlanChangeFeesDto":{"type":"object","properties":{"currentPlanProratedUsdCents":{"type":"number","example":4125,"description":"Used portion of the current plan price (consumed so far)"},"volumeOverageUsdCents":{"type":"number","example":0,"description":"Volume overage charged on the current plan for usage beyond its allowance"},"newPlanProratedRemainingUsdCents":{"type":"number","example":5775,"description":"Remaining portion of the new plan price (charged until the next iteration)"},"earlyCloseChargeUsdCents":{"type":"number","example":4125,"description":"Amount invoiced when the switch is applied (early close of the current plan): used current portion + overage. Show this on the confirm screen — it equals what the apply endpoint charges."},"totalUsdCents":{"type":"number","example":9900,"description":"Total cost to switch now (early-close charge + remaining new plan portion)"},"usedVolumeUsdCents":{"type":"number","example":0,"description":"Volume used in the current period, in USD cents"}},"required":["currentPlanProratedUsdCents","volumeOverageUsdCents","newPlanProratedRemainingUsdCents","earlyCloseChargeUsdCents","totalUsdCents","usedVolumeUsdCents"]},"PlanChangePlanSummaryDto":{"type":"object","properties":{"planId":{"type":"string","format":"uuid"},"code":{"type":"string","example":"growth"},"name":{"type":"string","example":"Growth"},"versionId":{"type":"string","format":"uuid","description":"Resolved (latest effective) plan version ID"},"version":{"type":"number","example":1},"monthlyPriceUsdCents":{"type":"number","example":9900},"includedVolumeUsdCents":{"type":"string","example":"100000000","description":"Included volume allowance in USD cents (stringified BigInt)"},"walletLimit":{"type":"number","example":50},"apiKeyLimit":{"type":"number","example":10},"userLimit":{"type":"number","example":25},"overageBps":{"type":"number","example":100,"description":"Overage rate in basis points (1% = 100 bps)"},"environmentScope":{"type":"string","enum":["TESTNET_ONLY","MAINNET"],"description":"Whether the plan permits mainnet wallets or is testnet-only."}},"required":["planId","code","name","versionId","version","monthlyPriceUsdCents","includedVolumeUsdCents","walletLimit","apiKeyLimit","userLimit","overageBps","environmentScope"]},"PlanChangePreviewResponseDto":{"type":"object","properties":{"canSwitch":{"type":"boolean","description":"Whether switching is possible (current usage fits within every target plan limit).","example":true},"limitViolations":{"description":"Limits that would be violated by the switch; empty when canSwitch is true.","type":"array","items":{"$ref":"#/components/schemas/PlanChangeLimitViolationDto"}},"proration":{"$ref":"#/components/schemas/PlanChangeProrationDto"},"fees":{"$ref":"#/components/schemas/PlanChangeFeesDto"},"currentPlan":{"$ref":"#/components/schemas/PlanChangePlanSummaryDto"},"targetPlan":{"$ref":"#/components/schemas/PlanChangePlanSummaryDto"}},"required":["canSwitch","limitViolations","proration","fees","currentPlan","targetPlan"]},"SwitchPlanDto":{"type":"object","properties":{"planId":{"type":"string","format":"uuid","description":"Target subscription plan ID to switch the organization to."}},"required":["planId"]},"SwitchPlanChargeDto":{"type":"object","properties":{"baseFeeUsdCents":{"type":"number","example":4125,"description":"Prorated used portion of the previous plan, charged on switch"},"volumeOverageUsdCents":{"type":"number","example":0,"description":"Volume overage charged on the previous plan for usage beyond its allowance"},"totalAmountUsdCents":{"type":"number","example":4125,"description":"Total amount charged on switch (base + overage)"}},"required":["baseFeeUsdCents","volumeOverageUsdCents","totalAmountUsdCents"]},"SwitchPlanResultResponseDto":{"type":"object","properties":{"subscription":{"description":"The subscription after switching to the new plan.","allOf":[{"$ref":"#/components/schemas/SubscriptionResponseDto"}]},"invoiceId":{"type":"string","format":"uuid","description":"The final invoice issued for the previous plan usage."},"charge":{"$ref":"#/components/schemas/SwitchPlanChargeDto"},"balanceAfterUsdCents":{"type":"number","example":15875,"description":"Organization credit balance after the switch charge, in USD cents."},"overdrawn":{"type":"boolean","example":false,"description":"True when the switch charge overdrew the balance, starting a grace period and PAST_DUE status."},"gracePeriodId":{"type":"object","format":"uuid","nullable":true,"description":"Grace period ID created when the switch overdrew the balance; null otherwise."}},"required":["subscription","invoiceId","charge","balanceAfterUsdCents","overdrawn","gracePeriodId"]},"BillingLedgerEntryItemDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["CRYPTO_DEPOSIT","INVOICE_DEDUCTION","MANUAL_ADJUSTMENT","REFUND"],"description":"Operation that changed the balance"},"amountUsdCents":{"type":"number","description":"Amount in USD cents; positive for credits, negative for debits","example":5000},"balanceAfter":{"type":"number","description":"Available balance after this operation, in USD cents","example":15000},"referenceTxHash":{"type":"object","nullable":true,"description":"On-chain transaction hash for crypto deposits","example":"abc123def456"},"invoiceId":{"type":"object","format":"uuid","nullable":true,"description":"Related invoice ID for invoice deductions"},"notes":{"type":"object","nullable":true,"description":"Optional notes for manual adjustments or refunds"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","amountUsdCents","balanceAfter","createdAt"]},"ListBillingLedgerResponseDto":{"type":"object","properties":{"data":{"description":"Ledger entries, newest first","type":"array","items":{"$ref":"#/components/schemas/BillingLedgerEntryItemDto"}},"nextCursor":{"type":"object","format":"uuid","nullable":true,"description":"Pass as cursor to fetch the next page; null when no more entries exist"},"hasMore":{"type":"boolean","description":"Whether more entries exist beyond this page","example":true}},"required":["data","hasMore"]},"BillingInvoiceLineItemDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"description":{"type":"string","example":"Monthly base fee"},"amountUsdCents":{"type":"number","example":9900},"type":{"type":"string","example":"base_fee"}},"required":["id","description","amountUsdCents","type"]},"BillingInvoiceListItemDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"subscriptionId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["DRAFT","ISSUED","PAID","PAST_DUE","VOID"]},"totalAmountUsdCents":{"type":"number","example":9900},"refundedAmountUsdCents":{"type":"number","description":"Total amount refunded against this invoice in USD cents","example":0},"isFullyRefunded":{"type":"boolean","description":"True when refunded amount equals or exceeds the invoice total","example":false},"refundedAt":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp of the most recent refund; null when never refunded"},"periodStart":{"type":"string","format":"date-time"},"periodEnd":{"type":"string","format":"date-time"},"issuedAt":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/BillingInvoiceLineItemDto"}}},"required":["id","subscriptionId","status","totalAmountUsdCents","refundedAmountUsdCents","isFullyRefunded","refundedAt","periodStart","periodEnd","issuedAt","dueAt","createdAt","updatedAt","lineItems"]},"ListBillingInvoicesResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BillingInvoiceListItemDto"}},"total":{"type":"number","example":42},"page":{"type":"number","example":1},"limit":{"type":"number","example":20},"hasMore":{"type":"boolean","example":true}},"required":["data","total","page","limit","hasMore"]},"OrganizationBillingPlanSummaryDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string","example":"growth"},"name":{"type":"string","example":"Growth"},"currentVersion":{"description":"Pricing version this organization is subscribed to (full details)","allOf":[{"$ref":"#/components/schemas/BillingPlanVersionDto"}]},"scheduledVersions":{"description":"Future plan versions scheduled to roll out, soonest first","type":"array","items":{"$ref":"#/components/schemas/BillingPlanVersionDto"}}},"required":["id","code","name","currentVersion","scheduledVersions"]},"OrganizationSubscriptionSummaryDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"plan":{"$ref":"#/components/schemas/OrganizationBillingPlanSummaryDto"},"currentVersionId":{"type":"string","format":"uuid"},"planVersion":{"type":"number","description":"Active billing plan version number"},"status":{"type":"string","enum":["ACTIVE","PAST_DUE","RESTRICTED","SUSPENDED","CANCELLED"]},"billingPeriodAnchor":{"type":"number","description":"Billing day of month (1–31)","example":20},"currentPeriodStart":{"type":"string","format":"date-time"},"currentPeriodEnd":{"type":"string","format":"date-time"},"suspendedAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"invoiceDeliveryEmail":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","plan","currentVersionId","planVersion","status","billingPeriodAnchor","currentPeriodStart","currentPeriodEnd","invoiceDeliveryEmail","createdAt","updatedAt"]},"BillingGracePeriodSummaryDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["ACTIVE","RESOLVED","RESTRICTED"]},"invoiceId":{"type":"string","format":"uuid"},"startedAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"amountOwedUsdCents":{"type":"number","description":"Outstanding amount when the grace episode started (USD cents)"},"restrictedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","status","invoiceId","startedAt","endsAt","amountOwedUsdCents"]},"OrganizationPaymentAddressDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["PENDING_PROVISIONING","ACTIVE","ROTATED","DISABLED"]},"asset":{"type":"string","example":"USDT"},"chain":{"type":"string","example":"tron:nile"},"networkDisplayName":{"type":"string","example":"TRON Nile Testnet","description":"Environment-specific customer-facing network label"},"assetDisplayName":{"type":"string","example":"USDT","description":"Customer-facing asset label"},"confirmationsRequired":{"type":"number","example":20,"description":"Required confirmations before a payment is considered settled"},"minCreditAmountUsdCents":{"type":"number","example":1,"description":"Minimum credit amount in USD cents"},"address":{"type":"string","nullable":true,"description":"On-chain deposit address; null while status is PENDING_PROVISIONING"}},"required":["id","status","asset","chain","networkDisplayName","assetDisplayName","confirmationsRequired","minCreditAmountUsdCents"]},"BillingPendingPaymentDto":{"type":"object","properties":{"status":{"type":"string","enum":["PENDING_CONFIRMATION"],"example":"PENDING_CONFIRMATION"},"detectedAt":{"type":"string","example":"2026-07-04T12:00:00.000Z"}},"required":["status","detectedAt"]},"OrganizationCreditBalanceDto":{"type":"object","properties":{"availableUsdCents":{"type":"number","description":"Available prepaid credit balance in USD cents","example":5000},"updatedAt":{"type":"string","format":"date-time","nullable":true,"description":"When the balance was last updated; null if no ledger activity yet"}},"required":["availableUsdCents"]},"OrganizationBillingInfoResponseDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"org-uuid"},"membersCount":{"type":"number","example":12,"description":"Total members in this organization"},"apiKeysCount":{"type":"number","example":5,"description":"Total API keys in this organization"},"walletsCount":{"type":"number","example":3,"description":"Total wallets in this organization"},"usedVolumeUsdCents":{"type":"number","example":150000,"description":"Billable volume consumed in the current billing period (USD cents)"},"offsetVolumeUsdCents":{"type":"number","example":50000,"description":"Volume beyond the current plan included allowance in the billing period (USD cents). Zero when usage is within allowance or there is no subscription."},"volumeOverageUsdCents":{"type":"number","example":500,"description":"Projected overage charge for the current-period offset at the plan overageBps rate (USD cents). Zero when there is no offset, no overage rate, or no subscription."},"subscription":{"nullable":true,"description":"Current billing subscription for this organization, or null if not subscribed","allOf":[{"$ref":"#/components/schemas/OrganizationSubscriptionSummaryDto"}]},"activeGracePeriod":{"nullable":true,"description":"Active or restricted billing grace episode when the organization owes a negative balance","allOf":[{"$ref":"#/components/schemas/BillingGracePeriodSummaryDto"}]},"billingPaymentAddresses":{"description":"Billing deposit addresses for this organization (e.g. USDT on TRON)","type":"array","items":{"$ref":"#/components/schemas/OrganizationPaymentAddressDto"}},"pendingPayments":{"description":"Detected billing payments waiting for chain confirmation","type":"array","items":{"$ref":"#/components/schemas/BillingPendingPaymentDto"}},"creditBalance":{"description":"Prepaid billing credit balance for this organization","allOf":[{"$ref":"#/components/schemas/OrganizationCreditBalanceDto"}]}},"required":["id","membersCount","apiKeysCount","walletsCount","usedVolumeUsdCents","offsetVolumeUsdCents","volumeOverageUsdCents","billingPaymentAddresses","pendingPayments","creditBalance"]},"DashboardPlanLimitsDto":{"type":"object","properties":{"walletLimit":{"type":"number","example":10},"apiKeyLimit":{"type":"number","example":5},"userLimit":{"type":"number","example":20},"includedVolumeUsdCents":{"type":"string","description":"Included billable volume in USD cents","example":"10000000"},"overageBps":{"type":"number","example":100}},"required":["walletLimit","apiKeyLimit","userLimit","includedVolumeUsdCents","overageBps"]},"DashboardSummaryResponseDto":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time","description":"When this snapshot was computed"},"membersCount":{"type":"number","example":12},"apiKeysCount":{"type":"number","example":3},"walletsCount":{"type":"number","example":8},"accountsCount":{"type":"number","example":2},"usedVolumeUsdCents":{"type":"number","description":"Billable volume in the current billing period (USD cents)","example":150000},"offsetVolumeUsdCents":{"type":"number","description":"Volume beyond included allowance (USD cents)","example":0},"volumeOverageUsdCents":{"type":"number","description":"Projected overage charge (USD cents)","example":0},"monthlyPriceUsdCents":{"type":"number","description":"Monthly plan price for the current version (USD cents)","example":2500},"projectedPeriodChargeUsdCents":{"type":"number","description":"Projected period-end charge: monthly plan price + volume overage (USD cents)","example":2500},"availableUsdCents":{"type":"number","description":"Credit balance available (USD cents)","example":50000},"subscriptionStatus":{"type":"object","description":"Current subscription status, or null if unsubscribed","example":"ACTIVE","nullable":true},"currentPeriodStart":{"type":"string","format":"date-time","nullable":true},"currentPeriodEnd":{"type":"string","format":"date-time","nullable":true},"planLimits":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/DashboardPlanLimitsDto"}]}},"required":["generatedAt","membersCount","apiKeysCount","walletsCount","accountsCount","usedVolumeUsdCents","offsetVolumeUsdCents","volumeOverageUsdCents","monthlyPriceUsdCents","projectedPeriodChargeUsdCents","availableUsdCents"]},"DashboardActiveGraceDto":{"type":"object","properties":{"status":{"type":"string","example":"ACTIVE"},"endsAt":{"type":"string","format":"date-time"},"amountOwedUsdCents":{"type":"number","example":2500},"restrictedAt":{"type":"string","format":"date-time","nullable":true}},"required":["status","endsAt","amountOwedUsdCents"]},"DashboardAttentionResponseDto":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time","description":"When this snapshot was computed"},"orgStatus":{"type":"string","example":"ACTIVE"},"withdrawalsBlocked":{"type":"boolean","description":"True when an active withdrawal hold blocks withdrawals"},"hasDebt":{"type":"boolean","description":"True when credit balance is negative"},"pastDueInvoiceCount":{"type":"number","example":0},"pendingPaymentAddressCount":{"type":"number","example":0},"pendingDepositCount":{"type":"number","example":0},"activeGracePeriod":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/DashboardActiveGraceDto"}]}},"required":["generatedAt","orgStatus","withdrawalsBlocked","hasDebt","pastDueInvoiceCount","pendingPaymentAddressCount","pendingDepositCount"]},"DashboardVolumeSeriesBucketDto":{"type":"object","properties":{"bucketStart":{"type":"string","format":"date-time"},"usedVolumeUsdCents":{"type":"number","example":12500},"transactionCount":{"type":"number","example":4}},"required":["bucketStart","usedVolumeUsdCents","transactionCount"]},"DashboardVolumeSeriesResponseDto":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time","description":"When this snapshot was computed"},"granularity":{"type":"string","enum":["day","month"]},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"buckets":{"type":"array","items":{"$ref":"#/components/schemas/DashboardVolumeSeriesBucketDto"}}},"required":["generatedAt","granularity","from","to","buckets"]},"DashboardVolumeBreakdownItemDto":{"type":"object","properties":{"chain":{"type":"string","example":"tron"},"asset":{"type":"string","example":"USDT"},"usedVolumeUsdCents":{"type":"number","description":"Billable USD cents for this chain/asset","example":50000},"transactionCount":{"type":"number","example":12}},"required":["chain","asset","usedVolumeUsdCents","transactionCount"]},"DashboardVolumeBreakdownResponseDto":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time","description":"When this snapshot was computed"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"totalUsedVolumeUsdCents":{"type":"number","example":150000},"items":{"type":"array","items":{"$ref":"#/components/schemas/DashboardVolumeBreakdownItemDto"}}},"required":["generatedAt","from","to","totalUsedVolumeUsdCents","items"]},"DashboardActivitySeriesBucketDto":{"type":"object","properties":{"bucketStart":{"type":"string","format":"date-time"},"count":{"type":"number","example":42}},"required":["bucketStart","count"]},"DashboardActivitySeriesResponseDto":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time","description":"When this snapshot was computed"},"granularity":{"type":"string","enum":["day","month"]},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"buckets":{"type":"array","items":{"$ref":"#/components/schemas/DashboardActivitySeriesBucketDto"}}},"required":["generatedAt","granularity","from","to","buckets"]},"DashboardCountByLabelDto":{"type":"object","properties":{"label":{"type":"string","example":"WITHDRAWAL"},"count":{"type":"number","example":12}},"required":["label","count"]},"DashboardActivityMixResponseDto":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time","description":"When this snapshot was computed"},"window":{"type":"string","enum":["24h","7d","30d"]},"total":{"type":"number","example":128},"byType":{"type":"array","items":{"$ref":"#/components/schemas/DashboardCountByLabelDto"}},"byStatus":{"type":"array","items":{"$ref":"#/components/schemas/DashboardCountByLabelDto"}}},"required":["generatedAt","window","total","byType","byStatus"]},"DashboardBalanceItemDto":{"type":"object","properties":{"chain":{"type":"string","example":"tron"},"asset":{"type":"string","example":"USDT"},"availableBalance":{"type":"string","description":"Sum of available balances (atomic value scaled by asset decimals)","example":"1.5"},"postedBalance":{"type":"string","description":"Sum of posted balances (atomic value scaled by asset decimals)","example":"1.5"},"reservedBalance":{"type":"string","description":"Sum of reserved balances (atomic value scaled by asset decimals)","example":"0"}},"required":["chain","asset","availableBalance","postedBalance","reservedBalance"]},"DashboardBalancesResponseDto":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time","description":"When this snapshot was computed"},"items":{"type":"array","items":{"$ref":"#/components/schemas/DashboardBalanceItemDto"}}},"required":["generatedAt","items"]},"DashboardRecentTransactionItemDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","example":"WITHDRAWAL"},"status":{"type":"string","example":"CONFIRMED"},"chain":{"type":"object","example":"tron","nullable":true},"asset":{"type":"object","example":"USDT","nullable":true},"amount":{"type":"object","description":"Human-readable amount (atomic value scaled by asset decimals)","example":"1.5","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","status","createdAt"]},"DashboardRecentTransactionsResponseDto":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time","description":"When this snapshot was computed"},"items":{"type":"array","items":{"$ref":"#/components/schemas/DashboardRecentTransactionItemDto"}}},"required":["generatedAt","items"]}}}}