# Heimdall — Identity — OpenAPI Specification
# Generated by Zoniqx API Portal

openapi: 3.0.0
paths:
  /users/me:
    get:
      operationId: UsersController_findMe
      summary: Get the authenticated user
      description: Returns the full profile (with relations) of the logged-in user.
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UserResponseDto"
      tags:
        - Users
      security:
        - bearer: []
    patch:
      operationId: UsersController_updateMe
      summary: Update the authenticated user
      description: Updates editable profile fields for the logged-in user.
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateUserDto"
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UserResponseDto"
        409:
          description: This phone number is already linked to another account.
      tags:
        - Users
      security:
        - bearer: []
  /users:
    post:
      operationId: UsersController_createUser
      summary: Create a user
      description: "Admin/API-key access. Creates a new user in the tenant from an email (and optional full name), with no password. Combine with the auth token-mint endpoint to issue the user a bearer token."
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateUserDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UserResponseDto"
        409:
          description: A user with this email already exists in this tenant.
      tags:
        - Users
      security:
        - x-api-key: []
    get:
      operationId: UsersController_findAll
      summary: List / search users
      description: "Returns tenant users, optionally filtered by email or wallet address, with pagination."
      parameters:
        - name: offset
          required: false
          in: query
          description: Number of records to skip
          schema:
            type: number
        - name: limit
          required: false
          in: query
          description: Max number of records to return
          schema:
            type: number
        - name: xrplSecureAccountAddress
          required: false
          in: query
          description: Filter by XRPL secure account address
          schema: {}
        - name: evmEoa
          required: false
          in: query
          description: Filter by EVM/ZIG wallet address
          schema: {}
        - name: email
          required: false
          in: query
          description: Filter by exact user email
          schema: {}
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UsersListResponseDto"
      tags:
        - Users
  "/users/{id}":
    patch:
      operationId: UsersController_updateUser
      summary: Update a user by id
      description: Admin/API-key access. Updates editable profile fields for the given user.
      parameters:
        - name: id
          required: true
          in: path
          description: User id
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateUserDto"
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UserResponseDto"
        409:
          description: This phone number is already linked to another account.
      tags:
        - Users
      security:
        - x-api-key: []
    get:
      operationId: UsersController_findUser
      summary: Get a user by ID (API key required)
      description: Admin/API-key access. Returns the full profile of the given user.
      parameters:
        - name: id
          required: true
          in: path
          description: User id
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UserResponseDto"
      tags:
        - Users
      security:
        - x-api-key: []
  "/users/wallet-addresses/{userId}":
    get:
      operationId: UsersController_getWalletAddresses
      summary: Get a user’s wallet addresses
      description: "Returns EVM, ZIG, and XRPL (Palisade/GEM) wallet addresses for the user."
      parameters:
        - name: userId
          required: true
          in: path
          description: User id
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WalletAddressesResponseDto"
      tags:
        - Users
      security:
        - x-api-key: []
        - bearer: []
  /auth/google/callback:
    get:
      operationId: AuthController_googleCallback
      summary: Handle Google OAuth callback and exchange code for tokens
      description: Redirect target for Google OAuth. Exchanges the auth code and redirects to the client with tokens.
      parameters:
        - name: state
          required: true
          in: query
          description: Base64url-encoded state issued by GET /auth/google
          schema: {}
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Auth
  /auth/google:
    get:
      operationId: AuthController_loginWithGoogle
      summary: Initiate Google OAuth login flow
      description: Returns the Google authorization URL to redirect the user to.
      parameters:
        - name: redirectUrl
          required: true
          in: query
          description: Client URL to redirect back to after successful auth
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RedirectUrlResponseDto"
      tags:
        - Auth
  /auth/email:
    post:
      operationId: AuthController_createNewEmailUser
      summary: Register a new user with email and password
      description: Creates a new email/password user for the tenant and returns the created user.
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/NewEmailUserDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UserResponseDto"
      tags:
        - Auth
  /auth/email/login:
    post:
      operationId: AuthController_loginEmailUser
      summary: Login with email and password
      description: Returns a JWT access token and refresh token pair.
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LoginEmailUserDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TokenPairResponseDto"
      tags:
        - Auth
  /auth/email/verify:
    get:
      operationId: AuthController_verifyEmail
      summary: Verify a user email address (legacy link-based flow)
      description: Confirms the given email is associated with the authenticated user.
      parameters:
        - name: email
          required: true
          in: query
          description: Email address to verify
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SuccessResponseDto"
      tags:
        - Auth
      security:
        - bearer: []
  /auth/email/verify-token:
    post:
      operationId: AuthController_verifyEmailToken
      summary: Verify email with a one-time token (Anka signup flow)
      description: Validates the single-use email-verification token and marks the email verified.
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/VerifyEmailDTO"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SuccessResponseDto"
      tags:
        - Auth
  /auth/email/resend-verification:
    post:
      operationId: AuthController_resendVerification
      summary: Resend email verification link
      description: Returns a generic message regardless of whether the account exists.
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ResendVerificationDTO"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageResponseDto"
      tags:
        - Auth
  /auth/email/verify-otp:
    post:
      operationId: AuthController_verifyEmailOtp
      summary: Verify email with a one-time OTP (FIUSS signup flow)
      description: Validates the 6-digit code sent on signup and marks the email verified.
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/VerifyOtpDTO"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SuccessResponseDto"
      tags:
        - Auth
  /auth/email/resend-otp:
    post:
      operationId: AuthController_resendEmailOtp
      summary: Resend the email-verification OTP (FIUSS signup flow)
      description: Returns a generic message regardless of whether the account exists.
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ResendOtpDTO"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageResponseDto"
      tags:
        - Auth
  /auth/forgot-password:
    post:
      operationId: AuthController_forgotPassword
      summary: Send a password reset email
      description: Sends a reset link if the email matches an account. Returns a generic message.
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ForgotPasswordDTO"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageResponseDto"
      tags:
        - Auth
  /auth/forgot-password/request-otp:
    post:
      operationId: AuthController_requestPasswordResetOtp
      summary: Request a password-reset OTP (FIUSS)
      description: Emails a one-time reset code to the account. Returns a generic message regardless of existence.
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ForgotPasswordOtpRequestDTO"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageResponseDto"
      tags:
        - Auth
  /auth/forgot-password/verify-otp:
    post:
      operationId: AuthController_verifyPasswordResetOtp
      summary: Verify a password-reset OTP (FIUSS)
      description: Validates the reset code and returns a short-lived reset token for PUT /auth/reset-password.
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ForgotPasswordOtpVerifyDTO"
      responses:
        201:
          description: ""
      tags:
        - Auth
  /auth/2fa/status:
    get:
      operationId: AuthController_twoFactorStatus
      summary: Get the current 2FA status for the logged-in user
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Auth
      security:
        - bearer: []
  /auth/2fa/setup:
    post:
      operationId: AuthController_twoFactorSetup
      summary: Begin enabling 2FA (email method)
      description: Sends a verification code to the user’s email. Confirm it with POST /auth/2fa/enable.
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TwoFactorSetupDTO"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageResponseDto"
      tags:
        - Auth
      security:
        - bearer: []
  /auth/2fa/enable:
    post:
      operationId: AuthController_twoFactorEnable
      summary: Confirm and activate 2FA
      description: Validates the setup code and turns 2FA on. Only one method can be active at a time.
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TwoFactorCodeDTO"
      responses:
        201:
          description: ""
      tags:
        - Auth
      security:
        - bearer: []
  /auth/2fa/disable:
    post:
      operationId: AuthController_twoFactorDisable
      summary: Disable 2FA
      description: Turns 2FA off. Requires the account password to re-verify identity.
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TwoFactorDisableDTO"
      responses:
        201:
          description: ""
      tags:
        - Auth
      security:
        - bearer: []
  /auth/2fa/verify:
    post:
      operationId: AuthController_twoFactorVerifyLogin
      summary: Complete login with a 2FA code
      description: "Second login step: exchange the challenge token + code for a token pair."
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TwoFactorVerifyLoginDTO"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TokenPairResponseDto"
      tags:
        - Auth
  /auth/token-status:
    post:
      operationId: AuthController_checkTokenStatus
      summary: Check if a password reset token is still valid
      description: Returns true when the token validates; otherwise responds 400.
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CheckTokenStatusDTO"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: boolean
      tags:
        - Auth
  /auth/reset-password:
    put:
      operationId: AuthController_resetPassword
      summary: Reset password using a reset token
      description: Sets a new password for the account identified by the reset token.
      parameters:
        - name: token
          required: true
          in: query
          description: Password-reset token from the reset email
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ResetPasswordDTO"
      responses:
        200:
          description: ""
      tags:
        - Auth
  /auth/refresh:
    post:
      operationId: AuthController_refreshToken
      summary: Refresh an access token using a refresh token
      description: Returns a fresh access + refresh token pair.
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RefreshTokenDTO"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TokenPairResponseDto"
      tags:
        - Auth
  "/auth/users/{userId}/token":
    post:
      operationId: AuthController_mintUserToken
      parameters:
        - name: userId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: "Mint a bearer token for a user. Protected by the service API key: the caller\npasses `x-api-key` and the userId to obtain that user's token pair."
      tags:
        - Auth
      summary: Mint User Token
  /user-documents:
    post:
      operationId: UserDocumentsController_create
      summary: Upload a document for a user (multipart/form-data)
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateUserDocumentDto"
      responses:
        201:
          description: ""
      tags:
        - Documents
    get:
      operationId: UserDocumentsController_findAll
      summary: List user documents with optional filters
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Documents
  /user-documents/from-url:
    post:
      operationId: UserDocumentsController_createFromUrl
      summary: Create a user document from a URL (no file upload)
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateUserDocumentDto"
      responses:
        201:
          description: ""
      tags:
        - Documents
  "/user-documents/{id}":
    get:
      operationId: UserDocumentsController_findOne
      summary: Get a user document by ID
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Documents
  /tenant-documents:
    post:
      operationId: TenantDocumentsController_create
      summary: Upload a tenant-level document (API key required)
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateTenantDocumentDto"
      responses:
        201:
          description: ""
      tags:
        - Documents
    get:
      operationId: TenantDocumentsController_findAll
      summary: List tenant-level documents (API key required)
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Documents
  "/tenant-documents/{id}/sign":
    post:
      operationId: TenantDocumentsController_signDocument
      summary: Sign a tenant document with an EVM wallet
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SignTenantDocumentDto"
      responses:
        201:
          description: ""
      tags:
        - Documents
    get:
      operationId: TenantDocumentsController_getSigningMessage
      summary: Get the signing message for a tenant document
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: address
          required: true
          in: query
          schema:
            type: string
        - name: chainType
          required: true
          in: query
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Documents
  "/tenant-documents/{id}/sign/xrpl":
    post:
      operationId: TenantDocumentsController_signDocumentXrpl
      summary: Sign a tenant document with an XRPL wallet
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SignTenantDocumentXrplDto"
      responses:
        201:
          description: ""
      tags:
        - Documents
  "/tenant-documents/{id}":
    patch:
      operationId: TenantDocumentsController_update
      summary: Update metadata on a tenant document
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateTenantDocumentDto"
      responses:
        200:
          description: ""
      tags:
        - Documents
    get:
      operationId: TenantDocumentsController_findOne
      summary: Get a tenant document by ID
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Documents
    delete:
      operationId: TenantDocumentsController_delete
      summary: Delete a tenant document
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Documents
  /xrpl-secure-accounts:
    post:
      operationId: XrplSecureAccountsController_registerSecureAccount
      summary: Register a secure XRPL account (multi-sig or other)
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RegisterXrplSecureAccountDto"
      responses:
        201:
          description: ""
      tags:
        - Wallets (XRPL)
    get:
      operationId: XrplSecureAccountsController_getSecureAccounts
      summary: List secure XRPL accounts for a user
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Wallets (XRPL)
  "/xrpl-secure-accounts/{address}":
    get:
      operationId: XrplSecureAccountsController_getSecureAccount
      summary: Get a secure XRPL account by address
      parameters:
        - name: address
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Wallets (XRPL)
  /non-custodian-xrpl/challenge:
    get:
      operationId: NonCustodianXrplController_getSignatureChallenge
      summary: Get a signature challenge for XRPL wallet registration
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Non-Custodian XRPL
  /non-custodian-xrpl/wallet/investor:
    post:
      operationId: NonCustodianXrplController_createWallet
      summary: Create an XRPL investor wallet
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateWalletDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Non-Custodian XRPL
  /non-custodian-xrpl/sign:
    post:
      operationId: NonCustodianXrplController_signMessage
      summary: Sign a message with an XRPL seed (testing only)
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SignMessageDto"
      responses:
        201:
          description: ""
      tags:
        - Non-Custodian XRPL
  /non-custodian-xrpl/wallet/signer-wallet:
    post:
      operationId: NonCustodianXrplController_createHotWallet
      summary: Create an XRPL hot (signer) wallet
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateWalletDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Non-Custodian XRPL
  "/non-custodian-xrpl/wallet/challenge/{address}":
    post:
      operationId: NonCustodianXrplController_createChallenge
      summary: Create a challenge for cold (signing) wallet registration
      parameters:
        - name: address
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: ""
      tags:
        - Non-Custodian XRPL
  /non-custodian-xrpl/wallet:
    post:
      operationId: NonCustodianXrplController_createColdWallet
      summary: Create an XRPL cold wallet with signature verification
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Non-Custodian XRPL
  "/non-custodian-xrpl/wallet/update/{address}":
    put:
      operationId: NonCustodianXrplController_enableColdRipplingWallet
      summary: Update XRPL wallet settings (e.g. enable rippling)
      parameters:
        - name: address
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/updateWalletDto"
      responses:
        200:
          description: ""
      tags:
        - Non-Custodian XRPL
  /non-custodian-xrpl/sign-transaction:
    post:
      operationId: NonCustodianXrplController_signTransaction
      summary: Sign an XRPL transaction with a cold wallet
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SignTransactionDto"
      responses:
        201:
          description: ""
      tags:
        - Non-Custodian XRPL
  /non-custodian-xrpl/wallets:
    get:
      operationId: NonCustodianXrplController_getWalletsByUser
      summary: List XRPL wallets for the authenticated user
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Non-Custodian XRPL
  /non-custodian-xrpl/tx-submit:
    post:
      operationId: NonCustodianXrplController_txSubmit
      summary: Submit a signed XRPL transaction to the ledger
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TxSubmitDto"
      responses:
        201:
          description: ""
      tags:
        - Non-Custodian XRPL
  /kyc:
    get:
      operationId: KycController_getKycAttempts
      summary: List KYC attempts for a user
      parameters:
        - name: userId
          required: true
          in: query
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - KYC
    post:
      operationId: KycController_newKycSession
      summary: Start a new Veriff KYC session
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/NewSessionDto"
      responses:
        201:
          description: ""
      tags:
        - KYC
  "/kyc/current/{kycId}":
    get:
      operationId: KycController_getLastKycAttempt
      summary: Get a KYC attempt by ID
      parameters:
        - name: kycId
          required: true
          in: query
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - KYC
  /kyc/callback/veriff/decision:
    post:
      operationId: KycController_veriffDecision
      summary: Receive Veriff verification decision webhook
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/VeriffDecisionDto"
      responses:
        201:
          description: ""
      tags:
        - KYC
  /kyc/callback/veriff/event:
    post:
      operationId: KycController_veriffEvent
      summary: Receive Veriff session event webhook
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/VeriffEventDto"
      responses:
        201:
          description: ""
      tags:
        - KYC
  /kyc/nexera/web3-challenge:
    post:
      operationId: KycController_createWeb3Challenge
      summary: Create a NexeraID Web3 wallet challenge
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/NexeraChallengeRequestDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - KYC
  /kyc/nexera/regular-challenge:
    post:
      operationId: KycController_createRegularNexeraSession
      summary: Create a NexeraID regular challenge session
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - KYC
  /kyc/callback/nexera:
    post:
      operationId: KycController_nexeraCallback
      summary: Receive NexeraID KYC callback
      parameters:
        - name: tenantId
          required: true
          in: query
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: ""
      tags:
        - KYC
  /kyc/identity/root:
    get:
      operationId: KycController_getIdentityRoot
      summary: Get user identity root hash (for on-chain verification)
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - KYC
  /kyc/identity/proof:
    get:
      operationId: KycController_getIdentityProof
      summary: Get Merkle proof for an identity field
      parameters:
        - name: path
          required: true
          in: query
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - KYC
  /kyc/kycs:
    get:
      operationId: KycController_getKycs
      summary: List all KYC records for a tenant (admin)
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - KYC
  /kyc/kyc:
    post:
      operationId: KycController_createKyc
      summary: Initiate a KYC submission
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/InitiateKycRegistrationDto"
      responses:
        201:
          description: ""
      tags:
        - KYC
  "/kyc/{kycId}":
    patch:
      operationId: KycController_updateKyc
      summary: Update a KYC record manually
      parameters:
        - name: kycId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateKycRecordManualDto"
      responses:
        200:
          description: ""
      tags:
        - KYC
  "/kyc/approve/{kycId}":
    put:
      operationId: KycController_getKyc
      summary: Approve a KYC submission
      parameters:
        - name: kycId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - KYC
  "/kyc/reject/{kycId}":
    put:
      operationId: KycController_rejectKyc
      summary: Reject a KYC submission
      parameters:
        - name: kycId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - KYC
  "/kyc/request-resubmission/{kycId}":
    put:
      operationId: KycController_requestResubmission
      summary: Request KYC resubmission from user
      parameters:
        - name: kycId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - KYC
  /plaid/link-token:
    get:
      operationId: PlaidController_createLinkToken
      summary: Create a Plaid Link token for a user
      parameters:
        - name: redirectUrl
          required: true
          in: query
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Payments
  /plaid/public-token:
    post:
      operationId: PlaidController_exchangePublicToken
      summary: Exchange a Plaid public token for an access token
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: ""
      tags:
        - Payments
  /plaid/items:
    get:
      operationId: PlaidController_getItems
      summary: List Plaid-linked bank accounts (items) for a user
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Payments
  "/plaid/items/{itemId}":
    delete:
      operationId: PlaidController_deleteAccounts
      summary: Unlink (remove) a Plaid bank account item
      parameters:
        - name: itemId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Payments
  /plaid/tenant/originator:
    get:
      operationId: PlaidController_getTenantOriginator
      summary: Get the Plaid originator profile for a tenant (API key required)
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Payments
  /plaid/tenant/link-token:
    get:
      operationId: PlaidController_createLinkTokenForTenant
      summary: Create a Plaid Link token for tenant-level onboarding (API key required)
      parameters:
        - name: redirectUrl
          required: true
          in: query
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Payments
  /accreditations:
    post:
      operationId: AccreditationsController_create
      summary: Submit an accreditation claim
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateAccreditationDto"
      responses:
        201:
          description: ""
      tags:
        - Accreditations
    get:
      operationId: AccreditationsController_findAll
      summary: "List accreditations, optionally filtered by user"
      parameters:
        - name: userId
          required: true
          in: query
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Accreditations
  "/accreditations/{id}/decision":
    post:
      operationId: AccreditationsController_setDecision
      summary: Set the decision (approved/rejected) on an accreditation
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DecisionAccreditationDto"
      responses:
        201:
          description: ""
      tags:
        - Accreditations
  /evm-eoas:
    post:
      operationId: EvmEoasController_create
      summary: Register an EVM externally-owned address (EOA) with signature verification
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateEvmEoaDto"
      responses:
        201:
          description: ""
      tags:
        - Wallets (EVM)
    get:
      operationId: EvmEoasController_getAllEvmEoas
      summary: List registered EVM EOA addresses for a user
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Wallets (EVM)
  /evm-eoas/challenge:
    get:
      operationId: EvmEoasController_getSignatureChallenge
      summary: Get a signature challenge for registering an EVM EOA
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Wallets (EVM)
  /signed-documents:
    get:
      operationId: SignedDocumentsController_findAll
      summary: List signed documents for a user
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Documents
  "/signed-documents/{id}":
    get:
      operationId: SignedDocumentsController_findOne
      summary: Get a signed document by ID
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Documents
  /plaid-sandbox/originators:
    post:
      operationId: PlaidSandboxController_createOriginator
      summary: Create a Plaid sandbox transfer originator
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PlaidSandboxCredentialsDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Payments
    get:
      operationId: PlaidSandboxController_getOriginators
      summary: List Plaid sandbox originators
      parameters:
        - name: count
          required: true
          in: query
          schema:
            type: number
        - name: offset
          required: true
          in: query
          schema:
            type: number
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Payments
  "/plaid-sandbox/originators/{id}/kyb":
    post:
      operationId: PlaidSandboxController_originatorKyc
      summary: Initiate KYB questionnaire for a Plaid sandbox originator
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PlaidSandboxCredentialsDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Payments
  "/plaid-sandbox/originators/{id}":
    get:
      operationId: PlaidSandboxController_getOriginator
      summary: Get a Plaid sandbox originator by client ID
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Payments
  /evm-vaults:
    post:
      operationId: EvmVaultsController_create
      summary: Create a custodial EVM vault for a user
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateEvmVaultDto"
      responses:
        201:
          description: ""
      tags:
        - Wallets (EVM)
    get:
      operationId: EvmVaultsController_find
      summary: Get a custodial EVM vault by address or ID
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Wallets (EVM)
  /dfns/users/auth-token:
    get:
      operationId: DfnsController_findAll
      summary: Get a DFNS auth token for the authenticated user
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  /dfns/users/challenge:
    get:
      operationId: DfnsController_getRegistrationChallenge
      summary: Get a DFNS user registration challenge
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  /dfns/users:
    post:
      operationId: DfnsController_createUser
      summary: Complete DFNS user registration with signed challenge
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateUserDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  /dfns/wallets/challenge:
    get:
      operationId: DfnsController_getSignatureChallenge
      summary: Get a challenge for creating a DFNS wallet
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  /dfns/wallets:
    post:
      operationId: DfnsController_create
      summary: Create a DFNS custodial wallet with signed challenge
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateWalletDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
    get:
      operationId: DfnsController_getUserWallets
      summary: List DFNS custodial wallets for the authenticated user
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Custody
  /dfns/raw-transaction/challenge:
    post:
      operationId: DfnsController_getRawTransactionChallenge
      summary: Get challenge for signing a raw Hedera transaction
      parameters:
        - name: address
          required: true
          in: query
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  /dfns/raw-transaction/complete:
    post:
      operationId: DfnsController_completeRawTransaction
      summary: Complete and broadcast a raw Hedera transaction
      parameters:
        - name: address
          required: true
          in: query
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  /dfns/message/challenge:
    post:
      operationId: DfnsController_getMessageSignChallenge
      summary: Get challenge for signing an EIP-191 message
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  /dfns/message:
    post:
      operationId: DfnsController_signMessage
      summary: Sign an EIP-191 message with a DFNS wallet
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  /dfns/message/eip712/challenge:
    post:
      operationId: DfnsController_get712MessageSignChallenge
      summary: Get challenge for signing an EIP-712 typed message
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  /dfns/message/eip712/sign:
    post:
      operationId: DfnsController_sign712Message
      summary: Sign an EIP-712 typed message with a DFNS wallet
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  /entities:
    post:
      operationId: EntitiesController_createEntity
      summary: Create a new entity (e.g. a legal entity or fund)
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateEntityDto"
      responses:
        201:
          description: ""
      tags:
        - Entities
    get:
      operationId: EntitiesController_getEntities
      summary: "List entities, optionally filtered by user"
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Entities
  "/entities/{id}":
    get:
      operationId: EntitiesController_getEntity
      summary: Get an entity by ID
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Entities
  "/entities/{id}/users":
    get:
      operationId: EntitiesController_getEntityUsers
      summary: List users belonging to an entity
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Entities
    post:
      operationId: EntitiesController_addEntityUser
      summary: Add a user to an entity
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AddEntityUserDto"
      responses:
        201:
          description: ""
      tags:
        - Entities
  "/entities/{id}/metadata":
    put:
      operationId: EntitiesController_updateEntityMetadata
      summary: Update metadata for an entity
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EntityMetadataDto"
      responses:
        200:
          description: ""
      tags:
        - Entities
  "/entities/{id}/manual-payment-methods":
    post:
      operationId: EntitiesController_createManualPaymentMethod
      summary: Create a manual payment method for an entity
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ManualPaymentMethodDto"
      responses:
        201:
          description: ""
      tags:
        - Entities
    get:
      operationId: EntitiesController_getManualPaymentMethods
      summary: List manual payment methods for an entity
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Entities
  "/entities/{id}/manual-payment-methods/{methodId}":
    get:
      operationId: EntitiesController_getManualPaymentMethod
      summary: Get a specific manual payment method for an entity
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: methodId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Entities
    patch:
      operationId: EntitiesController_updateManualPaymentMethod
      summary: Update a manual payment method for an entity
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: methodId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateManualPaymentMethodDto"
      responses:
        200:
          description: ""
      tags:
        - Entities
  "/entities/{id}/astra":
    post:
      operationId: EntitiesController_createAstraBusinessProfile
      summary: Create an Astra business profile for an entity
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: ""
      tags:
        - Entities
    get:
      operationId: EntitiesController_getAstraBusinessProfile
      summary: Get Astra business profile for an entity
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Entities
  "/entities/{id}/users/{targetUserId}":
    delete:
      operationId: EntitiesController_removeEntityUser
      summary: Remove a user from an entity
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: targetUserId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Entities
  "/entities/{id}/users/{targetUserId}/permissions":
    post:
      operationId: EntitiesController_updateEntityUserPermissions
      summary: Grant a permission to a user within an entity
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: targetUserId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PermissionDto"
      responses:
        201:
          description: ""
      tags:
        - Entities
  "/entities/{entityId}/users/{targetUserId}/permissions/{permission}":
    delete:
      operationId: EntitiesController_removeEntityUserPermission
      summary: Revoke a permission from a user within an entity
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Entities
  /astra:
    post:
      operationId: AstraController_createAstraUserIntent
      summary: Create an Astra user intent for ACH transfer setup
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: ""
      tags:
        - Payments
    get:
      operationId: AstraController_getAstraUserIntent
      summary: Get the Astra user intent and connection status
      parameters:
        - name: userId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Payments
  /astra/auth:
    get:
      operationId: AstraController_getAstraAuthUrl
      summary: Get the Astra OAuth authorization URL
      parameters:
        - name: redirectUrl
          required: true
          in: query
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Payments
  /astra/accounts:
    get:
      operationId: AstraController_getLinkedAccounts
      summary: Get linked bank accounts via Astra
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Payments
  /astra/link-account:
    post:
      operationId: AstraController_linkPlaidAccount
      summary: Link a Plaid bank account via Astra for ACH transfers
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LinkAccountDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Payments
  /astra/routine/preview:
    post:
      operationId: AstraController_previewRoutine
      summary: Preview an Astra recurring transfer routine
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RoutineDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Payments
  "/astra/callback/{tenantId}/hook":
    post:
      operationId: AstraController_webhook
      summary: Receive Astra webhook event
      parameters:
        - name: tenantId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AstraWebhookDto"
      responses:
        201:
          description: ""
      tags:
        - Payments
  "/astra/callback/{tenantId}/auth":
    get:
      operationId: AstraController_callback
      summary: Handle Astra OAuth callback and save authorization code
      parameters:
        - name: tenantId
          required: true
          in: path
          schema:
            type: string
        - name: authorization_code
          required: true
          in: query
          schema:
            type: string
        - name: state
          required: true
          in: query
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Payments
  /astra/refresh:
    post:
      operationId: AstraController_refreshAstraToken
      summary: Refresh Astra access token for a user
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: ""
      tags:
        - Payments
  /astra/sync:
    post:
      operationId: AstraController_syncAstraUserIntent
      summary: Sync Astra user connection state
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: ""
      tags:
        - Payments
  /addresses:
    post:
      operationId: AddressesController_addAddress
      summary: Register a blockchain address for a user
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateAddressDto"
      responses:
        201:
          description: ""
      tags:
        - Platform
    get:
      operationId: AddressesController_getAddresses
      summary: List registered blockchain addresses
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Platform
  "/addresses/{addressId}/set-current":
    post:
      operationId: AddressesController_setCurrentAddress
      summary: Set an address as the current (primary) address for a user
      parameters:
        - name: addressId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: ""
      tags:
        - Platform
  /payments:
    get:
      operationId: PaymentsController_getPayments
      summary: "List payments, optionally filtered by user"
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Payments
  "/payments/{id}":
    get:
      operationId: PaymentsController_getPayment
      summary: Get a payment by ID
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Payments
  "/manual-payments/{id}":
    get:
      operationId: ManualPaymentsController_getManualPayment
      summary: Get a manual payment by ID
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Payments
  /manual-payments:
    post:
      operationId: ManualPaymentsController_createManualPayment
      summary: Create a manual payment (investor-initiated)
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ManualPaymentDto"
      responses:
        201:
          description: ""
      tags:
        - Payments
  "/manual-payments/{userId}":
    post:
      operationId: ManualPaymentsController_createManualPaymentByIssuer
      summary: Create a manual payment on behalf of a user (issuer)
      parameters:
        - name: userId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ManualPaymentDto"
      responses:
        201:
          description: ""
      tags:
        - Payments
  "/manual-payments/{id}/approve":
    post:
      operationId: ManualPaymentsController_approveManualPayment
      summary: Approve a pending manual payment
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: ""
      tags:
        - Payments
  "/manual-payments/{id}/reject":
    post:
      operationId: ManualPaymentsController_rejectManualPayment
      summary: Reject a pending manual payment
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: ""
      tags:
        - Payments
  /kyb:
    get:
      operationId: kybController_getkybAttempts
      summary: List KYB attempts for a user
      parameters:
        - name: userId
          required: true
          in: query
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - KYB
  /kyb/initiate:
    post:
      operationId: kybController_initiateKyb
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/InitiateKybDto"
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - KYB
      summary: Initiate Kyb
  /kyb/status:
    get:
      operationId: kybController_getKybStatus
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - KYB
      summary: Get Kyb Status
  /kyb/qib/attest:
    post:
      operationId: kybController_submitQibAttestation
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/QibAttestationDto"
      responses:
        200:
          description: ""
      tags:
        - KYB
      summary: Submit Qib Attestation
  "/kyb/{userId}/review":
    patch:
      operationId: kybController_reviewQib
      parameters:
        - name: userId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ReviewQibDto"
      responses:
        200:
          description: ""
      tags:
        - KYB
      summary: Review Qib
  /kyb/webhook/compilot:
    post:
      operationId: kybController_handleCompilotWebhook
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: "ComPilot webhook receiver. Public (no bearer) but signature-verified via the\nSDK. Tenant is resolved from the x-tenant-id header (TenantHeaderGuard), so the\nwebhook must be configured per tenant with that header."
      tags:
        - KYB
      summary: Handle Compilot Webhook
  /kyb/kybs/all:
    get:
      operationId: kybController_getKybs
      summary: List all KYB records for a tenant (admin)
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - KYB
  "/kyb/{kybId}":
    get:
      operationId: kybController_getKybById
      summary: Get a KYB record by ID
      parameters:
        - name: kybId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - KYB
    patch:
      operationId: kybController_updateKyb
      summary: Update a KYB record
      parameters:
        - name: kybId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateKybDto"
      responses:
        200:
          description: ""
      tags:
        - KYB
  "/kyb/approve/{kybId}":
    put:
      operationId: kybController_approveKyb
      summary: Approve a KYB submission
      parameters:
        - name: kybId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - KYB
  "/kyb/reject/{kybId}":
    put:
      operationId: kybController_rejectKyb
      summary: Reject a KYB submission
      parameters:
        - name: kybId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RejectKybDto"
      responses:
        200:
          description: ""
      tags:
        - KYB
  "/kyb/resubmit/{kybId}":
    put:
      operationId: kybController_resubmitKyb
      summary: Request KYB resubmission from entity
      parameters:
        - name: kybId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RejectKybDto"
      responses:
        200:
          description: ""
      tags:
        - KYB
  /kyb/manual:
    post:
      operationId: kybController_createManualKyb
      summary: Create a manual KYB submission
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/InitiateKybRegistrationDto"
      responses:
        201:
          description: ""
      tags:
        - KYB
  "/kyb/manual/{kybId}":
    patch:
      operationId: kybController_updateManualKyb
      summary: Update a manual KYB record
      parameters:
        - name: kybId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateKybRecordManualDto"
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - KYB
  "/kyb/{kybId}/documents":
    post:
      operationId: kybController_linkDocumentToKyb
      summary: Link a document to a KYB record
      parameters:
        - name: kybId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateKybDocumentDto"
      responses:
        201:
          description: ""
      tags:
        - KYB
    get:
      operationId: kybController_getKybDocuments
      summary: List all documents linked to a KYB record
      parameters:
        - name: kybId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - KYB
  "/kyb/{kybId}/documents/bulk":
    post:
      operationId: kybController_linkDocumentsToKyb
      summary: Link multiple documents to a KYB record in bulk
      parameters:
        - name: kybId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LinkKybDocumentsDto"
      responses:
        201:
          description: ""
      tags:
        - KYB
  "/kyb/file/{kybDocumentId}":
    get:
      operationId: kybController_getKybDocumentFile
      summary: Get the file for a KYB document link
      parameters:
        - name: kybDocumentId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - KYB
  "/kyb/{kybId}/documents/{kybDocumentId}":
    delete:
      operationId: kybController_unlinkDocumentFromKyb
      summary: Unlink a document from a KYB record
      parameters:
        - name: kybId
          required: true
          in: path
          schema:
            type: string
        - name: kybDocumentId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - KYB
  "/kyb/documents/{kybDocumentId}":
    patch:
      operationId: kybController_updateKybDocumentNotes
      summary: Update notes on a KYB document link
      parameters:
        - name: kybDocumentId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateKybDocumentDto"
      responses:
        200:
          description: ""
      tags:
        - KYB
  /onboarding:
    post:
      operationId: OnboardingController_createOnboarding
      summary: Create an onboarding record for a user
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateOnboardingDto"
      responses:
        201:
          description: ""
      tags:
        - Onboarding
  "/onboarding/{userId}":
    get:
      operationId: OnboardingController_getOnboarding
      summary: Get the onboarding record for a user
      parameters:
        - name: userId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Onboarding
    patch:
      operationId: OnboardingController_updateOnboarding
      summary: Update the onboarding record for a user
      parameters:
        - name: userId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateOnboardingDto"
      responses:
        200:
          description: ""
      tags:
        - Onboarding
  "/onboarding/{userId}/status":
    patch:
      operationId: OnboardingController_updateStatus
      summary: Update the onboarding status for a user
      parameters:
        - name: userId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/StatusUpdateOnboardingDto"
      responses:
        200:
          description: ""
      tags:
        - Onboarding
  /palisade/auth-token:
    get:
      operationId: PalisadeController_getAuthToken
      summary: Get a Palisade auth token for the authenticated user
      parameters:
        - name: apiType
          required: true
          in: query
          schema: {}
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  /palisade/vaults:
    post:
      operationId: PalisadeController_createVault
      summary: Create a Palisade XRPL vault
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateVaultDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
    get:
      operationId: PalisadeController_getAllUserVaults
      summary: List all Palisade vaults for the authenticated user
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/palisade/vaults/{vaultId}":
    get:
      operationId: PalisadeController_getVaultById
      summary: Get a Palisade vault by ID
      parameters:
        - name: vaultId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/palisade/vaults/{vaultId}/wallets":
    post:
      operationId: PalisadeController_createWallet
      summary: Create a Palisade XRPL wallet inside a vault
      parameters:
        - name: vaultId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreatePalisadeWalletDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
    get:
      operationId: PalisadeController_getAllUserWallets
      summary: List Palisade wallets in a vault
      parameters:
        - name: palisadeWalletType
          required: true
          in: query
          schema: {}
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/palisade/wallet/{walletId}":
    get:
      operationId: PalisadeController_getWalletById
      summary: Get a Palisade wallet by ID
      parameters:
        - name: walletId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/palisade/vaults/{vaultId}/wallets/{walletId}":
    put:
      operationId: PalisadeController_updateWallet
      summary: Update a Palisade wallet
      parameters:
        - name: vaultId
          required: true
          in: path
          schema:
            type: string
        - name: walletId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateWalletDto"
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/palisade/vaults/{vaultId}/wallets/{walletId}/refetch":
    patch:
      operationId: PalisadeController_refreshWallet
      summary: Refresh (re-sync) a Palisade wallet from the provider
      parameters:
        - name: vaultId
          required: true
          in: path
          schema:
            type: string
        - name: walletId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/palisade/vaults/{vaultId}/wallets/{walletId}/settings":
    put:
      operationId: PalisadeController_updateWalletSettings
      summary: Update settings for a Palisade wallet
      parameters:
        - name: vaultId
          required: true
          in: path
          schema:
            type: string
        - name: walletId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateWalletSettingsDto"
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/palisade/vaults/{vaultId}/wallets/{walletId}/transactions/sign":
    post:
      operationId: PalisadeController_signTransaction
      summary: Sign a raw transaction with a Palisade wallet
      parameters:
        - name: vaultId
          required: true
          in: path
          schema:
            type: string
        - name: walletId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SignTransactionDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/palisade/vaults/{vaultId}/wallets/{walletId}/transactions/sign-message":
    post:
      operationId: PalisadeController_signMessage
      summary: Sign an arbitrary message with a Palisade wallet
      parameters:
        - name: vaultId
          required: true
          in: path
          schema:
            type: string
        - name: walletId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SignMessageDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/palisade/vaults/{vaultId}/wallets/{walletId}/transactions":
    get:
      operationId: PalisadeController_listTransactions
      summary: List transactions for a Palisade wallet
      parameters:
        - name: vaultId
          required: true
          in: path
          schema:
            type: string
        - name: walletId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/palisade/vaults/{vaultId}/wallets/{walletId}/transactions/xrp/trust-set":
    post:
      operationId: PalisadeController_setTrustLine
      summary: Set an XRPL TrustLine for a Palisade wallet
      parameters:
        - name: vaultId
          required: true
          in: path
          schema:
            type: string
        - name: walletId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TrustSetTransactionDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/palisade/vaults/{vaultId}/wallets/{walletId}/transactions/xrp/account-set":
    post:
      operationId: PalisadeController_setAccount
      summary: Configure XRPL AccountSet flags for a Palisade wallet
      parameters:
        - name: vaultId
          required: true
          in: path
          schema:
            type: string
        - name: walletId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AccountSetDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/palisade/vaults/{vaultId}/wallets/{walletId}/balances":
    get:
      operationId: PalisadeController_getWalletBalance
      summary: Get token balances for a Palisade wallet
      parameters:
        - name: vaultId
          required: true
          in: path
          schema:
            type: string
        - name: walletId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/palisade/vaults/{vaultId}/wallets/{walletId}/transactions/transfer":
    post:
      operationId: PalisadeController_transferAsset
      summary: Transfer an asset from a Palisade wallet
      parameters:
        - name: vaultId
          required: true
          in: path
          schema:
            type: string
        - name: walletId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TransferAssetDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/palisade/vaults/{vaultId}/wallets/{walletId}/transactions/xrp/signer-list-set":
    post:
      operationId: PalisadeController_setSignerList
      summary: Set the XRPL SignerList for multi-sig on a Palisade wallet
      parameters:
        - name: vaultId
          required: true
          in: path
          schema:
            type: string
        - name: walletId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SetSignerListDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/palisade/vaults/{vaultId}/wallets/{walletId}/transactions/{transactionId}":
    get:
      operationId: PalisadeController_getTransactionById
      summary: Get a Palisade transaction by ID
      parameters:
        - name: vaultId
          required: true
          in: path
          schema:
            type: string
        - name: walletId
          required: true
          in: path
          schema:
            type: string
        - name: transactionId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/palisade/vaults/{vaultId}/wallets/{walletId}/policy-rules/limits":
    put:
      operationId: PalisadeController_updatePolicy
      summary: Update transfer policy limits for a Palisade wallet
      parameters:
        - name: vaultId
          required: true
          in: path
          schema:
            type: string
        - name: walletId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdatePolicyDto"
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/palisade/vaults/{vaultId}/wallets/{walletId}/policy-rules/addresses":
    post:
      operationId: PalisadeController_createAddressAllowList
      summary: Add an address to the allowlist for a Palisade wallet
      parameters:
        - name: vaultId
          required: true
          in: path
          schema:
            type: string
        - name: walletId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateAddressAllowListDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/palisade/wallets/{id}":
    put:
      operationId: PalisadeController_updatePalisadeStatusById
      summary: Update a Palisade wallet record by ID
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateWalletDto"
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/palisade/{walletId}":
    post:
      operationId: PalisadeController_createPalisadeStatus
      summary: Create a Palisade wallet status record
      parameters:
        - name: walletId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreatePalisadeStatusDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
    put:
      operationId: PalisadeController_updatePalisadeStatus
      summary: Update a Palisade wallet status record
      parameters:
        - name: walletId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdatePalisadeStatusDto"
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
    get:
      operationId: PalisadeController_getPalisadeStatus
      summary: Get the Palisade status record for a wallet
      parameters:
        - name: walletId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  /health:
    get:
      operationId: HealthCheckController_check
      summary: HealthCheck
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: Health Check run correctly.
        503:
          description: The Health Check is not successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: error
                  info:
                    type: object
                    example:
                      database:
                        status: up
                    additionalProperties:
                      type: object
                      required:
                        - status
                      properties:
                        status:
                          type: string
                      additionalProperties: true
                    nullable: true
                  error:
                    type: object
                    example:
                      redis:
                        status: down
                        message: Could not connect
                    additionalProperties:
                      type: object
                      required:
                        - status
                      properties:
                        status:
                          type: string
                      additionalProperties: true
                    nullable: true
                  details:
                    type: object
                    example:
                      database:
                        status: up
                      redis:
                        status: down
                        message: Could not connect
                    additionalProperties:
                      type: object
                      required:
                        - status
                      properties:
                        status:
                          type: string
                      additionalProperties: true
      tags:
        - Health Check
  /stripe-payments:
    post:
      operationId: StripePaymentsController_createIntent
      summary: Create a Stripe payment intent and return the client secret
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateIntentDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Payments
  /stripe-payments/webhook:
    post:
      operationId: StripePaymentsController_webhook
      summary: Receive Stripe payment event webhook
      parameters:
        - name: stripe-signature
          required: true
          in: header
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: ""
      tags:
        - Payments
  "/private-state/get/{key}":
    get:
      operationId: PrivateStateController_get
      summary: Get a private state value by key
      parameters:
        - name: key
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PrivateStateGetDTO"
      tags:
        - Platform
  "/private-state/get/contract/{contractAddress}":
    get:
      operationId: PrivateStateController_getAll
      summary: List private state values for a contract address
      parameters:
        - name: contractAddress
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PrivateStateGetDTO"
      tags:
        - Platform
  /private-state/set:
    post:
      operationId: PrivateStateController_set
      summary: Set a private state value for a key
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PrivateStateCreateDTO"
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PrivateStateGetDTO"
      tags:
        - Platform
  "/private-state/remove/{key}":
    delete:
      operationId: PrivateStateController_remove
      summary: Delete a private state value by key
      parameters:
        - name: key
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: boolean
      tags:
        - Platform
  /private-state/clear:
    delete:
      operationId: PrivateStateController_clear
      summary: Delete all private state values for a user
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: boolean
      tags:
        - Platform
  /private-state/investor-commitment:
    post:
      operationId: PrivateStateController_saveInvestorCommitment
      summary: Store an investor commitment for a Midnight contract
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/InvestorCommitmentCreateDTO"
      responses:
        200:
          description: ""
      tags:
        - Platform
  /private-state/my-midnight-holdings:
    get:
      operationId: PrivateStateController_getMyMidnightHoldings
      summary: Get Midnight token holdings by coin public key
      parameters:
        - name: coinPublicKey
          required: true
          in: query
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Platform
  /bank-accounts:
    get:
      operationId: BankAccountController_findBankAccountById
      summary: Get the authenticated user's bank account
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Bank Accounts
    post:
      operationId: BankAccountController_createBankAccount
      summary: Add a bank account for the authenticated user
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateBankAccountDTO"
      responses:
        201:
          description: ""
      tags:
        - Bank Accounts
  /bank-accounts/user:
    get:
      operationId: BankAccountController_findBankAccountsByUserId
      summary: Find bank account by wallet address (API key required)
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Bank Accounts
  "/bank-accounts/{id}":
    patch:
      operationId: BankAccountController_updateBankAccount
      summary: Update a bank account
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateBankAccountDTO"
      responses:
        200:
          description: ""
      tags:
        - Bank Accounts
    delete:
      operationId: BankAccountController_deleteBankAccount
      summary: Delete a bank account
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
      tags:
        - Bank Accounts
  /non-custodial-evm/wallets:
    post:
      operationId: NonCustodialEvmController_createWallet
      summary: Create a custodial EVM wallet via Anchorage
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateWalletDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
    get:
      operationId: NonCustodialEvmController_listWallets
      summary: List Anchorage custodial wallets for the authenticated user
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
      tags:
        - Custody
  "/non-custodial-evm/wallets/{walletId}":
    get:
      operationId: NonCustodialEvmController_getWallet
      summary: Get an Anchorage custodial wallet by ID
      parameters:
        - name: walletId
          required: true
          in: path
          schema:
            type: string
        - name: provider
          required: true
          in: query
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  /non-custodial-evm/user-wallets:
    get:
      operationId: NonCustodialEvmController_getUserWallets
      summary: List all Anchorage wallets linked to the authenticated user
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
      tags:
        - Custody
  "/non-custodial-evm/wallets/{walletId}/addresses":
    post:
      operationId: NonCustodialEvmController_provisionAddress
      summary: Provision a deposit address for an Anchorage wallet
      parameters:
        - name: walletId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProvisionAddressDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  /non-custodial-evm/withdrawals:
    post:
      operationId: NonCustodialEvmController_createWithdrawal
      summary: Create a withdrawal from an Anchorage custodial wallet
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateWithdrawalDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  /non-custodial-evm/transactions:
    get:
      operationId: NonCustodialEvmController_listTransactions
      summary: List transactions for Anchorage custodial wallets
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/non-custodial-evm/transactions/{transactionId}":
    get:
      operationId: NonCustodialEvmController_getTransaction
      summary: Get an Anchorage transaction by ID
      parameters:
        - name: transactionId
          required: true
          in: path
          schema:
            type: string
        - name: provider
          required: true
          in: query
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  /non-custodial-evm/transfers:
    post:
      operationId: NonCustodialEvmController_createTransfer
      summary: Create an asset transfer between Anchorage wallets
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateTransferDto"
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
    get:
      operationId: NonCustodialEvmController_listTransfers
      summary: List Anchorage asset transfers
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/non-custodial-evm/transfers/{transferId}":
    get:
      operationId: NonCustodialEvmController_getTransfer
      summary: Get an Anchorage transfer by ID
      parameters:
        - name: transferId
          required: true
          in: path
          schema:
            type: string
        - name: provider
          required: true
          in: query
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
    delete:
      operationId: NonCustodialEvmController_cancelTransfer
      summary: Cancel a pending Anchorage transfer
      parameters:
        - name: transferId
          required: true
          in: path
          schema:
            type: string
        - name: provider
          required: true
          in: query
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/non-custodial-evm/deposit-attributions/{depositTransactionId}/spam":
    post:
      operationId: NonCustodialEvmController_attributeDepositAsSpam
      summary: Flag an Anchorage deposit transaction as spam
      parameters:
        - name: depositTransactionId
          required: true
          in: path
          schema:
            type: string
        - name: provider
          required: true
          in: query
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        201:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  "/non-custodial-evm/deposit-attributions/{depositTransactionId}":
    patch:
      operationId: NonCustodialEvmController_attributeDeposit
      summary: Add AML attribution metadata to a deposit transaction
      parameters:
        - name: depositTransactionId
          required: true
          in: path
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AttributeDepositDto"
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  /non-custodial-evm/asset-types:
    get:
      operationId: NonCustodialEvmController_getAssetTypes
      summary: List supported asset types for Anchorage wallets
      parameters:
        - name: provider
          required: true
          in: query
          schema:
            type: string
        - name: assetTypes
          required: true
          in: query
          schema:
            type: string
        - name: assetFeatures
          required: true
          in: query
          schema:
            type: string
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  /non-custodial-evm/deposit-attributions:
    get:
      operationId: NonCustodialEvmController_listDepositAttributions
      summary: List Anchorage deposit attributions
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                type: object
      tags:
        - Custody
  /bulk-registration/investors:
    post:
      operationId: BulkRegistrationController_bulkRegisterInvestors
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          description: Tenant identifier. Required on all tenant-scoped routes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: CSV file containing investor data
      responses:
        201:
          description: "Upload CSV file with investor data (multipart/form-data)\nRoute: POST /bulk-registration/investors\n\nSupports both KYC (individual) and KYB (business) registrations.\nNew investors receive a system-generated password via email.\nExisting investors have their missing data completed."
      tags:
        - Bulk Registration
      summary: Bulk Register Investors
info:
  title: "Heimdall — Identity & Compliance"
  description: "# Heimdall API\n\nHeimdall is the **operational identity layer** for the Zoniqx platform. It handles investor & entity onboarding, KYC/KYB verification, accreditation, wallet linkage, and document management — all tenant-scoped.\n\n### What you can do\n- Run **KYC** (individuals) and **KYB** (entities) via built-in vendor and manual flows\n- Capture and decision **accreditation** claims\n- Manage **user profiles** and linked **wallets** (EVM / XRPL)\n- Store and sign **documents**\n\n## Authentication\n\nAll endpoints are protected. Authenticate every request with a **Bearer token** and scope it to a tenant:\n\n```http\nAuthorization: Bearer <your-access-token>\nx-tenant-id: <your-tenant-id>\n```\n\nUse the **Test Request** button on any endpoint to try it live with your own credentials — nothing is stored by this portal.\n\n## Support\n\nQuestions? Reach the platform team at **developers@zoniqx.com**.\n"
  version: 0.0.1
  contact:
    name: Zoniqx Developer Support
    email: "developers@zoniqx.com"
  summary: "Identity, KYC/KYB, accreditation, wallets and documents for the multi-tenant Web3 stack."
  x-logo:
    url: /assets/logo.svg
    altText: Zoniqx
tags:
  - name: Users
    description: Operations for Users.
  - name: Auth
    description: Operations for Auth.
  - name: Documents
    description: Operations for Documents.
  - name: Wallets (XRPL)
    description: Operations for Wallets (XRPL).
  - name: Non-Custodian XRPL
    description: Operations for Non-Custodian XRPL.
  - name: KYC
    description: Operations for KYC.
  - name: Payments
    description: Operations for Payments.
  - name: Accreditations
    description: Operations for Accreditations.
  - name: Wallets (EVM)
    description: Operations for Wallets (EVM).
  - name: Custody
    description: Operations for Custody.
  - name: Entities
    description: Operations for Entities.
  - name: Platform
    description: Operations for Platform.
  - name: KYB
    description: Operations for KYB.
  - name: Onboarding
    description: Operations for Onboarding.
  - name: Health Check
    description: Operations for Health Check.
  - name: Bank Accounts
    description: Operations for Bank Accounts.
  - name: Bulk Registration
    description: Operations for Bulk Registration.
servers:
  - url: "https://heimdall.qa.zoniqx.com"
    description: Development
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key
  schemas:
    UserResponseDto:
      type: object
      properties:
        id:
          type: string
        tenantId:
          type: string
        userType:
          type: string
          enum:
            - person
            - entity
        fullName:
          type: string
          nullable: true
        email:
          type: string
          format: email
          nullable: true
        phoneNumber:
          type: string
          nullable: true
        currentAddressId:
          type: string
          nullable: true
        currentKycId:
          type: string
          nullable: true
        currentKybId:
          type: string
          nullable: true
        currentAccreditationId:
          type: string
          nullable: true
        digitalSignatureFileId:
          type: string
          nullable: true
        dateOfBirth:
          type: string
          nullable: true
        metadata:
          type: object
          additionalProperties: {}
          nullable: true
        createdAt:
          type: string
          format: date-time
          nullable: true
        updatedAt:
          type: string
          format: date-time
          nullable: true
        currentAddress:
          type: object
          additionalProperties: {}
          nullable: true
        currentAccreditation:
          type: object
          additionalProperties: {}
          nullable: true
        currentKyc:
          type: object
          additionalProperties: {}
          nullable: true
        currentKyb:
          type: object
          additionalProperties: {}
          nullable: true
        evmEoas:
          type: array
          items:
            type: object
            properties:
              address:
                type: string
              createdAt:
                type: string
                format: date-time
                nullable: true
            required:
              - address
        xrplSecureAccounts:
          type: array
          items:
            type: object
            additionalProperties: {}
        authMethods:
          type: array
          items:
            type: object
            properties:
              createdAt:
                type: string
                format: date-time
                nullable: true
              identifier:
                type: string
                nullable: true
              type:
                type: string
              authVendorData:
                type: object
                additionalProperties: {}
                nullable: true
            required:
              - createdAt
              - identifier
              - type
              - authVendorData
      required:
        - id
        - tenantId
        - userType
        - fullName
        - email
        - phoneNumber
        - currentAddressId
        - currentKycId
        - currentKybId
        - currentAccreditationId
        - digitalSignatureFileId
        - dateOfBirth
        - metadata
        - createdAt
        - updatedAt
    UpdateUserDto:
      type: object
      properties:
        fullName:
          type: string
        phoneNumber:
          type: string
          minLength: 10
          maxLength: 15
          pattern: "\\+(9[976]\\d|8[987530]\\d|6[987]\\d|5[90]\\d|42\\d|3[875]\\d|2[98654321]\\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)\\d{1,14}$"
        dateOfBirth:
          description: Date of birth in 'YYYY-MM-DD' format
          type: string
          format: date
        ssnLastFour:
          type: string
          pattern: "^\\d{4}$"
        digitalSignatureFileId:
          type: string
          nullable: true
    CreateUserDto:
      type: object
      properties:
        signedChallenge:
          type: object
          properties:
            firstFactorCredential:
              oneOf:
                - type: object
                  properties:
                    credentialKind:
                      type: string
                      enum:
                        - Key
                    credentialInfo:
                      type: object
                      properties:
                        credId:
                          type: string
                        clientData:
                          type: string
                        attestationData:
                          type: string
                      required:
                        - credId
                        - clientData
                        - attestationData
                  required:
                    - credentialKind
                    - credentialInfo
                - type: object
                  properties:
                    credentialKind:
                      type: string
                      enum:
                        - Fido2
                    credentialInfo:
                      type: object
                      properties:
                        credId:
                          type: string
                        clientData:
                          type: string
                        attestationData:
                          type: string
                      required:
                        - credId
                        - clientData
                        - attestationData
                  required:
                    - credentialKind
                    - credentialInfo
                - type: object
                  properties:
                    credentialKind:
                      type: string
                      enum:
                        - Password
                    credentialInfo:
                      type: object
                      properties:
                        password:
                          type: string
                      required:
                        - password
                  required:
                    - credentialKind
                    - credentialInfo
            secondFactorCredential:
              oneOf:
                - type: object
                  properties:
                    credentialKind:
                      type: string
                      enum:
                        - Key
                    credentialInfo:
                      type: object
                      properties:
                        credId:
                          type: string
                        clientData:
                          type: string
                        attestationData:
                          type: string
                      required:
                        - credId
                        - clientData
                        - attestationData
                  required:
                    - credentialKind
                    - credentialInfo
                - type: object
                  properties:
                    credentialKind:
                      type: string
                      enum:
                        - Fido2
                    credentialInfo:
                      type: object
                      properties:
                        credId:
                          type: string
                        clientData:
                          type: string
                        attestationData:
                          type: string
                      required:
                        - credId
                        - clientData
                        - attestationData
                  required:
                    - credentialKind
                    - credentialInfo
                - type: object
                  properties:
                    credentialKind:
                      type: string
                      enum:
                        - Totp
                    credentialInfo:
                      type: object
                      properties:
                        otpCode:
                          type: string
                      required:
                        - otpCode
                  required:
                    - credentialKind
                    - credentialInfo
            recoveryCredential:
              type: object
              properties:
                credentialKind:
                  type: string
                  enum:
                    - RecoveryKey
                credentialInfo:
                  type: object
                  properties:
                    credId:
                      type: string
                    clientData:
                      type: string
                    attestationData:
                      type: string
                  required:
                    - credId
                    - clientData
                    - attestationData
                encryptedPrivateKey:
                  type: string
              required:
                - credentialKind
                - credentialInfo
          required:
            - firstFactorCredential
        tempAuthToken:
          type: string
      required:
        - signedChallenge
        - tempAuthToken
    UsersListResponseDto:
      type: array
      items:
        type: object
        properties:
          id:
            type: string
          tenantId:
            type: string
          userType:
            type: string
            enum:
              - person
              - entity
          fullName:
            type: string
            nullable: true
          email:
            type: string
            format: email
            nullable: true
          phoneNumber:
            type: string
            nullable: true
          currentAddressId:
            type: string
            nullable: true
          currentKycId:
            type: string
            nullable: true
          currentKybId:
            type: string
            nullable: true
          currentAccreditationId:
            type: string
            nullable: true
          digitalSignatureFileId:
            type: string
            nullable: true
          dateOfBirth:
            type: string
            nullable: true
          metadata:
            type: object
            additionalProperties: {}
            nullable: true
          createdAt:
            type: string
            format: date-time
            nullable: true
          updatedAt:
            type: string
            format: date-time
            nullable: true
          currentAddress:
            type: object
            additionalProperties: {}
            nullable: true
          currentAccreditation:
            type: object
            additionalProperties: {}
            nullable: true
          currentKyc:
            type: object
            additionalProperties: {}
            nullable: true
          currentKyb:
            type: object
            additionalProperties: {}
            nullable: true
          evmEoas:
            type: array
            items:
              type: object
              properties:
                address:
                  type: string
                createdAt:
                  type: string
                  format: date-time
                  nullable: true
              required:
                - address
          xrplSecureAccounts:
            type: array
            items:
              type: object
              additionalProperties: {}
          authMethods:
            type: array
            items:
              type: object
              properties:
                createdAt:
                  type: string
                  format: date-time
                  nullable: true
                identifier:
                  type: string
                  nullable: true
                type:
                  type: string
                authVendorData:
                  type: object
                  additionalProperties: {}
                  nullable: true
              required:
                - createdAt
                - identifier
                - type
                - authVendorData
        required:
          - id
          - tenantId
          - userType
          - fullName
          - email
          - phoneNumber
          - currentAddressId
          - currentKycId
          - currentKybId
          - currentAccreditationId
          - digitalSignatureFileId
          - dateOfBirth
          - metadata
          - createdAt
          - updatedAt
    WalletAddressesResponseDto:
      type: object
      properties:
        evmWallets:
          type: array
          items:
            type: object
            properties:
              address:
                type: string
            required:
              - address
        zigWallets:
          type: array
          items:
            type: object
            properties:
              address:
                type: string
            required:
              - address
        xrplWalletsPalisade:
          type: array
          items:
            type: object
            properties:
              address:
                type: string
            required:
              - address
        xrplWalletsGem:
          type: array
          items:
            type: object
            properties:
              address:
                type: string
            required:
              - address
      required:
        - evmWallets
        - zigWallets
        - xrplWalletsPalisade
        - xrplWalletsGem
    RedirectUrlResponseDto:
      type: object
      properties:
        url:
          description: URL to redirect the browser to
          type: string
          format: uri
      required:
        - url
    NewEmailUserDto:
      type: object
      properties:
        email:
          type: string
          format: email
        password:
          type: string
          format: password
          pattern: "^.*$"
        fullName:
          type: string
        referralCode:
          type: string
      required:
        - email
        - password
    LoginEmailUserDto:
      type: object
      properties:
        email:
          type: string
          format: email
        password:
          type: string
      required:
        - email
        - password
    TokenPairResponseDto:
      type: object
      properties:
        token:
          description: Short-lived JWT access token
          type: string
        refreshToken:
          description: "Longer-lived refresh token, exchange at POST /auth/refresh"
          type: string
      required:
        - token
        - refreshToken
    SuccessResponseDto:
      type: object
      properties:
        success:
          type: boolean
      required:
        - success
    VerifyEmailDTO:
      type: object
      properties:
        token:
          type: string
      required:
        - token
    ResendVerificationDTO:
      type: object
      properties:
        email:
          type: string
          format: email
      required:
        - email
    MessageResponseDto:
      type: object
      properties:
        message:
          type: string
      required:
        - message
    VerifyOtpDTO:
      type: object
      properties:
        email:
          type: string
          format: email
        otp:
          type: string
          minLength: 4
          maxLength: 10
      required:
        - email
        - otp
    ResendOtpDTO:
      type: object
      properties:
        email:
          type: string
          format: email
      required:
        - email
    ForgotPasswordDTO:
      type: object
      properties:
        email:
          type: string
          format: email
      required:
        - email
    ForgotPasswordOtpRequestDTO:
      type: object
      properties:
        email:
          type: string
          format: email
      required:
        - email
    ForgotPasswordOtpVerifyDTO:
      type: object
      properties:
        email:
          type: string
          format: email
        otp:
          type: string
          minLength: 4
          maxLength: 10
      required:
        - email
        - otp
    TwoFactorSetupDTO:
      type: object
      properties:
        method:
          type: string
          enum:
            - email
            - sms
            - totp
      required:
        - method
    TwoFactorCodeDTO:
      type: object
      properties:
        code:
          type: string
          minLength: 4
          maxLength: 10
      required:
        - code
    TwoFactorDisableDTO:
      type: object
      properties:
        password:
          type: string
      required:
        - password
    TwoFactorVerifyLoginDTO:
      type: object
      properties:
        challengeToken:
          type: string
        code:
          type: string
          minLength: 4
          maxLength: 10
      required:
        - challengeToken
        - code
    CheckTokenStatusDTO:
      type: object
      properties:
        token:
          type: string
      required:
        - token
    ResetPasswordDTO:
      type: object
      properties:
        password:
          type: string
      required:
        - password
    RefreshTokenDTO:
      type: object
      properties:
        refreshToken:
          type: string
      required:
        - refreshToken
    CreateUserDocumentDto:
      type: object
      properties:
        id:
          type: string
        purpose:
          type: string
          enum:
            - accreditation
            - kyc
            - aml
            - payment
            - identity
            - investment
            - accepted_terms_and_conditions
            - digital_signature
        title:
          type: string
        externalId:
          type: string
        signatureId:
          type: string
        fileUrl:
          type: string
          format: uri
      required:
        - purpose
        - title
    CreateTenantDocumentDto:
      type: object
      properties:
        purpose:
          type: string
          enum:
            - deal
            - onboarding_person
            - onboarding_entity
            - terms_and_conditions
            - property
        title:
          type: string
        externalId:
          type: string
        organizationId:
          type: string
      required:
        - purpose
        - title
    SignTenantDocumentDto:
      type: object
      properties:
        userSignature:
          type: string
        message:
          type: string
        serviceSignature:
          type: string
        address:
          type: string
        publicKey:
          type: string
      required:
        - userSignature
        - message
        - serviceSignature
        - address
    SignTenantDocumentXrplDto:
      type: object
      properties:
        signingHash:
          type: string
        message:
          type: string
        prefixMessage:
          type: string
        signature:
          type: string
        address:
          type: string
        publicKey:
          type: string
      required:
        - message
        - signature
        - address
        - publicKey
    UpdateTenantDocumentDto:
      type: object
      properties:
        isDeleted:
          type: boolean
      required:
        - isDeleted
    RegisterXrplSecureAccountDto:
      type: object
      properties:
        address:
          type: string
      required:
        - address
    CreateWalletDto:
      type: object
      properties:
        networkId:
          type: string
          minLength: 1
        walletName:
          type: string
        provider:
          type: string
          enum:
            - anchorage
          default: anchorage
      required:
        - networkId
    SignMessageDto:
      type: object
      properties:
        message:
          type: string
      required:
        - message
    updateWalletDto:
      type: object
      properties:
        accountSet:
          description: Account set status
          type: boolean
        status:
          description: Status of the wallet
          type: string
          enum:
            - CREATED
            - PENDING
            - PROVISIONED
            - REJECTED
          x-enumNames:
            - CREATED
            - PENDING
            - PROVISIONED
            - REJECTED
    SignTransactionDto:
      type: object
      properties:
        encodedTransaction:
          type: string
        signOnly:
          type: boolean
      required:
        - encodedTransaction
        - signOnly
    TxSubmitDto:
      type: object
      properties:
        transaction:
          description: Encoded transaction
          type: string
        chain:
          type: string
          default: MAINNET
      required:
        - transaction
    NewSessionDto:
      type: object
      properties:
        vendorId:
          type: string
        vendor:
          type: string
          enum:
            - veriff
            - nexera
            - manual
      required:
        - vendorId
        - vendor
    VeriffDecisionDto:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
        verification:
          type: object
          properties:
            id:
              type: string
            code:
              type: number
            person:
              type: object
              properties:
                firstName:
                  type: string
                lastName:
                  type: string
                  nullable: true
                dateOfBirth:
                  type: string
                  nullable: true
                nationality:
                  type: string
                  nullable: true
                placeOfBirth:
                  type: string
                  nullable: true
                yearOfBirth:
                  type: string
                  nullable: true
            addresses:
              type: array
              items:
                type: object
                properties:
                  fullAddress:
                    type: string
                  parsedAddress:
                    type: object
                    properties:
                      city:
                        type: string
                      unit:
                        type: string
                      state:
                        type: string
                      street:
                        type: string
                      country:
                        type: string
                      postcode:
                        type: string
                      houseNumber:
                        type: string
                    required:
                      - city
                      - unit
                      - state
                      - street
                      - country
                      - postcode
                      - houseNumber
                required:
                  - fullAddress
                  - parsedAddress
            status:
              type: string
              enum:
                - approved
                - resubmission_requested
                - review
                - declined
                - expired
                - abandoned
            vendorData:
              type: string
            decisionTime:
              type: string
            acceptanceTime:
              type: string
          required:
            - id
            - code
            - person
            - status
            - vendorData
            - decisionTime
            - acceptanceTime
        technicalData:
          type: object
          properties:
            ip:
              type: string
          required:
            - ip
      required:
        - status
        - verification
        - technicalData
    VeriffEventDto:
      type: object
      properties:
        id:
          type: string
        attemptId:
          type: string
        feature:
          type: string
          enum:
            - selfid
        code:
          type: number
        action:
          type: string
          enum:
            - submitted
            - started
        vendorData:
          type: string
      required:
        - id
        - attemptId
        - feature
        - code
        - action
        - vendorData
    NexeraChallengeRequestDto:
      type: object
      properties:
        address:
          type: string
        blockchainId: {}
      required:
        - address
        - blockchainId
    InitiateKycRegistrationDto:
      type: object
      properties:
        countryName:
          type: string
        countryCode:
          type: string
        documentCountry:
          type: string
        identityDocumentFrontPage:
          type: string
        identityDocumentBackPage:
          type: string
        identityDocumentType:
          type: string
          enum:
            - passport
            - national_id
            - driver_license
        faceScan:
          type: string
        proofOfResidence:
          type: string
        residenceDocumentType:
          type: string
          enum:
            - gas_bill
            - bank_statement
            - electricity_bill
            - internet_bill
            - rent_agreement
        contactNumber:
          type: string
        contactEmail:
          type: string
          format: email
        vendorData:
          type: object
          properties:
            person:
              type: object
              properties:
                lastName:
                  type: string
                  nullable: true
                firstName:
                  type: string
                  nullable: true
                dateOfBirth:
                  type: string
                  nullable: true
                nationality:
                  type: string
                  nullable: true
                yearOfBirth:
                  type: string
                  nullable: true
                placeOfBirth:
                  type: string
                  nullable: true
              nullable: true
            status:
              type: string
              nullable: true
            vendorData:
              type: string
              nullable: true
            decisionTime:
              type: string
              nullable: true
            acceptanceTime:
              type: string
              nullable: true
            anka:
              type: object
              properties:
                declarations:
                  type: object
                  additionalProperties:
                    type: boolean
                signerAddress:
                  type: string
                walletSignature:
                  type: string
                signedMessage:
                  type: string
                signedFormDocumentId:
                  type: string
                digitalSignatureFileId:
                  type: string
              nullable: true
        vendor:
          type: string
          enum:
            - veriff
            - nexera
            - manual
        submissionCompleted:
          type: boolean
          default: false
        verificationStatus:
          type: string
          enum:
            - pending
            - approved
            - resubmission
            - rejected
        reason:
          type: string
        vendorId:
          type: string
      required:
        - vendorId
    UpdateKycRecordManualDto:
      type: object
      properties:
        countryName:
          type: string
        countryCode:
          type: string
        documentCountry:
          type: string
        identityDocumentFrontPage:
          type: string
        identityDocumentBackPage:
          type: string
        identityDocumentType:
          type: string
          enum:
            - passport
            - national_id
            - driver_license
        faceScan:
          type: string
        proofOfResidence:
          type: string
        residenceDocumentType:
          type: string
          enum:
            - gas_bill
            - bank_statement
            - electricity_bill
            - internet_bill
            - rent_agreement
        contactNumber:
          type: string
        contactEmail:
          type: string
          format: email
        vendorData:
          type: object
          properties:
            person:
              type: object
              properties:
                lastName:
                  type: string
                  nullable: true
                firstName:
                  type: string
                  nullable: true
                dateOfBirth:
                  type: string
                  nullable: true
                nationality:
                  type: string
                  nullable: true
                yearOfBirth:
                  type: string
                  nullable: true
                placeOfBirth:
                  type: string
                  nullable: true
              nullable: true
            status:
              type: string
              nullable: true
            vendorData:
              type: string
              nullable: true
            decisionTime:
              type: string
              nullable: true
            acceptanceTime:
              type: string
              nullable: true
            anka:
              type: object
              properties:
                declarations:
                  type: object
                  additionalProperties:
                    type: boolean
                signerAddress:
                  type: string
                walletSignature:
                  type: string
                signedMessage:
                  type: string
                signedFormDocumentId:
                  type: string
                digitalSignatureFileId:
                  type: string
              nullable: true
        vendor:
          type: string
          enum:
            - veriff
            - nexera
            - manual
        submissionCompleted:
          type: boolean
          default: false
        verificationStatus:
          type: string
          enum:
            - pending
            - approved
            - resubmission
            - rejected
        reason:
          type: string
        id:
          type: string
        decisionTime:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    CreateAccreditationDto:
      type: object
      properties:
        documentIds:
          type: array
          items:
            type: string
        selectedOption:
          type: string
          enum:
            - income
            - assets
            - none
      required:
        - documentIds
        - selectedOption
    DecisionAccreditationDto:
      type: object
      properties:
        message:
          type: string
        decision:
          type: string
          enum:
            - pending
            - approved
            - resubmission
            - rejected
      required:
        - decision
    CreateEvmEoaDto:
      type: object
      properties:
        challenge:
          type: string
        address:
          type: string
        userSignature:
          type: string
        serviceSignature:
          type: string
        publicKey:
          type: string
      required:
        - challenge
        - address
        - userSignature
        - serviceSignature
    PlaidSandboxCredentialsDto:
      type: object
      properties:
        clientId:
          type: string
        secret:
          type: string
      required:
        - clientId
        - secret
    CreateEvmVaultDto:
      type: object
      properties:
        eoa:
          type: string
        address:
          type: string
        chainId:
          type: string
          enum:
            - "137"
            - "80002"
            - "295"
            - "296"
            - "43113"
            - "26218"
            - "99999"
            - "7082400"
            - "8453"
        verificationMethod:
          type: string
          enum:
            - getIssuer
      required:
        - eoa
        - address
        - chainId
        - verificationMethod
    CreateEntityDto:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        metadata:
          type: object
          properties:
            businessName:
              type: string
            businessType:
              type: string
              enum:
                - solePropreitorship
                - llc
                - corporation
                - partnership
            ein:
              type: string
            doingBusinessAs:
              type: string
            phone:
              type: string
            addressLine1:
              type: string
            addressLine2:
              type: string
            city:
              type: string
            state:
              type: string
            postalCode:
              type: string
            website:
              type: string
            kybType:
              type: string
              enum:
                - verified
                - unverified
                - receiveOnly
          required:
            - businessName
            - businessType
            - addressLine1
            - city
            - state
            - postalCode
            - kybType
      required:
        - name
    EntityMetadataDto:
      type: object
      properties:
        businessName:
          type: string
        businessType:
          type: string
          enum:
            - solePropreitorship
            - llc
            - corporation
            - partnership
        ein:
          type: string
        doingBusinessAs:
          type: string
        phone:
          type: string
        addressLine1:
          type: string
        addressLine2:
          type: string
        city:
          type: string
        state:
          type: string
        postalCode:
          type: string
        website:
          type: string
        kybType:
          type: string
          enum:
            - verified
            - unverified
            - receiveOnly
      required:
        - businessName
        - businessType
        - addressLine1
        - city
        - state
        - postalCode
        - kybType
    ManualPaymentMethodDto:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        type:
          type: string
          enum:
            - ach
        instructionsUrl:
          type: string
          format: uri
      required:
        - name
        - type
        - instructionsUrl
    UpdateManualPaymentMethodDto:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        type:
          type: string
          enum:
            - ach
        instructionsUrl:
          type: string
          format: uri
    AddEntityUserDto:
      type: object
      properties:
        targetUserId:
          type: string
        permissions:
          type: array
          items:
            type: string
            enum:
              - "users:add"
              - "users:remove"
              - "permissions:add"
              - "permissions:remove"
              - "metadata:update"
              - "paymentAccounts:add"
              - "paymentAccounts:update"
              - "paymentAccounts:view"
              - "incomingPayments:view"
              - "incomingPayments:process"
              - "outgoingPayments:create"
              - "outgoingPayments:view"
              - "kyb:view"
              - "kyb:add"
              - "kyb:update"
              - "*"
      required:
        - targetUserId
    PermissionDto:
      type: object
      properties:
        permission:
          type: string
          enum:
            - "users:add"
            - "users:remove"
            - "permissions:add"
            - "permissions:remove"
            - "metadata:update"
            - "paymentAccounts:add"
            - "paymentAccounts:update"
            - "paymentAccounts:view"
            - "incomingPayments:view"
            - "incomingPayments:process"
            - "outgoingPayments:create"
            - "outgoingPayments:view"
            - "kyb:view"
            - "kyb:add"
            - "kyb:update"
            - "*"
      required:
        - permission
    LinkAccountDto:
      type: object
      properties:
        plaidItemId:
          type: string
        plaidAccountId:
          type: string
      required:
        - plaidItemId
        - plaidAccountId
    RoutineDto:
      type: object
      properties:
        accountId:
          type: string
        name:
          type: string
        receivingEntityId:
          type: string
        receivingEntityAccountId:
          type: string
        amount:
          type: number
      required:
        - accountId
        - name
        - receivingEntityId
        - receivingEntityAccountId
        - amount
    AstraWebhookDto:
      type: object
      properties:
        webhook_type:
          type: string
          enum:
            - user_intent_updated
            - user_updated
        webhook_id:
          type: string
        user_id:
          type: string
        resource_id:
          type: string
      required:
        - webhook_type
        - webhook_id
        - user_id
        - resource_id
    CreateAddressDto:
      type: object
      properties:
        addressLine1:
          type: string
        addressLine2:
          type: string
        addressLine3:
          type: string
        label:
          type: string
        city:
          type: string
        region:
          type: string
        countryCode:
          type: string
        postalCode:
          type: string
          maxLength: 10
      required:
        - addressLine1
        - addressLine2
        - city
        - region
        - countryCode
        - postalCode
    ManualPaymentDto:
      type: object
      properties:
        manualPaymentMethodId:
          type: string
        documentId:
          type: string
        bankReferenceId:
          type: string
        senderUserId:
          type: string
        senderEntityId:
          type: string
        recipientEntityId:
          type: string
        settlementAmount:
          type: string
        settlementCurrency:
          type: string
          enum:
            - USD
        paymentAmount:
          type: string
        paymentCurrency:
          type: string
          enum:
            - USD
        idempotencyKey:
          type: string
        externalId:
          type: string
        publicKey:
          type: string
      required:
        - senderUserId
        - recipientEntityId
        - settlementAmount
        - settlementCurrency
        - paymentAmount
        - paymentCurrency
        - idempotencyKey
    InitiateKybDto:
      type: object
      properties:
        isQIBCandidate:
          type: boolean
        qibType:
          type: string
          enum:
            - QIB_INSTITUTION
            - QIB_BROKER_DEALER
          x-enumNames:
            - QIB_INSTITUTION
            - QIB_BROKER_DEALER
    QibAttestationDto:
      type: object
      properties:
        qibType:
          type: string
          enum:
            - QIB_INSTITUTION
            - QIB_BROKER_DEALER
          x-enumNames:
            - QIB_INSTITUTION
            - QIB_BROKER_DEALER
        qibRepresentationLetterUrl:
          type: string
          format: uri
        qibAuditedFinancialsUrl:
          type: string
          format: uri
        qibOfficerCertificateUrl:
          type: string
          format: uri
        qibBrokerDealerStatusUrl:
          type: string
          format: uri
        qibAttestationNotes:
          type: string
      required:
        - qibType
        - qibAuditedFinancialsUrl
        - qibOfficerCertificateUrl
    ReviewQibDto:
      type: object
      properties:
        decision:
          type: string
          enum:
            - APPROVED
            - REJECTED
        reason:
          type: string
      required:
        - decision
    UpdateKybDto:
      type: object
      properties:
        countryName:
          type: string
        countryCode:
          type: string
        registrationNumber:
          type: string
        jurisdictionCode:
          type: string
        companyName:
          type: string
        verificationStatus:
          type: string
          enum:
            - pending
            - approved
            - resubmission
            - rejected
        submissionCompleted:
          type: boolean
        kybFormData:
          type: object
          properties:
            identity:
              type: string
              enum:
                - kyc
                - kyb
                - quib
            compliances:
              type: array
              items:
                type: object
                properties:
                  condition:
                    type: object
                    properties:
                      condition:
                        type: string
                      checked:
                        type: boolean
                    required:
                      - condition
                      - checked
                  description:
                    type: string
                required:
                  - condition
            clientInformation:
              type: object
              properties:
                entityName:
                  type: string
                tradeName:
                  type: string
                legalStatus:
                  oneOf:
                    - type: string
                      enum:
                        - sole_proprietorship
                        - llc
                        - partnership
                        - corporation
                        - branch_of_a_foreign_company
                        - free_zone_company
                        - public_joint_stock_company
                        - offshore_ibc
                        - non_profit_organization
                        - government_majority_owned_entity
                        - vasp
                        - other
                    - type: string
                legalStatusOther:
                  type: string
                placeOfIncorporation:
                  type: string
                dateOfIncorporation:
                  type: string
                countryOfOperation:
                  type: string
                licenseNumber:
                  type: string
                licenseIssueDate:
                  type: string
                licenseExpiryDate:
                  type: string
                licenseIssuingAuthority:
                  type: string
                registrationNumber:
                  type: string
                vatRegistrationNumber:
                  type: string
                mainLicensedActivity:
                  type: string
                registeredAddress:
                  type: string
                contactPerson:
                  type: object
                  properties:
                    name:
                      type: string
                    phoneNumber:
                      type: string
                    mobileNumber:
                      type: string
                    designation:
                      type: string
                    email:
                      type: string
                      format: email
                  required:
                    - name
                    - mobileNumber
                    - designation
                    - email
                communicationType:
                  type: string
                  enum:
                    - face_to_face
                    - non_face_to_face
                    - through_intermediary
              required:
                - entityName
                - legalStatus
                - placeOfIncorporation
                - dateOfIncorporation
                - countryOfOperation
                - licenseNumber
                - licenseIssuingAuthority
                - mainLicensedActivity
                - registeredAddress
                - contactPerson
                - communicationType
            ownershipAndControl:
              type: object
              properties:
                owners:
                  type: array
                  items:
                    type: object
                    properties:
                      fullLegalName:
                        type: string
                      nationality:
                        type: string
                      countryOfRegistration:
                        type: string
                      countryOfResidence:
                        type: string
                      shareholdingPercentage:
                        type: number
                        minimum: 0
                        exclusiveMinimum: false
                        maximum: 100
                        exclusiveMaximum: false
                    required:
                      - fullLegalName
                      - nationality
                      - countryOfResidence
                      - shareholdingPercentage
              required:
                - owners
            managementDetails:
              type: object
              properties:
                directorsAndManagement:
                  type: array
                  items:
                    type: object
                    properties:
                      fullName:
                        type: string
                      designation:
                        type: string
                      nationality:
                        type: string
                      countryOfResidence:
                        type: string
                    required:
                      - fullName
                      - designation
                      - nationality
                      - countryOfResidence
              required:
                - directorsAndManagement
            sourceOfFundsAndWealth:
              type: object
              properties:
                sourceOfFunds:
                  type: object
                  properties:
                    types:
                      type: array
                      items:
                        type: string
                        enum:
                          - business_income
                          - return_on_investments
                          - sale_proceeds
                          - mergers_acquisitions
                          - private_investments
                          - shareholder_contributions
                          - debt_financing
                          - inheritance_gift
                          - other
                    otherDescription:
                      type: string
                  required:
                    - types
                sourceOfWealth:
                  type: object
                  properties:
                    types:
                      type: array
                      items:
                        type: string
                        enum:
                          - business_income
                          - return_on_investments
                          - sale_proceeds
                          - mergers_acquisitions
                          - private_investments
                          - shareholder_contributions
                          - debt_financing
                          - inheritance_gift
                          - other
                    otherDescription:
                      type: string
                  required:
                    - types
                countryOfOriginOfFunds:
                  type: string
              required:
                - sourceOfFunds
                - sourceOfWealth
                - countryOfOriginOfFunds
            pepDetails:
              type: object
              properties:
                isPep:
                  type: boolean
                pepInfo:
                  type: object
                  properties:
                    name:
                      type: string
                    positionOrRole:
                      type: string
                    relationshipToEntity:
                      type: string
                    countryOfPublicFunction:
                      type: string
                  required:
                    - name
                    - positionOrRole
                    - relationshipToEntity
                    - countryOfPublicFunction
                  nullable: true
                hasRelatedPep:
                  type: boolean
                relatedPepInfo:
                  type: object
                  properties:
                    name:
                      type: string
                    relationshipToEntity:
                      type: string
                    positionOrRole:
                      type: string
                    countryOfPublicFunction:
                      type: string
                  required:
                    - name
                    - relationshipToEntity
                    - positionOrRole
                    - countryOfPublicFunction
                  nullable: true
              required:
                - isPep
                - hasRelatedPep
            servicesRequested:
              type: object
              properties:
                services:
                  type: array
                  items:
                    type: string
                    enum:
                      - fund_management
                      - investment_advisory
                      - secondment
                      - other
                otherServiceDescription:
                  type: string
                relationshipPurpose:
                  type: string
              required:
                - services
                - relationshipPurpose
            documentsProvided:
              type: object
              properties:
                commercialLicense:
                  type: string
                certificateOfIncorporation:
                  type: string
                incumbencyOrShareRegister:
                  type: string
                moaAoa:
                  type: string
                trustDeed:
                  type: string
                foundationCharter:
                  type: string
                passportsOfUBOs:
                  type: array
                  items:
                    type: string
                proofOfAddress:
                  type: string
                vatCertificate:
                  type: string
                structureChart:
                  type: string
                poaIfApplicable:
                  type: string
                commercialLicenseAndCertificateOfIncorporation:
                  type: array
                  items:
                    type: string
                additionalDocuments:
                  type: array
                  items:
                    type: string
              required:
                - commercialLicense
                - certificateOfIncorporation
                - incumbencyOrShareRegister
                - proofOfAddress
                - structureChart
            clientDeclaration:
              type: object
              properties:
                fullName:
                  type: string
                designation:
                  type: string
                companyName:
                  type: string
                signedAt:
                  type: string
                signatureAccepted:
                  type: boolean
              required:
                - fullName
                - designation
                - companyName
                - signedAt
                - signatureAccepted
        compliances:
          type: array
          items:
            type: object
            properties:
              condition:
                type: object
                properties:
                  condition:
                    type: string
                  checked:
                    type: boolean
                required:
                  - condition
                  - checked
              description:
                type: string
            required:
              - condition
        clientInformation:
          type: object
          properties:
            entityName:
              type: string
            tradeName:
              type: string
            legalStatus:
              oneOf:
                - type: string
                  enum:
                    - sole_proprietorship
                    - llc
                    - partnership
                    - corporation
                    - branch_of_a_foreign_company
                    - free_zone_company
                    - public_joint_stock_company
                    - offshore_ibc
                    - non_profit_organization
                    - government_majority_owned_entity
                    - vasp
                    - other
                - type: string
            legalStatusOther:
              type: string
            placeOfIncorporation:
              type: string
            dateOfIncorporation:
              type: string
            countryOfOperation:
              type: string
            licenseNumber:
              type: string
            licenseIssueDate:
              type: string
            licenseExpiryDate:
              type: string
            licenseIssuingAuthority:
              type: string
            registrationNumber:
              type: string
            vatRegistrationNumber:
              type: string
            mainLicensedActivity:
              type: string
            registeredAddress:
              type: string
            contactPerson:
              type: object
              properties:
                name:
                  type: string
                phoneNumber:
                  type: string
                mobileNumber:
                  type: string
                designation:
                  type: string
                email:
                  type: string
                  format: email
              required:
                - name
                - mobileNumber
                - designation
                - email
            communicationType:
              type: string
              enum:
                - face_to_face
                - non_face_to_face
                - through_intermediary
          required:
            - entityName
            - legalStatus
            - placeOfIncorporation
            - dateOfIncorporation
            - countryOfOperation
            - licenseNumber
            - licenseIssuingAuthority
            - mainLicensedActivity
            - registeredAddress
            - contactPerson
            - communicationType
        ownershipAndControl:
          type: object
          properties:
            owners:
              type: array
              items:
                type: object
                properties:
                  fullLegalName:
                    type: string
                  nationality:
                    type: string
                  countryOfRegistration:
                    type: string
                  countryOfResidence:
                    type: string
                  shareholdingPercentage:
                    type: number
                    minimum: 0
                    exclusiveMinimum: false
                    maximum: 100
                    exclusiveMaximum: false
                required:
                  - fullLegalName
                  - nationality
                  - countryOfResidence
                  - shareholdingPercentage
          required:
            - owners
        managementDetails:
          type: object
          properties:
            directorsAndManagement:
              type: array
              items:
                type: object
                properties:
                  fullName:
                    type: string
                  designation:
                    type: string
                  nationality:
                    type: string
                  countryOfResidence:
                    type: string
                required:
                  - fullName
                  - designation
                  - nationality
                  - countryOfResidence
          required:
            - directorsAndManagement
        sourceOfFundsAndWealth:
          type: object
          properties:
            sourceOfFunds:
              type: object
              properties:
                types:
                  type: array
                  items:
                    type: string
                    enum:
                      - business_income
                      - return_on_investments
                      - sale_proceeds
                      - mergers_acquisitions
                      - private_investments
                      - shareholder_contributions
                      - debt_financing
                      - inheritance_gift
                      - other
                otherDescription:
                  type: string
              required:
                - types
            sourceOfWealth:
              type: object
              properties:
                types:
                  type: array
                  items:
                    type: string
                    enum:
                      - business_income
                      - return_on_investments
                      - sale_proceeds
                      - mergers_acquisitions
                      - private_investments
                      - shareholder_contributions
                      - debt_financing
                      - inheritance_gift
                      - other
                otherDescription:
                  type: string
              required:
                - types
            countryOfOriginOfFunds:
              type: string
          required:
            - sourceOfFunds
            - sourceOfWealth
            - countryOfOriginOfFunds
        pepDetails:
          type: object
          properties:
            isPep:
              type: boolean
            pepInfo:
              type: object
              properties:
                name:
                  type: string
                positionOrRole:
                  type: string
                relationshipToEntity:
                  type: string
                countryOfPublicFunction:
                  type: string
              required:
                - name
                - positionOrRole
                - relationshipToEntity
                - countryOfPublicFunction
              nullable: true
            hasRelatedPep:
              type: boolean
            relatedPepInfo:
              type: object
              properties:
                name:
                  type: string
                relationshipToEntity:
                  type: string
                positionOrRole:
                  type: string
                countryOfPublicFunction:
                  type: string
              required:
                - name
                - relationshipToEntity
                - positionOrRole
                - countryOfPublicFunction
              nullable: true
          required:
            - isPep
            - hasRelatedPep
        servicesRequested:
          type: object
          properties:
            services:
              type: array
              items:
                type: string
                enum:
                  - fund_management
                  - investment_advisory
                  - secondment
                  - other
            otherServiceDescription:
              type: string
            relationshipPurpose:
              type: string
          required:
            - services
            - relationshipPurpose
        documentsProvided:
          type: object
          properties:
            commercialLicense:
              type: string
            certificateOfIncorporation:
              type: string
            incumbencyOrShareRegister:
              type: string
            moaAoa:
              type: string
            trustDeed:
              type: string
            foundationCharter:
              type: string
            passportsOfUBOs:
              type: array
              items:
                type: string
            proofOfAddress:
              type: string
            vatCertificate:
              type: string
            structureChart:
              type: string
            poaIfApplicable:
              type: string
            commercialLicenseAndCertificateOfIncorporation:
              type: array
              items:
                type: string
            additionalDocuments:
              type: array
              items:
                type: string
          required:
            - commercialLicense
            - certificateOfIncorporation
            - incumbencyOrShareRegister
            - proofOfAddress
            - structureChart
        clientDeclaration:
          type: object
          properties:
            fullName:
              type: string
            designation:
              type: string
            companyName:
              type: string
            signedAt:
              type: string
            signatureAccepted:
              type: boolean
          required:
            - fullName
            - designation
            - companyName
            - signedAt
            - signatureAccepted
        isSubmitted:
          type: boolean
    RejectKybDto:
      type: object
      properties:
        reason:
          type: string
          minLength: 1
      required:
        - reason
    InitiateKybRegistrationDto:
      type: object
      properties:
        countryName:
          type: string
        countryCode:
          type: string
        registrationNumber:
          type: string
        jurisdictionCode:
          type: string
        companyName:
          type: string
        kybFormData:
          type: object
          properties:
            kybType:
              type: string
              enum:
                - kyb
                - quib
            compliances:
              type: array
              items:
                type: object
                properties:
                  condition:
                    type: object
                    properties:
                      condition:
                        type: string
                      checked:
                        type: boolean
                    required:
                      - condition
                      - checked
                  description:
                    type: string
                required:
                  - condition
            clientInformation:
              type: object
              properties:
                entityName:
                  type: string
                tradeName:
                  type: string
                legalStatus:
                  oneOf:
                    - type: string
                      enum:
                        - sole_proprietorship
                        - llc
                        - partnership
                        - corporation
                        - branch_of_a_foreign_company
                        - free_zone_company
                        - public_joint_stock_company
                        - offshore_ibc
                        - non_profit_organization
                        - government_majority_owned_entity
                        - vasp
                        - other
                    - type: string
                legalStatusOther:
                  type: string
                placeOfIncorporation:
                  type: string
                dateOfIncorporation:
                  type: string
                countryOfOperation:
                  type: string
                licenseNumber:
                  type: string
                licenseIssueDate:
                  type: string
                licenseExpiryDate:
                  type: string
                licenseIssuingAuthority:
                  type: string
                registrationNumber:
                  type: string
                vatRegistrationNumber:
                  type: string
                mainLicensedActivity:
                  type: string
                registeredAddress:
                  type: string
                contactPerson:
                  type: object
                  properties:
                    name:
                      type: string
                    phoneNumber:
                      type: string
                    mobileNumber:
                      type: string
                    designation:
                      type: string
                    email:
                      type: string
                      format: email
                  required:
                    - name
                    - mobileNumber
                    - designation
                    - email
                communicationType:
                  type: string
                  enum:
                    - face_to_face
                    - non_face_to_face
                    - through_intermediary
              required:
                - entityName
                - legalStatus
                - placeOfIncorporation
                - dateOfIncorporation
                - countryOfOperation
                - licenseNumber
                - licenseIssuingAuthority
                - mainLicensedActivity
                - registeredAddress
                - contactPerson
                - communicationType
            ownershipAndControl:
              type: object
              properties:
                owners:
                  type: array
                  items:
                    type: object
                    properties:
                      fullLegalName:
                        type: string
                      nationality:
                        type: string
                      countryOfRegistration:
                        type: string
                      countryOfResidence:
                        type: string
                      shareholdingPercentage:
                        type: number
                        minimum: 0
                        exclusiveMinimum: false
                        maximum: 100
                        exclusiveMaximum: false
                    required:
                      - fullLegalName
                      - nationality
                      - countryOfResidence
                      - shareholdingPercentage
              required:
                - owners
            managementDetails:
              type: object
              properties:
                directorsAndManagement:
                  type: array
                  items:
                    type: object
                    properties:
                      fullName:
                        type: string
                      designation:
                        type: string
                      nationality:
                        type: string
                      countryOfResidence:
                        type: string
                    required:
                      - fullName
                      - designation
                      - nationality
                      - countryOfResidence
              required:
                - directorsAndManagement
            sourceOfFundsAndWealth:
              type: object
              properties:
                sourceOfFunds:
                  type: object
                  properties:
                    types:
                      type: array
                      items:
                        type: string
                        enum:
                          - business_income
                          - return_on_investments
                          - sale_proceeds
                          - mergers_acquisitions
                          - private_investments
                          - shareholder_contributions
                          - debt_financing
                          - inheritance_gift
                          - other
                    otherDescription:
                      type: string
                  required:
                    - types
                sourceOfWealth:
                  type: object
                  properties:
                    types:
                      type: array
                      items:
                        type: string
                        enum:
                          - business_income
                          - return_on_investments
                          - sale_proceeds
                          - mergers_acquisitions
                          - private_investments
                          - shareholder_contributions
                          - debt_financing
                          - inheritance_gift
                          - other
                    otherDescription:
                      type: string
                  required:
                    - types
                countryOfOriginOfFunds:
                  type: string
              required:
                - sourceOfFunds
                - sourceOfWealth
                - countryOfOriginOfFunds
            pepDetails:
              type: object
              properties:
                isPep:
                  type: boolean
                pepInfo:
                  type: object
                  properties:
                    name:
                      type: string
                    positionOrRole:
                      type: string
                    relationshipToEntity:
                      type: string
                    countryOfPublicFunction:
                      type: string
                  required:
                    - name
                    - positionOrRole
                    - relationshipToEntity
                    - countryOfPublicFunction
                  nullable: true
                hasRelatedPep:
                  type: boolean
                relatedPepInfo:
                  type: object
                  properties:
                    name:
                      type: string
                    relationshipToEntity:
                      type: string
                    positionOrRole:
                      type: string
                    countryOfPublicFunction:
                      type: string
                  required:
                    - name
                    - relationshipToEntity
                    - positionOrRole
                    - countryOfPublicFunction
                  nullable: true
              required:
                - isPep
                - hasRelatedPep
            servicesRequested:
              type: object
              properties:
                services:
                  type: array
                  items:
                    type: string
                    enum:
                      - fund_management
                      - investment_advisory
                      - secondment
                      - other
                otherServiceDescription:
                  type: string
                relationshipPurpose:
                  type: string
              required:
                - services
                - relationshipPurpose
            documentsProvided:
              type: object
              properties:
                commercialLicense:
                  type: string
                certificateOfIncorporation:
                  type: string
                incumbencyOrShareRegister:
                  type: string
                moaAoa:
                  type: string
                trustDeed:
                  type: string
                foundationCharter:
                  type: string
                passportsOfUBOs:
                  type: array
                  items:
                    type: string
                proofOfAddress:
                  type: string
                vatCertificate:
                  type: string
                structureChart:
                  type: string
                poaIfApplicable:
                  type: string
                commercialLicenseAndCertificateOfIncorporation:
                  type: array
                  items:
                    type: string
                additionalDocuments:
                  type: array
                  items:
                    type: string
              required:
                - commercialLicense
                - certificateOfIncorporation
                - incumbencyOrShareRegister
                - proofOfAddress
                - structureChart
            clientDeclaration:
              type: object
              properties:
                fullName:
                  type: string
                designation:
                  type: string
                companyName:
                  type: string
                signedAt:
                  type: string
                signatureAccepted:
                  type: boolean
              required:
                - fullName
                - designation
                - companyName
                - signedAt
                - signatureAccepted
          required:
            - kybType
            - compliances
            - clientInformation
            - ownershipAndControl
            - managementDetails
            - sourceOfFundsAndWealth
            - pepDetails
            - servicesRequested
            - clientDeclaration
        vendorData:
          type: object
          properties:
            verification: {}
            technicalData:
              type: object
              properties:
                ip:
                  type: string
        vendor:
          type: string
          enum:
            - shufti_pro
            - manual
            - compilot
        submissionCompleted:
          type: boolean
          default: false
        verificationStatus:
          type: string
          enum:
            - pending
            - approved
            - resubmission
            - rejected
        reason:
          type: string
        reference:
          type: string
    UpdateKybRecordManualDto:
      type: object
      properties:
        countryName:
          type: string
        countryCode:
          type: string
        registrationNumber:
          type: string
        jurisdictionCode:
          type: string
        companyName:
          type: string
        kybFormData:
          type: object
          properties:
            kybType:
              type: string
              enum:
                - kyb
                - quib
            compliances:
              type: array
              items:
                type: object
                properties:
                  condition:
                    type: object
                    properties:
                      condition:
                        type: string
                      checked:
                        type: boolean
                    required:
                      - condition
                      - checked
                  description:
                    type: string
                required:
                  - condition
            clientInformation:
              type: object
              properties:
                entityName:
                  type: string
                tradeName:
                  type: string
                legalStatus:
                  oneOf:
                    - type: string
                      enum:
                        - sole_proprietorship
                        - llc
                        - partnership
                        - corporation
                        - branch_of_a_foreign_company
                        - free_zone_company
                        - public_joint_stock_company
                        - offshore_ibc
                        - non_profit_organization
                        - government_majority_owned_entity
                        - vasp
                        - other
                    - type: string
                legalStatusOther:
                  type: string
                placeOfIncorporation:
                  type: string
                dateOfIncorporation:
                  type: string
                countryOfOperation:
                  type: string
                licenseNumber:
                  type: string
                licenseIssueDate:
                  type: string
                licenseExpiryDate:
                  type: string
                licenseIssuingAuthority:
                  type: string
                registrationNumber:
                  type: string
                vatRegistrationNumber:
                  type: string
                mainLicensedActivity:
                  type: string
                registeredAddress:
                  type: string
                contactPerson:
                  type: object
                  properties:
                    name:
                      type: string
                    phoneNumber:
                      type: string
                    mobileNumber:
                      type: string
                    designation:
                      type: string
                    email:
                      type: string
                      format: email
                  required:
                    - name
                    - mobileNumber
                    - designation
                    - email
                communicationType:
                  type: string
                  enum:
                    - face_to_face
                    - non_face_to_face
                    - through_intermediary
              required:
                - entityName
                - legalStatus
                - placeOfIncorporation
                - dateOfIncorporation
                - countryOfOperation
                - licenseNumber
                - licenseIssuingAuthority
                - mainLicensedActivity
                - registeredAddress
                - contactPerson
                - communicationType
            ownershipAndControl:
              type: object
              properties:
                owners:
                  type: array
                  items:
                    type: object
                    properties:
                      fullLegalName:
                        type: string
                      nationality:
                        type: string
                      countryOfRegistration:
                        type: string
                      countryOfResidence:
                        type: string
                      shareholdingPercentage:
                        type: number
                        minimum: 0
                        exclusiveMinimum: false
                        maximum: 100
                        exclusiveMaximum: false
                    required:
                      - fullLegalName
                      - nationality
                      - countryOfResidence
                      - shareholdingPercentage
              required:
                - owners
            managementDetails:
              type: object
              properties:
                directorsAndManagement:
                  type: array
                  items:
                    type: object
                    properties:
                      fullName:
                        type: string
                      designation:
                        type: string
                      nationality:
                        type: string
                      countryOfResidence:
                        type: string
                    required:
                      - fullName
                      - designation
                      - nationality
                      - countryOfResidence
              required:
                - directorsAndManagement
            sourceOfFundsAndWealth:
              type: object
              properties:
                sourceOfFunds:
                  type: object
                  properties:
                    types:
                      type: array
                      items:
                        type: string
                        enum:
                          - business_income
                          - return_on_investments
                          - sale_proceeds
                          - mergers_acquisitions
                          - private_investments
                          - shareholder_contributions
                          - debt_financing
                          - inheritance_gift
                          - other
                    otherDescription:
                      type: string
                  required:
                    - types
                sourceOfWealth:
                  type: object
                  properties:
                    types:
                      type: array
                      items:
                        type: string
                        enum:
                          - business_income
                          - return_on_investments
                          - sale_proceeds
                          - mergers_acquisitions
                          - private_investments
                          - shareholder_contributions
                          - debt_financing
                          - inheritance_gift
                          - other
                    otherDescription:
                      type: string
                  required:
                    - types
                countryOfOriginOfFunds:
                  type: string
              required:
                - sourceOfFunds
                - sourceOfWealth
                - countryOfOriginOfFunds
            pepDetails:
              type: object
              properties:
                isPep:
                  type: boolean
                pepInfo:
                  type: object
                  properties:
                    name:
                      type: string
                    positionOrRole:
                      type: string
                    relationshipToEntity:
                      type: string
                    countryOfPublicFunction:
                      type: string
                  required:
                    - name
                    - positionOrRole
                    - relationshipToEntity
                    - countryOfPublicFunction
                  nullable: true
                hasRelatedPep:
                  type: boolean
                relatedPepInfo:
                  type: object
                  properties:
                    name:
                      type: string
                    relationshipToEntity:
                      type: string
                    positionOrRole:
                      type: string
                    countryOfPublicFunction:
                      type: string
                  required:
                    - name
                    - relationshipToEntity
                    - positionOrRole
                    - countryOfPublicFunction
                  nullable: true
              required:
                - isPep
                - hasRelatedPep
            servicesRequested:
              type: object
              properties:
                services:
                  type: array
                  items:
                    type: string
                    enum:
                      - fund_management
                      - investment_advisory
                      - secondment
                      - other
                otherServiceDescription:
                  type: string
                relationshipPurpose:
                  type: string
              required:
                - services
                - relationshipPurpose
            documentsProvided:
              type: object
              properties:
                commercialLicense:
                  type: string
                certificateOfIncorporation:
                  type: string
                incumbencyOrShareRegister:
                  type: string
                moaAoa:
                  type: string
                trustDeed:
                  type: string
                foundationCharter:
                  type: string
                passportsOfUBOs:
                  type: array
                  items:
                    type: string
                proofOfAddress:
                  type: string
                vatCertificate:
                  type: string
                structureChart:
                  type: string
                poaIfApplicable:
                  type: string
                commercialLicenseAndCertificateOfIncorporation:
                  type: array
                  items:
                    type: string
                additionalDocuments:
                  type: array
                  items:
                    type: string
              required:
                - commercialLicense
                - certificateOfIncorporation
                - incumbencyOrShareRegister
                - proofOfAddress
                - structureChart
            clientDeclaration:
              type: object
              properties:
                fullName:
                  type: string
                designation:
                  type: string
                companyName:
                  type: string
                signedAt:
                  type: string
                signatureAccepted:
                  type: boolean
              required:
                - fullName
                - designation
                - companyName
                - signedAt
                - signatureAccepted
          required:
            - kybType
            - compliances
            - clientInformation
            - ownershipAndControl
            - managementDetails
            - sourceOfFundsAndWealth
            - pepDetails
            - servicesRequested
            - clientDeclaration
        vendorData:
          type: object
          properties:
            verification: {}
            technicalData:
              type: object
              properties:
                ip:
                  type: string
        vendor:
          type: string
          enum:
            - shufti_pro
            - manual
            - compilot
        submissionCompleted:
          type: boolean
          default: false
        verificationStatus:
          type: string
          enum:
            - pending
            - approved
            - resubmission
            - rejected
        reason:
          type: string
        id:
          type: string
        decisionTime:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    CreateKybDocumentDto:
      type: object
      properties:
        documentId:
          type: string
          minLength: 1
        documentType:
          type: string
          enum:
            - commercial_license
            - certificate_of_incorporation
            - incumbency_or_share_register
            - moa_aoa
            - trust_deed
            - foundation_charter
            - passports_of_ubos
            - proof_of_address
            - vat_certificate
            - structure_chart
            - poa_if_applicable
            - additional_document
        notes:
          type: string
          maxLength: 512
      required:
        - documentId
        - documentType
    LinkKybDocumentsDto:
      type: object
      properties:
        documents:
          type: array
          minItems: 1
          items:
            type: object
            properties:
              documentId:
                type: string
                minLength: 1
              documentType:
                type: string
                enum:
                  - commercial_license
                  - certificate_of_incorporation
                  - incumbency_or_share_register
                  - moa_aoa
                  - trust_deed
                  - foundation_charter
                  - passports_of_ubos
                  - proof_of_address
                  - vat_certificate
                  - structure_chart
                  - poa_if_applicable
                  - additional_document
              notes:
                type: string
                maxLength: 512
            required:
              - documentId
              - documentType
      required:
        - documents
    UpdateKybDocumentDto:
      type: object
      properties:
        notes:
          type: string
          maxLength: 512
    CreateOnboardingDto:
      type: object
      properties:
        userId:
          type: string
        type:
          type: string
          enum:
            - person
            - entity
        submissionCompleted:
          type: boolean
          default: false
        currentStep:
          type: number
          default: 1
        onboardingData:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              data:
                oneOf:
                  - type: object
                    additionalProperties: {}
                  - type: array
                    items: {}
                default: {}
              step:
                type: number
            required:
              - name
              - step
          default: []
      required:
        - userId
        - type
    UpdateOnboardingDto:
      type: object
      properties:
        userId:
          type: string
        type:
          type: string
          enum:
            - person
            - entity
        submissionCompleted:
          type: boolean
          default: false
        currentStep:
          type: number
          default: 1
        onboardingData:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              data:
                oneOf:
                  - type: object
                    additionalProperties: {}
                  - type: array
                    items: {}
                default: {}
              step:
                type: number
            required:
              - name
              - step
          default: []
    StatusUpdateOnboardingDto:
      type: object
      properties:
        status:
          type: string
          enum:
            - pending
            - completed
            - approved
            - rejected
        rejectionReason:
          type: string
      required:
        - status
    CreateVaultDto:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
      required:
        - name
    CreatePalisadeWalletDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        description:
          type: string
        quorumId:
          type: string
        blockchain:
          type: string
          enum:
            - AVALANCHE
            - XRP_LEDGER
            - HEDERA
            - POLYGON
            - ETHEREUM
            - BNBCHAIN
            - BASE
          x-enumNames:
            - AVALANCHE
            - XRP_LEDGER
            - HEDERA
            - POLYGON
            - ETHEREUM
            - BNBCHAIN
            - BASE
        keystore:
          type: string
          enum:
            - HSM
            - MPC
          x-enumNames:
            - HSM
            - MPC
        recoveryPublicKey:
          type: string
        palisadeWalletType:
          type: string
          enum:
            - SIGNER_WALLET
            - MULTISIG_WALLET
            - COLD_WALLET
          x-enumNames:
            - SIGNER_WALLET
            - MULTISIG_WALLET
            - COLD_WALLET
      required:
        - name
        - blockchain
        - keystore
        - palisadeWalletType
    UpdateWalletDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        description:
          type: string
        accountSet:
          type: boolean
      required:
        - name
    UpdateWalletSettingsDto:
      type: object
      properties:
        enabled:
          type: boolean
          default: false
        rawSigningEnabled:
          type: boolean
          default: false
    TrustSetTransactionDto:
      type: object
      properties:
        limitAmount:
          type: object
          properties:
            value:
              type: string
              minLength: 1
            asset:
              type: string
              minLength: 1
            issuer:
              type: string
          required:
            - value
            - asset
        qualityIn:
          type: integer
        qualityOut:
          type: integer
        flags:
          type: array
          items:
            type: string
            enum:
              - SETF_AUTH
              - SET_NORIPPLE
              - UNSET_NORIPPLE
              - SET_FREEZE
              - UNSET_FREEZE
            x-enumNames:
              - SETF_AUTH
              - SET_NORIPPLE
              - UNSET_NORIPPLE
              - SET_FREEZE
              - UNSET_FREEZE
        sequence:
          type: string
        lastLedgerSequence:
          type: string
      required:
        - limitAmount
    AccountSetDto:
      type: object
      properties:
        setFlag:
          type: string
          enum:
            - ACCOUNT_TXN_ID
            - ALLOW_TRUSTLINE_CLAWBACK
            - AUTHZ_NFTOKEN_MINTER
            - DEFAULT_RIPPLE
            - DEPOSIT_AUTH
            - DISABLE_MASTER
            - DISALLOW_INCOMING_CHECK
            - DISALLOW_INCOMING_PAY_CHAN
            - DISALLOW_INCOMING_TRUSTLINE
            - DISALLOW_XRP
            - GLOBAL_FREEZE
            - NO_FREEZE
            - REQUIRE_AUTH
            - REQUIRE_DEST
          x-enumNames:
            - ACCOUNT_TXN_ID
            - ALLOW_TRUSTLINE_CLAWBACK
            - AUTHZ_NFTOKEN_MINTER
            - DEFAULT_RIPPLE
            - DEPOSIT_AUTH
            - DISABLE_MASTER
            - DISALLOW_INCOMING_CHECK
            - DISALLOW_INCOMING_PAY_CHAN
            - DISALLOW_INCOMING_TRUSTLINE
            - DISALLOW_XRP
            - GLOBAL_FREEZE
            - NO_FREEZE
            - REQUIRE_AUTH
            - REQUIRE_DEST
        clearFlag:
          type: string
          enum:
            - ACCOUNT_TXN_ID
            - ALLOW_TRUSTLINE_CLAWBACK
            - AUTHZ_NFTOKEN_MINTER
            - DEFAULT_RIPPLE
            - DEPOSIT_AUTH
            - DISABLE_MASTER
            - DISALLOW_INCOMING_CHECK
            - DISALLOW_INCOMING_PAY_CHAN
            - DISALLOW_INCOMING_TRUSTLINE
            - DISALLOW_XRP
            - GLOBAL_FREEZE
            - NO_FREEZE
            - REQUIRE_AUTH
            - REQUIRE_DEST
          x-enumNames:
            - ACCOUNT_TXN_ID
            - ALLOW_TRUSTLINE_CLAWBACK
            - AUTHZ_NFTOKEN_MINTER
            - DEFAULT_RIPPLE
            - DEPOSIT_AUTH
            - DISABLE_MASTER
            - DISALLOW_INCOMING_CHECK
            - DISALLOW_INCOMING_PAY_CHAN
            - DISALLOW_INCOMING_TRUSTLINE
            - DISALLOW_XRP
            - GLOBAL_FREEZE
            - NO_FREEZE
            - REQUIRE_AUTH
            - REQUIRE_DEST
        domain:
          type: string
          pattern: "^[0-9a-fA-F]+$"
          maxLength: 256
        emailHash:
          type: string
          pattern: "^[0-9a-fA-F]{32}$"
        messageKey:
          type: string
          pattern: "^(02|03|ED)[0-9a-fA-F]{64}$"
        nfTokenMinter:
          type: string
        transferRate:
          type: string
          pattern: "^(0|[1-2]?[0-9]{9})$"
        tickSize:
          type: string
          pattern: "^[0]$|^[3-9]$|^1[0-5]$"
        sequence:
          type: string
        lastLedgerSequence:
          type: string
    TransferAssetDto:
      type: object
      properties:
        destinationAddress:
          type: string
          minLength: 1
        contract:
          type: string
        symbol:
          type: string
          minLength: 1
        qty:
          type: string
          minLength: 1
        sequence:
          type: string
      required:
        - destinationAddress
        - symbol
        - qty
    SetSignerListDto:
      type: object
      properties:
        signerQuorum:
          type: string
          minLength: 1
        signerEntries:
          type: array
          items:
            type: object
            properties:
              account:
                type: string
                minLength: 1
              signerWeight:
                type: string
                minLength: 1
            required:
              - account
              - signerWeight
        sequence:
          type: string
        lastLedgerSequence:
          type: string
      required:
        - signerQuorum
        - signerEntries
    UpdatePolicyDto:
      type: object
      properties:
        limitQty:
          type: string
        limitType:
          type: string
        symbol:
          type: string
        contract:
          type: string
        duration:
          type: string
        matchers:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              value:
                type: string
                minLength: 1
            required:
              - type
              - value
      required:
        - limitQty
        - limitType
        - symbol
    CreateAddressAllowListDto:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        address:
          type: string
      required:
        - name
        - address
    CreatePalisadeStatusDto:
      type: object
      properties:
        address:
          type: string
        addressWalletType:
          type: string
          enum:
            - SIGNER_WALLET
            - MULTISIG_WALLET
            - COLD_WALLET
          x-enumNames:
            - SIGNER_WALLET
            - MULTISIG_WALLET
            - COLD_WALLET
        enableSigning:
          type: boolean
        clawBack:
          type: boolean
        disableMasterKey:
          type: boolean
        addWalletLimitPolicy:
          type: boolean
        addAccountSet:
          type: boolean
        createMultisig:
          type: boolean
      required:
        - address
        - addressWalletType
    UpdatePalisadeStatusDto:
      type: object
      properties: {}
    CreateIntentDto:
      type: object
      properties:
        senderUserId:
          type: string
        senderEntityId:
          type: string
        recipientEntityId:
          type: string
        settlementAmount:
          type: string
        settlementCurrency:
          type: string
          enum:
            - USD
        paymentAmount:
          type: string
        paymentCurrency:
          type: string
          enum:
            - USD
        idempotencyKey:
          type: string
        externalId:
          type: string
        publicKey:
          type: string
      required:
        - senderUserId
        - recipientEntityId
        - settlementAmount
        - settlementCurrency
        - paymentAmount
        - paymentCurrency
        - idempotencyKey
    PrivateStateGetDTO:
      type: object
      properties:
        userId:
          type: string
        key:
          type: string
        value: {}
        contractAddress:
          type: string
      required:
        - userId
        - key
        - value
        - contractAddress
    PrivateStateCreateDTO:
      type: object
      properties:
        key:
          type: string
        value: {}
        contractAddress:
          type: string
      required:
        - key
        - value
        - contractAddress
    InvestorCommitmentCreateDTO:
      type: object
      properties:
        recipientPublicKey:
          type: string
          minLength: 1
        contractAddress:
          type: string
          minLength: 1
        commitment:
          type: string
          minLength: 1
        outputValue:
          type: string
          minLength: 1
        outputBlinding:
          type: string
          minLength: 1
        tokenId:
          type: string
        tokenName:
          type: string
        tokenSymbol:
          type: string
      required:
        - recipientPublicKey
        - contractAddress
        - commitment
        - outputValue
        - outputBlinding
    CreateBankAccountDTO:
      type: object
      properties:
        recipientFullName:
          type: string
        routingNumberEquivalent:
          type: string
        bankAccountNumber:
          type: string
        bankName:
          type: string
        bankAddress:
          type: object
          properties:
            streetAddress:
              type: string
            streetAddressLine2:
              type: string
            city:
              type: string
            region:
              type: string
            postalCode:
              type: string
            country:
              type: string
          required:
            - streetAddress
            - city
            - region
            - postalCode
            - country
        swiftBicCode:
          type: string
        default:
          type: boolean
          default: true
      required:
        - recipientFullName
        - routingNumberEquivalent
        - bankAccountNumber
        - bankName
        - bankAddress
        - swiftBicCode
    UpdateBankAccountDTO:
      type: object
      properties: {}
    ProvisionAddressDto:
      type: object
      properties:
        provider:
          type: string
          enum:
            - anchorage
          default: anchorage
    CreateWithdrawalDto:
      type: object
      properties:
        amount:
          type: string
          minLength: 1
        assetType:
          type: string
          minLength: 1
        source:
          type: object
          properties:
            id:
              type: string
              minLength: 1
            type:
              type: string
              enum:
                - WALLET
          required:
            - id
            - type
        destination:
          type: object
          properties:
            id:
              type: string
              minLength: 1
            type:
              type: string
              enum:
                - WALLET
                - ADDRESS
                - STANDING_INSTRUCTION
                - TRUSTED_DESTINATION
          required:
            - id
            - type
        description:
          type: string
        provider:
          type: string
          enum:
            - anchorage
          default: anchorage
        withdrawalAmlQuestionnaire:
          type: object
          properties:
            purpose:
              type: string
              enum:
                - TRADING_SETTLEMENT
                - LENDING
                - INVESTMENT
                - EXPENSES
                - FEE_PAYMENT
                - GRANT_PAYMENT
                - PRIZE_AWARD
                - GIFT
                - REIMBURSEMENT
                - REBALANCE
                - INTRA_COMPANY
                - REWARDS_DISTRIBUTION
            destinationType:
              type: string
              enum:
                - FINANCIAL_INSTITUTION
                - SELFHOSTED_WALLET
            recipientType:
              type: string
              enum:
                - DESTINATION_INSTITUTION
                - MY_ORGANIZATION
                - PERSON
                - ENTITY
            selfhostedDescription:
              type: string
            institutionName:
              type: string
            institutionCountry:
              type: string
            originatorType:
              type: string
              enum:
                - MY_ORGANIZATION
                - MY_CLIENT
            originatorName:
              type: string
            originatorCountry:
              type: string
            originatorStreetAddress:
              type: string
            originatorCity:
              type: string
            originatorStateProvince:
              type: string
            originatorPostalCode:
              type: string
            recipientFirstName:
              type: string
            recipientLastName:
              type: string
            recipientFullName:
              type: string
            recipientCountry:
              type: string
            recipientStreetAddress:
              type: string
            recipientCity:
              type: string
            recipientStateProvince:
              type: string
            recipientPostalCode:
              type: string
          required:
            - purpose
            - destinationType
            - recipientType
      required:
        - amount
        - assetType
        - source
        - destination
        - withdrawalAmlQuestionnaire
    CreateTransferDto:
      type: object
      properties:
        amount:
          type: string
          minLength: 1
        assetType:
          type: string
          minLength: 1
        sourceId:
          type: string
          minLength: 1
        sourceType:
          type: string
          enum:
            - WALLET
            - ADDRESS
            - STANDING_INSTRUCTION
            - TRUSTED_DESTINATION
          default: WALLET
        destinationId:
          type: string
          minLength: 1
        destinationType:
          type: string
          enum:
            - WALLET
            - ADDRESS
            - STANDING_INSTRUCTION
            - TRUSTED_DESTINATION
          default: ADDRESS
        deductFeeFromAmountIfSameType:
          type: boolean
          default: false
        idempotentId:
          type: string
          maxLength: 128
        transferMemo:
          type: string
        provider:
          type: string
          enum:
            - anchorage
          default: anchorage
        transferAmlQuestionnaire:
          type: object
          properties:
            destinationType:
              type: string
              enum:
                - FINANCIAL_INSTITUTION
                - UNHOSTED_WALLET
                - SELFHOSTED_WALLET
            recipientType:
              type: string
              enum:
                - DESTINATION_INSTITUTION
                - MY_ORGANIZATION
                - PERSON
                - ENTITY
            purpose:
              type: string
              enum:
                - TRADING_SETTLEMENT
                - LENDING
                - INVESTMENT
                - EXPENSES
                - FEE_PAYMENT
                - GRANT_PAYMENT
                - PRIZE_AWARD
                - GIFT
                - REIMBURSEMENT
                - REBALANCE
                - INTRA_COMPANY
                - REWARDS_DISTRIBUTION
            originatorType:
              type: string
              enum:
                - MY_ORGANIZATION
                - MY_CLIENT
            selfhostedDescription:
              type: string
            institutionName:
              type: string
            institutionCountry:
              type: string
            originatorName:
              type: string
            originatorStreetAddress:
              type: string
            originatorCity:
              type: string
            originatorStateProvince:
              type: string
            originatorPostalCode:
              type: string
            originatorCountry:
              type: string
            recipientFirstName:
              type: string
            recipientLastName:
              type: string
            recipientFullName:
              type: string
            recipientCountry:
              type: string
            recipientStreetAddress:
              type: string
            recipientCity:
              type: string
            recipientStateProvince:
              type: string
            recipientPostalCode:
              type: string
          required:
            - purpose
            - originatorType
      required:
        - amount
        - assetType
        - sourceId
        - destinationId
    AttributeDepositDto:
      type: object
      properties:
        originatorName:
          type: string
          minLength: 1
        originatorCountry:
          type: string
          pattern: "^[A-Z]{2}$"
        sourceWalletType:
          type: string
          enum:
            - SELF_HOSTED
            - CUSTODIAL
        notes:
          type: string
        provider:
          type: string
          enum:
            - anchorage
          default: anchorage
      required:
        - originatorName
        - originatorCountry
        - sourceWalletType
security:
  - bearer: []
x-tagGroups:
  - name: "Identity & Compliance"
    tags:
      - KYC
      - KYB
      - Accreditations
      - Onboarding
  - name: "Users & Auth"
    tags:
      - Users
      - Auth
      - Entities
  - name: "Wallets & Custody"
    tags:
      - Wallets (EVM)
      - Non-Custodian XRPL
      - Wallets (XRPL)
      - Custody
  - name: Documents
    tags:
      - Documents
  - name: "Payments & Banking"
    tags:
      - Payments
      - Bank Accounts
  - name: Platform
    tags:
      - Platform
      - Health Check
      - Bulk Registration
