openapi: 3.1.0
info:
  title: Axiym Client Account API
  version: 0.3.0
  description: |-
    Use the Client Account API to manage Axiym accounts owned by clients onboarded through your partnership: view balances and statements, register external bank accounts and wallets, deposit funds, convert currencies, and make withdrawals. The access token identifies your partnership; `clientId` selects the client whose API resources you operate.

    Subscribe to webhooks to receive notifications about client availability, account movements, and changes to deposits, conversions, withdrawals, and registered external accounts. Subscriptions belong to your partnership. Events about client resources include `clientId` to identify the relevant client.
servers:
  - url: https://partner-api.sandbox.axiym.io/api/v1
    description: Sandbox
  - url: https://partner-api.axiym.io/api/v1
    description: Production
security:
  - Default: []
tags:
  - name: Auth
    description: OAuth 2.0 client credentials authentication for the partnership.
  - name: Onboarding
    description: Client KYB onboarding applications and their review status.
  - name: Clients
    description: Client records associated with your partnership. The list includes clients that are onboarding, active, or disabled; only active clients can use Client Account API operations.
  - name: Accounts
    description: Axiym accounts and balances owned by the represented client.
  - name: Address Book
    description: "External bank accounts and wallets registered in the selected client's address book for whitelisting as deposit sources and withdrawal destinations."
  - name: Deposits
    description: Incoming funds credited to the represented client’s Axiym accounts.
  - name: Conversions
    description: Currency conversions between the represented client’s permitted Axiym accounts.
  - name: Withdrawals
    description: Outgoing funds from the represented client’s Axiym accounts.
  - name: Webhook Subscriptions
    description: Partnership-owned webhook subscriptions and signing keys.
paths:
  /oauth/token:
    post:
      summary: Get access token
      description: Creates an OAuth 2.0 access token using your client credentials. Request the `ACCOUNT` scope and send the returned token as a bearer token on subsequent Client Account API requests.
      deprecated: false
      tags:
        - Auth
      parameters:
        - $ref: "#/components/parameters/RequestId"
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                client_id:
                  description: "OAuth client identifier issued to your partnership."
                  type: string
                  examples:
                    - eb81336d-378a-4ab8-8c0e-a2f39ac0e87a
                  example: eb81336d-378a-4ab8-8c0e-a2f39ac0e87a
                client_secret:
                  description: "Secret associated with your OAuth client credentials."
                  type: string
                  examples:
                    - d5a9df2f93dba5f3def1e1d7585f476f054fe955a02e6b152f3145adce49c6ffc94be6ea7a2d7385f111f17541c1fe0239e8902b33e41fed7610098995081d3e59b2fe7ae2877dcbcdcd04c14cdfa298e85a079066d0b1e0eaaa978110ba300c7e8341b68c0d9a8deb03122f4504e6317b53b473c5917e4ae073422241f59120
                  example: d5a9df2f93dba5f3def1e1d7585f476f054fe955a02e6b152f3145adce49c6ffc94be6ea7a2d7385f111f17541c1fe0239e8902b33e41fed7610098995081d3e59b2fe7ae2877dcbcdcd04c14cdfa298e85a079066d0b1e0eaaa978110ba300c7e8341b68c0d9a8deb03122f4504e6317b53b473c5917e4ae073422241f59120
                grant_type:
                  description: "OAuth grant type. Send `client_credentials`."
                  type: string
                  examples:
                    - client_credentials
                  example: client_credentials
                scope:
                  description: "Requested access scope. Send `ACCOUNT` for the Client Account API."
                  type: string
                  enum:
                    - ACCOUNT
                  examples:
                    - ACCOUNT
                  example: ACCOUNT
            example:
              client_id: eb81336d-378a-4ab8-8c0e-a2f39ac0e87a
              client_secret: d5a9df2f93dba5f3def1e1d7585f476f054fe955a02e6b152f3145adce49c6ffc94be6ea7a2d7385f111f17541c1fe0239e8902b33e41fed7610098995081d3e59b2fe7ae2877dcbcdcd04c14cdfa298e85a079066d0b1e0eaaa978110ba300c7e8341b68c0d9a8deb03122f4504e6317b53b473c5917e4ae073422241f59120
              grant_type: client_credentials
              scope: ACCOUNT
        required: true
      responses:
        "201":
          description: "Access token created."
          content:
            application/json:
              schema:
                type: object
                properties:
                  token_type:
                    description: "Token type to use in the Authorization header."
                    type: string
                  expires_in:
                    description: "Access token lifetime in seconds."
                    type: integer
                  access_token:
                    description: "Access token to send as a bearer token on authenticated Client Account API requests."
                    type: string
                  scope:
                    description: "Access scope granted to the token."
                    type: string
                required:
                  - token_type
                  - expires_in
                  - access_token
                  - scope
          headers: {}
        "400":
          $ref: "#/components/responses/BadRequest"
          description: "The request is malformed or cannot be processed as supplied."
        "401":
          $ref: "#/components/responses/Unauthorized"
          description: "Authentication is missing or invalid."
        "500":
          $ref: "#/components/responses/InternalError"
          description: "An unexpected server error prevented the request from completing."
      security: []
  /onboardings:
    post:
      tags:
        - Onboarding
      summary: Start client onboarding
      operationId: startOnboarding
      description: "Creates and immediately submits a client onboarding case for compliance review. Document intake is handled through Axiym's compliance KYB flow. Track the case with `GET /onboardings/{clientId}`."
      parameters:
        - $ref: "#/components/parameters/RequestId"
        - $ref: "#/components/parameters/IdempotencyKey"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/OnboardingRequest"
            examples:
              Company:
                summary: A represented business client
                value:
                  legalEntityName: Acme Corporation Pte. Ltd.
                  incorporationDate: "2020-01-15"
                  registrationDate: "2024-09-01"
                  legalAddress:
                    address: 10 Anson Road
                    addressExtended: "#12-01"
                    city: Singapore
                    postalCode: "079903"
                    country: SG
                  currency: USD
                  paymentRails: ZENUS_BANK
                  partnerClientId: acme-sg-001
      responses:
        "201":
          description: Onboarding case created and submitted for KYB review.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OnboardingCase"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
  /onboardings/{clientId}:
    get:
      tags:
        - Onboarding
      summary: Get onboarding status
      operationId: getOnboardingStatus
      description: Returns the current status of one client onboarding case. When the case is `APPROVED`, use the returned `clientId` in Client Account API client paths.
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/RequestId"
      responses:
        "200":
          description: Current onboarding case.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OnboardingCase"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalError"
  /clients:
    get:
      tags:
        - Clients
      summary: List clients
      operationId: listClients
      description: Returns client records associated with your partnership, including clients that are `ONBOARDING`, `ACTIVE`, or `DISABLED`. Use a returned `clientId` in Client Account API resource paths only when its status is `ACTIVE`. Retrieve rejected onboarding cases through `GET /onboardings/{clientId}`.
      parameters:
        - $ref: "#/components/parameters/RequestId"
        - $ref: "#/components/parameters/First"
        - $ref: "#/components/parameters/After"
        - name: searchQuery
          in: query
          description: Filter clients by name, Axiym client code, or your `partnerClientId`.
          required: false
          schema:
            type: string
            examples:
              - Acme
      responses:
        "200":
          description: A page of client records in onboarding or operational states.
          content:
            application/json:
              schema:
                type: object
                required:
                  - nodes
                  - pageInfo
                properties:
                  nodes:
                    type: array
                    description: Clients in this page.
                    items:
                      $ref: "#/components/schemas/Client"
                  pageInfo:
                    $ref: "#/components/schemas/PageInfo"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
  /clients/{clientId}:
    get:
      tags:
        - Clients
      summary: Get client
      operationId: getClient
      description: Returns the profile and current Axiym status of one onboarded client.
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/RequestId"
      responses:
        "200":
          description: The requested client.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Client"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
  /clients/{clientId}/accounts:
    get:
      tags:
        - Accounts
      summary: List accounts
      operationId: listAccounts
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/RequestId"
        - name: first
          in: query
          description: Maximum number of items to return (page size).
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
            examples:
              - 10
        - name: after
          in: query
          description: Cursor for the next page, from the previous response's pageInfo.endCursor.
          required: false
          schema:
            type: string
            examples:
              - eyJvZmZzZXQiOjI1fQ==
        - name: currency
          in: query
          schema:
            $ref: "#/components/schemas/Currency"
            examples:
              - USD
          description: Filter by currency.
        - name: status
          in: query
          schema:
            $ref: "#/components/schemas/AccountStatus"
            examples:
              - ACTIVE
          description: Filter by status.
      responses:
        "200":
          description: Accounts.
          content:
            application/json:
              schema:
                type: object
                required:
                  - nodes
                  - pageInfo
                properties:
                  nodes:
                    type: array
                    items:
                      $ref: "#/components/schemas/Account"
                  pageInfo:
                    $ref: "#/components/schemas/PageInfo"
              examples:
                Accounts:
                  summary: Bank and wallet accounts
                  value:
                    nodes:
                      - accountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                        currency: USD
                        paymentRails: ZENUS_BANK
                        balance: "48250.00"
                        status: ACTIVE
                      - accountId: 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
                        currency: USDT
                        paymentRails: TRON
                        balance: "12500.00"
                        status: ACTIVE
                    pageInfo:
                      hasNextPage: false
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
      description: |-
        Returns the Axiym accounts belonging to the selected client that your partnership may access. Each account holds a balance in one currency on one payment rail.

        Use the optional filters to narrow the results by currency or account status.
  /clients/{clientId}/accounts/{accountId}:
    get:
      tags:
        - Accounts
      summary: Get account
      description: Returns the current balance, currency, payment rail, and status of one Axiym account belonging to the selected client.
      operationId: getAccount
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/RequestId"
      responses:
        "200":
          description: Account.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Account"
              examples:
                Bank account:
                  summary: Bank account
                  value:
                    accountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                    currency: USD
                    paymentRails: ZENUS_BANK
                    balance: "48250.00"
                    status: ACTIVE
                Wallet account:
                  summary: Wallet account
                  value:
                    accountId: 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
                    currency: USDT
                    paymentRails: TRON
                    balance: "12500.00"
                    status: ACTIVE
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
  /clients/{clientId}/accounts/{accountId}/statement:
    get:
      tags:
        - Accounts
      summary: Get account statement
      operationId: getAccountStatement
      description: |-
        Returns the posted credits and debits for one client account, including its opening balance, closing balance, and movement totals.

        Use the statement to reconcile the client's deposits, conversions, withdrawals, and other ledger movements. The balances follow this equation:

        `openingBalance + totalCredited - totalDebited = closingBalance`

        If `from` and `to` are omitted, the statement covers the account's full history.
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/RequestId"
        - $ref: "#/components/parameters/First"
        - $ref: "#/components/parameters/After"
        - name: from
          in: query
          required: false
          description: First calendar day of the period (UTC), inclusive. The period bounds apply to the posting time of the movement.
          schema:
            type: string
            format: date
            examples:
              - 2026-06-01
        - name: to
          in: query
          required: false
          description: "Last calendar day of the period (UTC), inclusive. Adjacent statements chain without gaps: June `to=2026-06-30` is followed by July `from=2026-07-01`."
          schema:
            type: string
            format: date
            examples:
              - 2026-06-30
        - name: type
          in: query
          required: false
          description: Filter by credit or debit direction.
          schema:
            $ref: "#/components/schemas/StatementEntryType"
            examples:
              - DEBIT
      responses:
        "200":
          description: Account statement for the period.
          content:
            application/json:
              schema:
                type: object
                required:
                  - openingBalance
                  - closingBalance
                  - totalCredited
                  - totalDebited
                  - nodes
                  - pageInfo
                properties:
                  openingBalance:
                    allOf:
                      - $ref: "#/components/schemas/Decimal"
                    description: Balance as of the start of the period (`from`).
                    examples:
                      - "47750.00"
                  closingBalance:
                    allOf:
                      - $ref: "#/components/schemas/Decimal"
                    description: Balance as of the end of the period (`to`).
                    examples:
                      - "48250.00"
                  totalCredited:
                    allOf:
                      - $ref: "#/components/schemas/Decimal"
                    description: Sum of credits within the period.
                    examples:
                      - "1005.00"
                  totalDebited:
                    allOf:
                      - $ref: "#/components/schemas/Decimal"
                    description: Sum of debits within the period.
                    examples:
                      - "505.00"
                  nodes:
                    type: array
                    items:
                      $ref: "#/components/schemas/StatementEntry"
                  pageInfo:
                    $ref: "#/components/schemas/PageInfo"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
  /clients/{clientId}/accounts/{accountId}/deposit-instructions:
    get:
      tags:
        - Deposits
      summary: Get deposit instructions
      operationId: getDepositInstructions
      description: |-
        Returns the receiving details needed to deposit funds into an Axiym account belonging to the selected client.

        **Before sending funds**

        Send funds only from a whitelisted external bank account or wallet with status `ACTIVE` in the selected client's address book. Registration is followed by due diligence and compliance checks before activation.

        **Instruction type**

        Returns one instruction per transfer scheme the account accepts (`scheme`). Use the instruction for the scheme you send with.

        - Bank instructions contain the beneficiary, the account number and the receiving bank for the scheme, an intermediary bank when the transfer passes through one, and, when present, an account-specific `reference`. Include the reference on the transfer.
        - Wallet instructions (`BLOCKCHAIN`) contain the receiving beneficiary name, the wallet address, and the blockchain network to use.
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/RequestId"
      responses:
        "200":
          description: Deposit instructions for the account, one per transfer scheme.
          content:
            application/json:
              schema:
                type: object
                required:
                  - nodes
                properties:
                  nodes:
                    type: array
                    items:
                      $ref: "#/components/schemas/DepositInstruction"
              examples:
                Bank transfer:
                  summary: Bank account with SWIFT and Fedwire
                  value:
                    nodes:
                      - scheme: SWIFT
                        beneficiaryName: Axi Labs AG
                        beneficiaryAddress:
                          streetName: Baarerstrasse
                          buildingNumber: "12"
                          city: Zug
                          postalCode: "6300"
                          region: Zug
                          country: CH
                        accountNumber: "600000000"
                        swiftBic: ZEITPRSJXXX
                        bankName: Zenus Bank International Inc
                        bankAddress:
                          streetName: Zenus Tower, 19th Floor, 252 Ponce de Leon
                          city: San Juan
                          postalCode: "00918"
                          country: PR
                        intermediaryBank:
                          swiftBic: CHASUS33XXX
                          clearingCode: "021000021"
                          clearingSystemCode: USABA
                          bankName: JP Morgan Chase NA
                          bankAddress:
                            city: New York
                            region: NY
                            country: US
                        reference: RF11 0004 4901 01
                      - scheme: FEDWIRE
                        beneficiaryName: Axi Labs AG
                        beneficiaryAddress:
                          streetName: Baarerstrasse
                          buildingNumber: "12"
                          city: Zug
                          postalCode: "6300"
                          region: Zug
                          country: CH
                        accountNumber: "30000000000000"
                        clearingCode: "021000021"
                        clearingSystemCode: USABA
                        bankName: JP Morgan Chase NA
                        bankAddress:
                          city: New York
                          region: NY
                          country: US
                        reference: RF11 0004 4901 01
                Book transfer:
                  summary: Book transfer
                  value:
                    nodes:
                      - scheme: BOOK
                        beneficiaryName: Axi Labs AG
                        accountNumber: A00123045
                Wallet transfer:
                  summary: Wallet transfer
                  value:
                    nodes:
                      - scheme: BLOCKCHAIN
                        beneficiaryName: Axi Labs AG
                        walletAddress: TWd2yzw5yFc5W8Tq6CuNZcVJgfmLnBcT4Q
                        network: TRON
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
  /clients/{clientId}/deposits:
    get:
      tags:
        - Deposits
      summary: List deposits
      operationId: listDeposits
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/RequestId"
        - $ref: "#/components/parameters/First"
        - $ref: "#/components/parameters/After"
        - name: accountId
          in: query
          description: Filter by account.
          schema:
            type: string
            format: uuid
            examples:
              - 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
        - name: status
          in: query
          schema:
            $ref: "#/components/schemas/DepositStatus"
            examples:
              - COMPLETED
          description: Filter by status.
      responses:
        "200":
          description: Page of deposits.
          content:
            application/json:
              schema:
                type: object
                required:
                  - nodes
                  - pageInfo
                properties:
                  nodes:
                    type: array
                    items:
                      $ref: "#/components/schemas/Deposit"
                  pageInfo:
                    $ref: "#/components/schemas/PageInfo"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
      description: |-
        Returns incoming payments detected for the selected client's Axiym accounts. Deposits are accepted only from whitelisted external accounts with status `ACTIVE` in the selected client's address book.

        Use the optional filters to narrow the results by account or deposit status.
  /clients/{clientId}/deposits/{depositId}:
    get:
      tags:
        - Deposits
      summary: Get deposit
      description: "Returns one incoming payment for the selected client, including its current status, receiving Axiym account, amount, currency, and available bank or blockchain details. A deposit is credited to the account when its status is `COMPLETED`."
      operationId: getDeposit
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/DepositId"
        - $ref: "#/components/parameters/RequestId"
      responses:
        "200":
          description: Deposit.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Deposit"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
  /clients/{clientId}/conversion-pairs:
    get:
      tags:
        - Conversions
      summary: List conversion pairs
      operationId: listConversionPairs
      description: |-
        Returns the conversion directions available to the selected client. Each pair defines the sell currency, buy currency, payment rails, and minimum sell amount.

        Use `pairId` when creating a conversion for that client. The reverse direction requires a separate pair.
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/RequestId"
      responses:
        "200":
          description: Conversion pairs.
          content:
            application/json:
              schema:
                type: object
                required:
                  - nodes
                properties:
                  nodes:
                    type: array
                    items:
                      $ref: "#/components/schemas/ConversionPair"
              examples:
                Conversion pairs:
                  summary: Both directions for a USD/USDT pair
                  value:
                    nodes:
                      - pairId: 7c9e1a3b-5d2f-4e8a-9b0c-6d4f2a8e1c3b
                        pair: USD-USDT
                        sell:
                          currency: USD
                          paymentRails: ZENUS_BANK
                        buy:
                          currency: USDT
                          paymentRails: TRON
                        minAmount: "100.00"
                      - pairId: 2b8d0c4e-6f1a-4d3c-8e5b-9a7c3f0d2e4a
                        pair: USDT-USD
                        sell:
                          currency: USDT
                          paymentRails: TRON
                        buy:
                          currency: USD
                          paymentRails: ZENUS_BANK
                        minAmount: "100.00"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
  /clients/{clientId}/conversions:
    get:
      tags:
        - Conversions
      summary: List conversions
      operationId: listConversions
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/RequestId"
        - $ref: "#/components/parameters/First"
        - $ref: "#/components/parameters/After"
        - name: status
          in: query
          schema:
            $ref: "#/components/schemas/ConversionStatus"
            examples:
              - ACTIVE
          description: Filter by status.
        - name: externalReference
          in: query
          description: Filter by your external reference.
          schema:
            type: string
            examples:
              - conv-2026-0714-01
      responses:
        "200":
          description: Page of conversions.
          content:
            application/json:
              schema:
                type: object
                required:
                  - nodes
                  - pageInfo
                properties:
                  nodes:
                    type: array
                    items:
                      $ref: "#/components/schemas/Conversion"
                  pageInfo:
                    $ref: "#/components/schemas/PageInfo"
              examples:
                Conversions:
                  summary: One completed and one executing conversion
                  value:
                    nodes:
                      - conversionId: a3f5d7c9-1e2b-4c6a-8d9f-0b1a2c3d4e5f
                        status: COMPLETED
                        sellAccount:
                          accountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                          currency: USD
                          paymentRails: ZENUS_BANK
                        sellAmount:
                          amount: "10000.00"
                          currency: USD
                        buyAccount:
                          accountId: 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
                          currency: USDT
                          paymentRails: TRON
                        buyAmount:
                          amount: "9985.00"
                          currency: USDT
                        rate: "1.00"
                        fee:
                          amount: "15.00"
                          currency: USD
                        externalReference: conv-2026-0714-01
                        createdAt: 2026-07-14T14:00:11Z
                        completedAt: 2026-07-14T14:05:39Z
                      - conversionId: b8e6c2a4-5d1f-4e9b-a7c3-6f2d8b0a4e1c
                        status: ACTIVE
                        sellAccount:
                          accountId: 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
                          currency: USDT
                          paymentRails: TRON
                        sellAmount:
                          amount: "5000.00"
                          currency: USDT
                        buyAccount:
                          accountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                          currency: USD
                          paymentRails: ZENUS_BANK
                        buyAmount:
                          amount: "4992.50"
                          currency: USD
                        rate: "1.00"
                        fee:
                          amount: "7.50"
                          currency: USD
                        externalReference: conv-2026-0714-02
                        createdAt: 2026-07-14T14:05:44Z
                    pageInfo:
                      hasNextPage: false
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
      description: |-
        Returns confirmed conversions created for the selected client. Filter the results by status or `externalReference`.
        An unconfirmed `PENDING` conversion appears only in the create response and is not included in this list.
    post:
      tags:
        - Conversions
      summary: Create conversion
      operationId: createConversion
      description: |-
        Creates a conversion quote for the selected client. Provide a permitted `pairId` and the amount to sell. The pair determines the client's sell and buy accounts.
        The response locks the rate and returns the expected `buyAmount`, fee, and expiry time with status `PENDING`.
        Confirm the conversion before it expires to begin execution. An unconfirmed conversion does not execute and cannot be retrieved later.
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/RequestId"
        - $ref: "#/components/parameters/IdempotencyKey"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ConversionRequest"
            examples:
              USD to USDT:
                summary: USD → USDT
                value:
                  pairId: 7c9e1a3b-5d2f-4e8a-9b0c-6d4f2a8e1c3b
                  sellAmount: "10000.00"
                  externalReference: conv-2026-0714-01
              USDT to USD:
                summary: USDT → USD
                value:
                  pairId: 2b8d0c4e-6f1a-4d3c-8e5b-9a7c3f0d2e4a
                  sellAmount: "5000.00"
                  externalReference: conv-2026-0714-02
      responses:
        "201":
          description: Conversion created with a locked rate, awaiting confirmation.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Conversion"
              examples:
                USD to USDT:
                  summary: USD → USDT, rate locked
                  value:
                    conversionId: a3f5d7c9-1e2b-4c6a-8d9f-0b1a2c3d4e5f
                    pairId: 7c9e1a3b-5d2f-4e8a-9b0c-6d4f2a8e1c3b
                    status: PENDING
                    sellAccount:
                      accountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                      currency: USD
                      paymentRails: ZENUS_BANK
                    sellAmount:
                      amount: "10000.00"
                      currency: USD
                    buyAccount:
                      accountId: 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
                      currency: USDT
                      paymentRails: TRON
                    buyAmount:
                      amount: "9985.00"
                      currency: USDT
                    rate: "1.00"
                    fee:
                      amount: "15.00"
                      currency: USD
                    externalReference: conv-2026-0714-01
                    createdAt: 2026-07-14T14:00:11Z
                USDT to USD:
                  summary: USDT → USD, rate locked
                  value:
                    conversionId: b8e6c2a4-5d1f-4e9b-a7c3-6f2d8b0a4e1c
                    pairId: 2b8d0c4e-6f1a-4d3c-8e5b-9a7c3f0d2e4a
                    status: PENDING
                    sellAccount:
                      accountId: 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
                      currency: USDT
                      paymentRails: TRON
                    sellAmount:
                      amount: "5000.00"
                      currency: USDT
                    buyAccount:
                      accountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                      currency: USD
                      paymentRails: ZENUS_BANK
                    buyAmount:
                      amount: "4992.50"
                      currency: USD
                    rate: "1.00"
                    fee:
                      amount: "7.50"
                      currency: USD
                    externalReference: conv-2026-0714-02
                    createdAt: 2026-07-14T14:05:44Z
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
  /clients/{clientId}/conversions/{conversionId}:
    get:
      tags:
        - Conversions
      summary: Get conversion
      description: |-
        Returns one confirmed conversion for the selected client, including its status, sell and buy accounts, amounts, locked rate, and fee.
        An unconfirmed `PENDING` conversion is available only in the create response.
      operationId: getConversion
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/ConversionId"
        - $ref: "#/components/parameters/RequestId"
      responses:
        "200":
          description: Conversion.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Conversion"
              examples:
                USD to USDT:
                  summary: USD → USDT, completed
                  value:
                    conversionId: a3f5d7c9-1e2b-4c6a-8d9f-0b1a2c3d4e5f
                    pairId: 7c9e1a3b-5d2f-4e8a-9b0c-6d4f2a8e1c3b
                    status: COMPLETED
                    sellAccount:
                      accountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                      currency: USD
                      paymentRails: ZENUS_BANK
                    sellAmount:
                      amount: "10000.00"
                      currency: USD
                    buyAccount:
                      accountId: 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
                      currency: USDT
                      paymentRails: TRON
                    buyAmount:
                      amount: "9985.00"
                      currency: USDT
                    rate: "1.00"
                    fee:
                      amount: "15.00"
                      currency: USD
                    externalReference: conv-2026-0714-01
                    createdAt: 2026-07-14T14:00:11Z
                    completedAt: 2026-07-14T14:05:39Z
                USDT to USD:
                  summary: USDT → USD, completed
                  value:
                    conversionId: b8e6c2a4-5d1f-4e9b-a7c3-6f2d8b0a4e1c
                    pairId: 2b8d0c4e-6f1a-4d3c-8e5b-9a7c3f0d2e4a
                    status: COMPLETED
                    sellAccount:
                      accountId: 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
                      currency: USDT
                      paymentRails: TRON
                    sellAmount:
                      amount: "5000.00"
                      currency: USDT
                    buyAccount:
                      accountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                      currency: USD
                      paymentRails: ZENUS_BANK
                    buyAmount:
                      amount: "4992.50"
                      currency: USD
                    rate: "1.00"
                    fee:
                      amount: "7.50"
                      currency: USD
                    externalReference: conv-2026-0714-02
                    createdAt: 2026-07-14T14:05:44Z
                    completedAt: 2026-07-14T14:11:02Z
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
  /clients/{clientId}/conversions/{conversionId}/confirm:
    post:
      tags:
        - Conversions
      summary: Confirm conversion
      operationId: confirmConversion
      description: |-
        Accepts the locked quote for a `PENDING` client conversion and begins execution.
        Confirm before the quote expires. If it has expired, create a new conversion for the client.
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/ConversionId"
        - $ref: "#/components/parameters/RequestId"
        - $ref: "#/components/parameters/IdempotencyKey"
      responses:
        "200":
          description: Conversion confirmed and executing.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Conversion"
              examples:
                USD to USDT:
                  summary: USD → USDT, executing
                  value:
                    conversionId: a3f5d7c9-1e2b-4c6a-8d9f-0b1a2c3d4e5f
                    pairId: 7c9e1a3b-5d2f-4e8a-9b0c-6d4f2a8e1c3b
                    status: ACTIVE
                    sellAccount:
                      accountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                      currency: USD
                      paymentRails: ZENUS_BANK
                    sellAmount:
                      amount: "10000.00"
                      currency: USD
                    buyAccount:
                      accountId: 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
                      currency: USDT
                      paymentRails: TRON
                    buyAmount:
                      amount: "9985.00"
                      currency: USDT
                    rate: "1.00"
                    fee:
                      amount: "15.00"
                      currency: USD
                    externalReference: conv-2026-0714-01
                    createdAt: 2026-07-14T14:00:11Z
                USDT to USD:
                  summary: USDT → USD, executing
                  value:
                    conversionId: b8e6c2a4-5d1f-4e9b-a7c3-6f2d8b0a4e1c
                    pairId: 2b8d0c4e-6f1a-4d3c-8e5b-9a7c3f0d2e4a
                    status: ACTIVE
                    sellAccount:
                      accountId: 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
                      currency: USDT
                      paymentRails: TRON
                    sellAmount:
                      amount: "5000.00"
                      currency: USDT
                    buyAccount:
                      accountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                      currency: USD
                      paymentRails: ZENUS_BANK
                    buyAmount:
                      amount: "4992.50"
                      currency: USD
                    rate: "1.00"
                    fee:
                      amount: "7.50"
                      currency: USD
                    externalReference: conv-2026-0714-02
                    createdAt: 2026-07-14T14:05:44Z
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
  /clients/{clientId}/address-book:
    get:
      tags:
        - Address Book
      summary: List address book entries
      operationId: listAddressBookEntries
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/RequestId"
        - $ref: "#/components/parameters/First"
        - $ref: "#/components/parameters/After"
        - name: currency
          in: query
          schema:
            $ref: "#/components/schemas/Currency"
            examples:
              - USD
          description: Filter by currency.
        - name: status
          in: query
          schema:
            $ref: "#/components/schemas/DestinationStatus"
            examples:
              - ACTIVE
          description: Filter by status.
      responses:
        "200":
          description: "Page of the selected client's address book entries."
          content:
            application/json:
              schema:
                type: object
                required:
                  - nodes
                  - pageInfo
                properties:
                  nodes:
                    type: array
                    items:
                      $ref: "#/components/schemas/AddressBookEntry"
                  pageInfo:
                    $ref: "#/components/schemas/PageInfo"
              examples:
                Address book entries:
                  summary: A bank account and a wallet address
                  value:
                    nodes:
                      - destinationId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                        status: ACTIVE
                        currency: USD
                        accountNumber: "0123456789"
                        bank:
                          bankName: Bank of America
                          address:
                            city: New York
                            country: US
                          swiftBic: BOFAUS3NXXX
                        createdAt: 2026-06-12T14:05:00Z
                      - destinationId: e2c8a4f6-7b1d-4e3a-9c5f-8a0b2d4e6f1c
                        status: ACTIVE
                        currency: USDT
                        walletAddress: TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL
                        network: TRON
                        createdAt: 2026-06-12T14:05:00Z
                    pageInfo:
                      hasNextPage: false
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
      description: |-
        Returns the external bank accounts and wallets registered in the selected client's address book, including their current status. Filter the results by currency or status.

        An external account is whitelisted for deposits and withdrawals when its status is `ACTIVE`.
  /clients/{clientId}/address-book/bank-accounts:
    post:
      tags:
        - Address Book
      summary: Add a bank account
      operationId: createBankEntry
      description: |-
        Registers an external bank account in the selected client's address book for whitelisting.

        The entry starts in `PENDING_REVIEW` while Axiym performs due diligence and compliance checks. Once approved, its status becomes `ACTIVE` and it can fund deposits and receive withdrawals. The `destination.activated` webhook reports activation.
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/RequestId"
        - $ref: "#/components/parameters/IdempotencyKey"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BankDestinationRequest"
            examples:
              Domestic account:
                summary: Domestic account number
                value:
                  currency: USD
                  accountNumber: "0123456789"
                  bank:
                    bankName: Bank of America
                    address:
                      city: New York
                      country: US
                    swiftBic: BOFAUS3NXXX
              IBAN account:
                summary: IBAN
                value:
                  currency: EUR
                  iban: LU364080000000711363
                  bank:
                    bankName: Banking Circle S.A.
                    address:
                      city: Luxembourg
                      country: LU
                    swiftBic: BCIRLULL
      responses:
        "201":
          description: "External bank account registered and awaiting due diligence and compliance checks."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AddressBookEntry"
              examples:
                Bank account:
                  summary: Bank account
                  value:
                    destinationId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                    status: PENDING_REVIEW
                    currency: USD
                    accountNumber: "0123456789"
                    bank:
                      bankName: Bank of America
                      address:
                        city: New York
                        country: US
                      swiftBic: BOFAUS3NXXX
                    createdAt: 2026-06-12T14:05:00Z
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
  /clients/{clientId}/address-book/wallets:
    post:
      tags:
        - Address Book
      summary: Add a wallet address
      operationId: createWalletEntry
      description: |-
        Registers an external wallet in the selected client's address book for whitelisting.

        The entry starts in `PENDING_REVIEW` while Axiym performs due diligence and compliance checks. Once approved, its status becomes `ACTIVE` and it can fund deposits and receive withdrawals. The `destination.activated` webhook reports activation.
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/RequestId"
        - $ref: "#/components/parameters/IdempotencyKey"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WalletDestinationRequest"
      responses:
        "201":
          description: "External wallet registered and awaiting due diligence and compliance checks."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AddressBookEntry"
              examples:
                Wallet address:
                  summary: Wallet address
                  value:
                    destinationId: e2c8a4f6-7b1d-4e3a-9c5f-8a0b2d4e6f1c
                    status: PENDING_REVIEW
                    currency: USDT
                    walletAddress: TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL
                    network: TRON
                    createdAt: 2026-06-12T14:05:00Z
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
  /clients/{clientId}/address-book/{destinationId}:
    get:
      tags:
        - Address Book
      summary: Get an address book entry
      description: |-
        Returns an external bank account or wallet registered in the selected client's address book, including its current status and payment details. Its address book identifier is `destinationId`.

        An external account is whitelisted for deposits and withdrawals when its status is `ACTIVE`.
      operationId: getAddressBookEntry
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/DestinationId"
        - $ref: "#/components/parameters/RequestId"
      responses:
        "200":
          description: Address book entry.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AddressBookEntry"
              examples:
                Bank account:
                  summary: Bank account
                  value:
                    destinationId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                    status: ACTIVE
                    currency: USD
                    accountNumber: "0123456789"
                    bank:
                      bankName: Bank of America
                      address:
                        city: New York
                        country: US
                      swiftBic: BOFAUS3NXXX
                    createdAt: 2026-06-12T14:05:00Z
                Wallet address:
                  summary: Wallet address
                  value:
                    destinationId: e2c8a4f6-7b1d-4e3a-9c5f-8a0b2d4e6f1c
                    status: ACTIVE
                    currency: USDT
                    walletAddress: TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL
                    network: TRON
                    createdAt: 2026-06-12T14:05:00Z
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
  /clients/{clientId}/withdrawals:
    get:
      tags:
        - Withdrawals
      x-axiym-navigation-order: 10
      summary: List withdrawals
      operationId: listWithdrawals
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/RequestId"
        - $ref: "#/components/parameters/First"
        - $ref: "#/components/parameters/After"
        - name: accountId
          in: query
          description: Filter by account.
          schema:
            type: string
            format: uuid
            examples:
              - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        - name: status
          in: query
          schema:
            $ref: "#/components/schemas/WithdrawalStatus"
            examples:
              - PENDING
          description: Filter by status.
        - name: externalReference
          in: query
          description: Filter by your external reference.
          schema:
            type: string
            examples:
              - wd-2026-0714-01
      responses:
        "200":
          description: Page of withdrawals.
          content:
            application/json:
              schema:
                type: object
                required:
                  - nodes
                  - pageInfo
                properties:
                  nodes:
                    type: array
                    items:
                      $ref: "#/components/schemas/Withdrawal"
                  pageInfo:
                    $ref: "#/components/schemas/PageInfo"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
      description: Returns withdrawals created for the selected client. Filter the results by source account, status, or `externalReference`.
    post:
      tags:
        - Withdrawals
      x-axiym-navigation-order: 20
      summary: Create withdrawal
      operationId: createWithdrawal
      description: |-
        Creates a withdrawal from the selected client's Axiym account to a whitelisted external bank account or wallet.

        **Requirements**

        - `sourceAccountId` must identify an Axiym account belonging to the selected client.
        - `destinationId` must identify an external account registered in the selected client's address book.
        - The source Axiym account and the external account must both be `ACTIVE` and use the same currency.

        The response includes the withdrawal, source account, and destination details and has status `PENDING_CONFIRMATION`. Creation does not begin execution; confirm the returned `withdrawalId` with `POST /clients/{clientId}/withdrawals/{withdrawalId}/confirm`.
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/RequestId"
        - $ref: "#/components/parameters/IdempotencyKey"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WithdrawalRequest"
            examples:
              Wallet:
                summary: Wallet
                value:
                  sourceAccountId: 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
                  sourceAmount:
                    amount: "500.00"
                    currency: USDT
                  destinationId: e2c8a4f6-7b1d-4e3a-9c5f-8a0b2d4e6f1c
                  reference: Treasury sweep
                  externalReference: wd-2026-0714-01
              Bank:
                summary: Bank
                value:
                  sourceAccountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                  sourceAmount:
                    amount: "12500.00"
                    currency: USD
                  destinationId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                  reference: Invoice INV-20416
                  externalReference: wd-2026-0714-02
      responses:
        "201":
          description: Withdrawal created and awaiting confirmation.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Withdrawal"
              examples:
                Wallet:
                  summary: Wallet
                  value:
                    withdrawalId: 9b4e2a1c-6d3f-4a8e-bc7d-1f2a3b4c5d6e
                    status: PENDING_CONFIRMATION
                    sourceAccount:
                      accountId: 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
                      currency: USDT
                      paymentRails: TRON
                    sourceAmount:
                      amount: "500.00"
                      currency: USDT
                    destinationAmount:
                      amount: "500.00"
                      currency: USDT
                    fee:
                      amount: "0.00"
                      currency: USDT
                    destination:
                      destinationId: e2c8a4f6-7b1d-4e3a-9c5f-8a0b2d4e6f1c
                      currency: USDT
                      walletAddress: TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL
                      network: TRON
                    code: AXI00000418
                    reference: Treasury sweep
                    externalReference: wd-2026-0714-01
                    createdAt: 2026-07-14T20:06:50Z
                Bank:
                  summary: Bank
                  value:
                    withdrawalId: 1e7c5a3b-8d2f-4b6e-9a0c-3d5f7b9e1c2a
                    status: PENDING_CONFIRMATION
                    sourceAccount:
                      accountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                      currency: USD
                      paymentRails: ZENUS_BANK
                    sourceAmount:
                      amount: "12500.00"
                      currency: USD
                    destinationAmount:
                      amount: "12500.00"
                      currency: USD
                    fee:
                      amount: "0.00"
                      currency: USD
                    destination:
                      destinationId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                      currency: USD
                      accountNumber: "0123456789"
                      bank:
                        bankName: Bank of America
                        address:
                          city: New York
                          country: US
                        swiftBic: BOFAUS3NXXX
                    code: AXI00000419
                    reference: Invoice INV-20416
                    externalReference: wd-2026-0714-02
                    createdAt: 2026-07-14T20:06:50Z
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
  /clients/{clientId}/withdrawals/{withdrawalId}:
    get:
      tags:
        - Withdrawals
      x-axiym-navigation-order: 40
      summary: Get withdrawal
      description: Returns one withdrawal for the selected client, including its current status, source account, destination, amounts, fee, and any available bank or blockchain details.
      operationId: getWithdrawal
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/WithdrawalId"
        - $ref: "#/components/parameters/RequestId"
      responses:
        "200":
          description: Withdrawal.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Withdrawal"
              examples:
                Wallet (completed):
                  summary: Wallet (completed)
                  value:
                    withdrawalId: 9b4e2a1c-6d3f-4a8e-bc7d-1f2a3b4c5d6e
                    status: COMPLETED
                    sourceAccount:
                      accountId: 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
                      currency: USDT
                      paymentRails: TRON
                    sourceAmount:
                      amount: "500.00"
                      currency: USDT
                    destinationAmount:
                      amount: "500.00"
                      currency: USDT
                    fee:
                      amount: "0.00"
                      currency: USDT
                    destination:
                      destinationId: e2c8a4f6-7b1d-4e3a-9c5f-8a0b2d4e6f1c
                      currency: USDT
                      walletAddress: TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL
                      network: TRON
                    code: AXI00000418
                    transactionHash: "9f8e7d6c5b4a39281706f5e4d3c2b1a0998877665544332211ffeeddccbbaa00"
                    reference: Treasury sweep
                    externalReference: wd-2026-0714-01
                    createdAt: 2026-07-14T20:06:50Z
                Bank (completed):
                  summary: Bank (completed)
                  value:
                    withdrawalId: 1e7c5a3b-8d2f-4b6e-9a0c-3d5f7b9e1c2a
                    status: COMPLETED
                    sourceAccount:
                      accountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                      currency: USD
                      paymentRails: ZENUS_BANK
                    sourceAmount:
                      amount: "12500.00"
                      currency: USD
                    destinationAmount:
                      amount: "12500.00"
                      currency: USD
                    fee:
                      amount: "0.00"
                      currency: USD
                    destination:
                      destinationId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                      currency: USD
                      accountNumber: "0123456789"
                      bank:
                        bankName: Bank of America
                        address:
                          city: New York
                          country: US
                        swiftBic: BOFAUS3NXXX
                    code: AXI00000419
                    reference: Invoice INV-20416
                    externalReference: wd-2026-0714-02
                    createdAt: 2026-07-14T20:06:50Z
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
  /clients/{clientId}/withdrawals/{withdrawalId}/confirm:
    post:
      tags:
        - Withdrawals
      x-axiym-navigation-order: 30
      summary: Confirm withdrawal
      operationId: confirmWithdrawal
      description: |-
        Confirms a withdrawal in `PENDING_CONFIRMATION` status and begins execution.

        The request has no body. Use the `withdrawalId` returned by `POST /clients/{clientId}/withdrawals` and provide a new `Idempotency-Key` for this confirmation request.
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/WithdrawalId"
        - $ref: "#/components/parameters/RequestId"
        - $ref: "#/components/parameters/IdempotencyKey"
      responses:
        "200":
          description: Withdrawal confirmed and queued for execution.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Withdrawal"
              examples:
                Confirmed bank withdrawal:
                  summary: Confirmed bank withdrawal
                  value:
                    withdrawalId: 1e7c5a3b-8d2f-4b6e-9a0c-3d5f7b9e1c2a
                    status: PENDING
                    sourceAccount:
                      accountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                      currency: USD
                      paymentRails: ZENUS_BANK
                    sourceAmount:
                      amount: "12500.00"
                      currency: USD
                    destinationAmount:
                      amount: "12500.00"
                      currency: USD
                    fee:
                      amount: "0.00"
                      currency: USD
                    destination:
                      destinationId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                      currency: USD
                      accountNumber: "0123456789"
                      bank:
                        bankName: Bank of America
                        address:
                          city: New York
                          country: US
                        swiftBic: BOFAUS3NXXX
                    code: AXI00000419
                    reference: Invoice INV-20416
                    externalReference: wd-2026-0714-02
                    createdAt: 2026-07-14T20:06:50Z
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
  /webhooks/subscriptions:
    get:
      summary: List webhook subscriptions
      description: Returns the active webhook endpoints registered for your partnership. Use pagination to retrieve additional subscriptions when present.
      deprecated: false
      tags:
        - Webhook Subscriptions
      parameters:
        - $ref: "#/components/parameters/RequestId"
        - name: first
          in: query
          description: Maximum number of items to return (page size).
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
            examples:
              - 20
        - name: after
          in: query
          description: Cursor for the next page, from the previous response's pageInfo.endCursor.
          required: false
          schema:
            type: string
            examples:
              - eyJvZmZzZXQiOjI1fQ==
      responses:
        "200":
          description: "Active webhook subscriptions and pagination details."
          content:
            application/json:
              schema:
                type: object
                properties:
                  nodes:
                    type: array
                    items:
                      $ref: "#/components/schemas/Subscription"
                  pageInfo:
                    $ref: "#/components/schemas/PageInfo"
                required:
                  - nodes
                  - pageInfo
          headers: {}
        "400":
          $ref: "#/components/responses/BadRequest"
          description: "The request is malformed or cannot be processed as supplied."
        "401":
          $ref: "#/components/responses/Unauthorized"
          description: "Authentication is missing or invalid."
        "403":
          $ref: "#/components/responses/Forbidden"
          description: "Your access token does not permit this operation or access to the requested resource."
        "422":
          $ref: "#/components/responses/InvalidParams"
          description: "The request failed validation or a business rule. Validation failures return `errors` keyed by request field. Business rejections return `errors: null` and explain the reason in `message`."
        "500":
          $ref: "#/components/responses/InternalError"
          description: "An unexpected server error prevented the request from completing."
      security:
        - Default: []
    post:
      summary: Create webhook subscription
      description: Registers a publicly reachable HTTPS endpoint to receive webhook notifications available to your partnership. A subscription applies to the endpoint as a whole and does not define per-event filters. Store the returned `subscriptionId` for testing or disabling the subscription.
      deprecated: false
      tags:
        - Webhook Subscriptions
      parameters:
        - $ref: "#/components/parameters/RequestId"
        - $ref: "#/components/parameters/IdempotencyKey"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                endpoint:
                  type: string
                  title: ""
                  description: URL of the endpoint to subscribe to notifications. Must be publicly accessible, use HTTPS, and respond with a 2XX status to a POST request.
              required:
                - endpoint
      responses:
        "201":
          description: "Webhook subscription created."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Subscription"
          headers: {}
        "400":
          $ref: "#/components/responses/BadRequest"
          description: "The request is malformed or cannot be processed as supplied."
        "401":
          $ref: "#/components/responses/Unauthorized"
          description: "Authentication is missing or invalid."
        "403":
          $ref: "#/components/responses/Forbidden"
          description: "Your access token does not permit this operation or access to the requested resource."
        "422":
          $ref: "#/components/responses/InvalidParams"
          description: "The request failed validation or a business rule. Validation failures return `errors` keyed by request field. Business rejections return `errors: null` and explain the reason in `message`."
        "500":
          $ref: "#/components/responses/InternalError"
          description: "An unexpected server error prevented the request from completing."
      security:
        - Default: []
  /webhooks/subscriptions/{subscriptionId}/tests:
    post:
      summary: Test webhook subscription
      description: Requests a signed test delivery to the endpoint registered for the specified subscription. Use this to verify endpoint reachability, signature validation, event persistence, and successful `2xx` acknowledgement. A successful API response means the test request was accepted, not that your endpoint processed the delivery successfully.
      deprecated: false
      tags:
        - Webhook Subscriptions
      parameters:
        - name: subscriptionId
          in: path
          description: Subscription identifier (UUID).
          required: true
          schema:
            type: string
            format: uuid
            examples:
              - 6f1c2d3e-4a5b-4c6d-8e9f-0a1b2c3d4e5f
        - $ref: "#/components/parameters/RequestId"
        - $ref: "#/components/parameters/IdempotencyKey"
      responses:
        "201":
          description: "Test delivery request accepted. This response does not confirm successful delivery or processing by your endpoint."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RequestStatus"
          headers: {}
        "400":
          $ref: "#/components/responses/BadRequest"
          description: "The request is malformed or cannot be processed as supplied."
        "401":
          $ref: "#/components/responses/Unauthorized"
          description: "Authentication is missing or invalid."
        "403":
          $ref: "#/components/responses/Forbidden"
          description: "Your access token does not permit this operation or access to the requested resource."
        "404":
          $ref: "#/components/responses/NotFound"
          description: "The requested resource was not found."
        "422":
          $ref: "#/components/responses/InvalidParams"
          description: "The request failed validation or a business rule. Validation failures return `errors` keyed by request field. Business rejections return `errors: null` and explain the reason in `message`."
        "500":
          $ref: "#/components/responses/InternalError"
          description: "An unexpected server error prevented the request from completing."
      security:
        - Default: []
  /webhooks/subscriptions/{subscriptionId}:
    delete:
      summary: Disable webhook subscription
      description: Disables the specified webhook subscription. Its endpoint stops receiving new event deliveries, and the subscription is no longer returned when listing active subscriptions.
      deprecated: false
      tags:
        - Webhook Subscriptions
      parameters:
        - name: subscriptionId
          in: path
          description: Subscription identifier (UUID).
          required: true
          schema:
            type: string
            format: uuid
            examples:
              - 6f1c2d3e-4a5b-4c6d-8e9f-0a1b2c3d4e5f
        - $ref: "#/components/parameters/RequestId"
      responses:
        "200":
          description: "Webhook subscription disabled."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Subscription"
          headers: {}
        "400":
          $ref: "#/components/responses/BadRequest"
          description: "The request is malformed or cannot be processed as supplied."
        "401":
          $ref: "#/components/responses/Unauthorized"
          description: "Authentication is missing or invalid."
        "403":
          $ref: "#/components/responses/Forbidden"
          description: "Your access token does not permit this operation or access to the requested resource."
        "404":
          $ref: "#/components/responses/NotFound"
          description: "The requested resource was not found."
        "422":
          $ref: "#/components/responses/InvalidParams"
          description: "The request failed validation or a business rule. Validation failures return `errors` keyed by request field. Business rejections return `errors: null` and explain the reason in `message`."
        "500":
          $ref: "#/components/responses/InternalError"
          description: "An unexpected server error prevented the request from completing."
      security:
        - Default: []
  /webhooks/public-keys/{publicKeyId}:
    get:
      summary: Get webhook public key
      description: Returns the Ed25519 public key identified by the `X-Key-Id` header on a webhook delivery. Use this key to verify the `X-Signature` value against the raw request body. Cache keys by `publicKeyId` and retrieve a new key when an unfamiliar identifier is received.
      deprecated: false
      tags:
        - Webhook Subscriptions
      parameters:
        - name: publicKeyId
          in: path
          description: Public key identifier (UUID).
          required: true
          schema:
            type: string
            format: uuid
            examples:
              - 0b7d9e2f-3c4a-4b5d-9e6f-7a8b9c0d1e2f
        - $ref: "#/components/parameters/RequestId"
      responses:
        "200":
          description: "Public key for verifying webhook signatures."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicKey"
          headers: {}
        "400":
          $ref: "#/components/responses/BadRequest"
          description: "The request is malformed or cannot be processed as supplied."
        "401":
          $ref: "#/components/responses/Unauthorized"
          description: "Authentication is missing or invalid."
        "403":
          $ref: "#/components/responses/Forbidden"
          description: "Your access token does not permit this operation or access to the requested resource."
        "404":
          $ref: "#/components/responses/NotFound"
          description: "The requested resource was not found."
        "422":
          $ref: "#/components/responses/InvalidParams"
          description: "The request failed validation or a business rule. Validation failures return `errors` keyed by request field. Business rejections return `errors: null` and explain the reason in `message`."
        "500":
          $ref: "#/components/responses/InternalError"
          description: "An unexpected server error prevented the request from completing."
      security:
        - Default: []
components:
  securitySchemes:
    Default:
      type: http
      scheme: bearer
      bearerFormat: JWT
  parameters:
    RequestId:
      name: X-Request-Id
      in: header
      required: false
      description: |
        Optional identifier for tracing a request end to end. A UUID is recommended. Axiym returns it in the `X-Request-Id` response header and records it in logs. If omitted, Axiym generates one. Include it when contacting support.
      schema:
        type: string
        format: uuid
        examples:
          - 3fa85f64-5717-4562-b3fc-2c963f66afa6
    AccountId:
      name: accountId
      in: path
      required: true
      schema:
        type: string
        format: uuid
        examples:
          - 3fa85f64-5717-4562-b3fc-2c963f66afa6
      description: Account identifier (UUID).
    First:
      name: first
      in: query
      description: Maximum number of items to return (page size).
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
        examples:
          - 20
    After:
      name: after
      in: query
      description: Cursor for the next page, from the previous response's pageInfo.endCursor.
      schema:
        type: string
        examples:
          - eyJvZmZzZXQiOjI1fQ==
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      description: "A unique key for safely retrying this request. Reuse the same key with the same request method, endpoint, and payload to obtain the original result without repeating the operation. Use a new key for each new operation, including separate keys for creation and confirmation. A UUID is recommended."
      schema:
        type: string
        maxLength: 255
        examples:
          - a1b2c3d4-e5f6-7890-abcd-ef1234567890
    DestinationId:
      name: destinationId
      in: path
      required: true
      schema:
        type: string
        format: uuid
        examples:
          - e2c8a4f6-7b1d-4e3a-9c5f-8a0b2d4e6f1c
      description: "Identifier of the external account in the selected client's address book (UUID)."
    ConversionId:
      name: conversionId
      in: path
      required: true
      schema:
        type: string
        format: uuid
        examples:
          - a3f5d7c9-1e2b-4c6a-8d9f-0b1a2c3d4e5f
      description: Conversion identifier (UUID).
    DepositId:
      name: depositId
      in: path
      required: true
      schema:
        type: string
        format: uuid
        examples:
          - 4c8e2b6a-1d9f-4e3b-a7c5-2f0a8d6b4e1c
      description: Deposit identifier (UUID).
    WithdrawalId:
      name: withdrawalId
      in: path
      required: true
      schema:
        type: string
        format: uuid
        examples:
          - 3fa85f64-5717-4562-b3fc-2c963f66afa6
      description: Withdrawal identifier (UUID).
    ClientId:
      name: clientId
      in: path
      required: true
      schema:
        type: string
        format: uuid
        examples:
          - 1d2f7f5e-8a3b-4c6d-9e0f-2a4b6c8d0e2f
      description: Client identifier (UUID) assigned when an onboarding case is created. It identifies the onboarding case and, once active, the client's Client Account API resources. The client must belong to your partnership; anyone else's id returns 404.
  schemas:
    OnboardingRequest:
      type: object
      properties:
        legalEntityName:
          type: string
          description: "Official name of the company."
          examples:
            - Test Corp Ltd
        incorporationDate:
          type: string
          description: "Date the legal entity was established."
          format: date
          examples:
            - '2020-01-15'
        registrationDate:
          type: string
          description: "Date the company joined your network."
          format: date
          examples:
            - '2020-02-01'
        legalAddress:
          $ref: '#/components/schemas/Address'
          description: "Legal address."
        currency:
          $ref: '#/components/schemas/Currency'
          examples:
            - USD
        partnerClientId:
          type: string
          description: "Your unique reference for the client within your partnership."
          examples:
            - my-internal-ref-001
        disbursementAccount:
          description: Payment Network bank account that receives funding disbursements for this client (the funding destination).
          $ref: '#/components/schemas/DisbursementAccount'
        paymentRails:
          type: string
          description: "Payment rail code."
          examples:
            - ZENUS_BANK
      required:
        - legalEntityName
        - legalAddress
        - registrationDate
        - incorporationDate
        - currency
      description: Client onboarding request.
    OnboardingCase:
      type: object
      properties:
        clientId:
          type: string
          format: uuid
          description: Client identifier (UUID).
          examples:
            - b7e8c1a2-9f43-4d2e-8a6b-1c2d3e4f5a6b
        code:
          type: string
          description: Human-readable client code.
          examples:
            - AXI000221
        legalEntityName:
          type: string
          description: "Official name of the company."
          examples:
            - Acme Corporation
        legalAddress:
          description: "Legal address."
          $ref: '#/components/schemas/Address'
        incorporationDate:
          type: string
          description: "Date the legal entity was established."
          format: date
          examples:
            - '2020-01-15'
        registrationDate:
          type: string
          description: "Date the company joined your network."
          format: date
          examples:
            - '2020-02-01'
        status:
          type: string
          description: Onboarding application status.
          enum:
            - ONBOARDING
            - APPROVED
            - REJECTED
          examples:
            - ONBOARDING
        currency:
          $ref: '#/components/schemas/Currency'
          description: Currency code (ISO 4217 fiat or supported stablecoin).
          examples:
            - USD
        disbursementAccount:
          $ref: '#/components/schemas/DisbursementAccount'
          description: Payment Network bank account that receives funding disbursements for this client (the funding destination).
        partnerClientId:
          type: string
          description: "Your reference for this client."
          examples:
            - my-internal-ref-001
        paymentRails:
          type: string
          description: 'Payment rail — a configured settlement channel Axiym uses to hold and move funds: a banking partner for fiat (e.g. `ZENUS_BANK`, `FREEMARKET`) or a blockchain network for crypto (e.g. `TRON`, `AVALANCHE`). Codes are returned by `GET /settings/payment-rails`.'
          examples:
            - ZENUS_BANK
      required:
        - clientId
        - code
        - legalEntityName
        - status
      description: Snapshot of a client onboarding application. Created in the submitted state and reviewed by Axiym compliance; while the review is in progress the status stays ONBOARDING. An approved application ends in APPROVED; a rejected application ends in REJECTED.
    Client:
      type: object
      properties:
        clientId:
          type: string
          format: uuid
          description: Client identifier (UUID).
          examples:
            - b7e8c1a2-9f43-4d2e-8a6b-1c2d3e4f5a6b
        code:
          type: string
          description: Human-readable client code.
          examples:
            - AXI000221
        legalEntityName:
          type: string
          description: "Official name of the company."
          examples:
            - Acme Corporation
        legalAddress:
          description: "Legal address."
          $ref: '#/components/schemas/Address'
        incorporationDate:
          type: string
          description: "Date the legal entity was established."
          format: date
          examples:
            - '2020-01-15'
        registrationDate:
          type: string
          description: "Date the company joined your network."
          format: date
          examples:
            - '2020-02-01'
        status:
          type: string
          description: Client status.
          enum:
            - ONBOARDING
            - ACTIVE
            - DISABLED
          examples:
            - ONBOARDING
        currency:
          $ref: '#/components/schemas/Currency'
          description: Currency code (ISO 4217 fiat or supported stablecoin).
          examples:
            - USD
        disbursementAccount:
          $ref: '#/components/schemas/DisbursementAccount'
          description: Payment Network bank account that receives funding disbursements for this client (the funding destination).
        partnerClientId:
          type: string
          description: "Your reference for this client."
          examples:
            - my-internal-ref-001
        paymentRails:
          type: string
          description: 'Payment rail — a configured settlement channel Axiym uses to hold and move funds: a banking partner for fiat (e.g. `ZENUS_BANK`, `FREEMARKET`) or a blockchain network for crypto (e.g. `TRON`, `AVALANCHE`). Codes are returned by `GET /settings/payment-rails`.'
          examples:
            - ZENUS_BANK
      required:
        - clientId
        - legalEntityName
        - legalAddress
        - status
        - incorporationDate
        - registrationDate
        - paymentRails
        - currency
        - code
    Address:
      description: "Registered legal address of a business."
      type: object
      properties:
        city:
          type: string
          description: "City or locality."
          examples:
            - New York
        country:
          type: string
          pattern: ^[A-Z]{2}$
          description: "ISO 3166-1 alpha-2 country code."
          examples:
            - US
        address:
          type: string
          description: "First address line."
          examples:
            - 350 Fifth Avenue
        addressExtended:
          type: string
          description: "Second address line, where applicable."
          examples:
            - Suite 1200
        district:
          type: string
          description: State / County / Province / Region portion of the address. If the country is US or Canada, then district is required and should use the two-letter code for the subdivision.
          examples:
            - NY
        postalCode:
          type: string
          description: "Postal or ZIP code."
          examples:
            - '10115'
      required:
        - postalCode
        - country
        - address
    DisbursementAccount:
      type: object
      properties:
        accountNumber:
          type: string
          description: Bank account number.
          examples:
            - "0123456789"
      description: Bank account at the Payment Network that receives funding disbursements.
    Currency:
      type: string
      description: Currency code — ISO 4217 (e.g. USD, EUR) or a supported digital currency (USDT, USDC).
      examples:
        - USD
    AccountStatus:
      description: "`ACTIVE` is available for supported operations. `SUSPENDED` is temporarily unavailable for supported operations. `CLOSED` is permanently closed."
      type: string
      enum:
        - ACTIVE
        - SUSPENDED
        - CLOSED
      examples:
        - ACTIVE
    Account:
      type: object
      description: An account holding a currency balance. Receiving details for funding it are served by the deposit instructions.
      required:
        - accountId
        - currency
        - paymentRails
        - balance
        - status
      properties:
        accountId:
          type: string
          format: uuid
          description: Account identifier (UUID).
          examples:
            - 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
        currency:
          $ref: "#/components/schemas/Currency"
          description: Account currency.
          examples:
            - USD
        paymentRails:
          $ref: "#/components/schemas/PaymentRailsCode"
          description: Rail the account settles on.
          examples:
            - ZENUS_BANK
        balance:
          allOf:
            - $ref: "#/components/schemas/Decimal"
          description: Current balance.
          examples:
            - "48250.00"
        status:
          $ref: "#/components/schemas/AccountStatus"
          description: Account status.
          examples:
            - ACTIVE
    AccountRef:
      type: object
      description: Compact account reference. Fetch the account via `GET /clients/{clientId}/accounts/{accountId}` for the current balance and status; deposit instructions serve its payment details.
      required:
        - accountId
        - currency
        - paymentRails
      properties:
        accountId:
          type: string
          format: uuid
          description: Account identifier (UUID).
          examples:
            - 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
        currency:
          $ref: "#/components/schemas/Currency"
          description: Account currency.
          examples:
            - USD
        paymentRails:
          $ref: "#/components/schemas/PaymentRailsCode"
          description: Rail the account settles on.
          examples:
            - ZENUS_BANK
    PaymentRailsCode:
      type: string
      description: Payment rail code the account settles on (e.g. `ZENUS_BANK`, `TRON`).
      examples:
        - ZENUS_BANK
    StatementEntryType:
      type: string
      description: Direction of movement on the account.
      enum:
        - CREDIT
        - DEBIT
      examples:
        - DEBIT
    StatementEntry:
      type: object
      description: A posted ledger movement on an account. Entries are returned in posting order and carry the running balance, so consecutive entries reconcile against each other.
      required:
        - entryId
        - accountId
        - type
        - amount
        - currency
        - balanceAfter
        - occurredAt
      properties:
        entryId:
          type: string
          format: uuid
          description: Ledger entry identifier (UUID).
          examples:
            - 7f9a2d1c-8b31-4f59-9e2f-1d63c4a27b12
        accountId:
          type: string
          format: uuid
          description: Account identifier (UUID).
          examples:
            - 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
        type:
          $ref: "#/components/schemas/StatementEntryType"
          description: Credit or debit direction.
          examples:
            - DEBIT
        amount:
          allOf:
            - $ref: "#/components/schemas/Decimal"
          description: Positive movement amount in the account currency; direction is in `type`.
          examples:
            - "500.00"
        currency:
          $ref: "#/components/schemas/Currency"
          description: Account currency.
          examples:
            - USDT
        balanceBefore:
          allOf:
            - $ref: "#/components/schemas/Decimal"
          description: Running balance before this movement.
          examples:
            - "12500.00"
        balanceAfter:
          allOf:
            - $ref: "#/components/schemas/Decimal"
          description: Running balance after this movement.
          examples:
            - "12000.00"
        relatedResourceType:
          type: string
          description: Type of the linked money movement; absent for ledger adjustments with no linked resource.
          enum:
            - DEPOSIT
            - WITHDRAWAL
            - CONVERSION
            - PAYOUT
            - TRANSFER
          examples:
            - WITHDRAWAL
        relatedResourceId:
          type: string
          format: uuid
          description: Identifier of the linked resource, where present.
          examples:
            - 9b4e2a1c-6d3f-4a8e-bc7d-1f2a3b4c5d6e
        occurredAt:
          type: string
          format: date-time
          description: When the movement occurred. Formatted in ISO 8601.
          examples:
            - 2026-07-14T20:07:31Z
    ConversionStatus:
      type: string
      description: |
        `PENDING` awaits confirmation and appears only in the create response. `ACTIVE` is executing. `COMPLETED` means the funds were exchanged. `CANCELED` means the conversion stopped; see `reasonCode`.
      enum:
        - PENDING
        - ACTIVE
        - COMPLETED
        - CANCELED
      examples:
        - PENDING
    ConversionPair:
      type: object
      description: An allowed exchange direction. You sell the `sell` side and buy the `buy` side. Use its stable `pairId` to create a conversion; Axiym selects the corresponding accounts.
      required:
        - pairId
        - pair
        - sell
        - buy
        - minAmount
      properties:
        pairId:
          type: string
          format: uuid
          description: Conversion pair identifier (UUID), stable for the pair and direction.
          examples:
            - 7c9e1a3b-5d2f-4e8a-9b0c-6d4f2a8e1c3b
        pair:
          type: string
          description: Pair symbol, `<sellCurrency>-<buyCurrency>`.
          examples:
            - USD-USDT
        sell:
          allOf:
            - $ref: "#/components/schemas/ConversionPairSide"
          description: The side you sell.
        buy:
          allOf:
            - $ref: "#/components/schemas/ConversionPairSide"
          description: The side you buy.
        minAmount:
          allOf:
            - $ref: "#/components/schemas/Decimal"
          description: Minimum sell amount, in the sell currency.
    ConversionPairSide:
      type: object
      description: One side of a conversion pair.
      required:
        - currency
        - paymentRails
      properties:
        currency:
          $ref: "#/components/schemas/Currency"
          description: Side currency.
          examples:
            - USD
        paymentRails:
          $ref: "#/components/schemas/PaymentRailsCode"
          description: Rail the side settles on.
          examples:
            - ZENUS_BANK
    ConversionRequest:
      type: object
      description: |
        A conversion along one of your conversion pairs. `pairId` selects the accounts on both sides; `sellAmount` is in the pair's sell currency.
      required:
        - pairId
        - sellAmount
      properties:
        pairId:
          type: string
          format: uuid
          description: Conversion pair identifier from `GET /clients/{clientId}/conversion-pairs`.
          examples:
            - 7c9e1a3b-5d2f-4e8a-9b0c-6d4f2a8e1c3b
        sellAmount:
          allOf:
            - $ref: "#/components/schemas/Decimal"
          description: Amount to sell, in the pair's sell currency.
          examples:
            - "10000.00"
        externalReference:
          $ref: "#/components/schemas/ExternalReference"
          description: Your reference for correlation, echoed back on related objects.
          examples:
            - conv-2026-0714-01
    Conversion:
      type: object
      required:
        - conversionId
        - pairId
        - status
        - sellAccount
        - sellAmount
        - buyAccount
        - buyAmount
        - rate
        - fee
        - createdAt
      properties:
        conversionId:
          type: string
          format: uuid
          description: Conversion identifier (UUID).
          examples:
            - a3f5d7c9-1e2b-4c6a-8d9f-0b1a2c3d4e5f
        pairId:
          type: string
          format: uuid
          description: The conversion pair this conversion runs along.
          examples:
            - 7c9e1a3b-5d2f-4e8a-9b0c-6d4f2a8e1c3b
        status:
          $ref: "#/components/schemas/ConversionStatus"
          description: Conversion status.
          examples:
            - COMPLETED
        reasonCode:
          type: string
          description: "Present when `status` is `CANCELED` — the reason as reported by operations or the liquidity venue. Example: `RATE_EXPIRED`."
        sellAccount:
          allOf:
            - $ref: "#/components/schemas/AccountRef"
          description: The sell-side account, embedded as a compact reference.
        sellAmount:
          allOf:
            - $ref: "#/components/schemas/Money"
          description: "Amount to sell, in the sell currency. It represents the quoted amount before execution and the amount sold once `COMPLETED`."
        buyAccount:
          allOf:
            - $ref: "#/components/schemas/AccountRef"
          description: The buy-side account, embedded as a compact reference.
        buyAmount:
          allOf:
            - $ref: "#/components/schemas/Money"
          description: "Expected amount to credit to the buy-side account. It represents the amount credited once the conversion is `COMPLETED`."
        rate:
          allOf:
            - $ref: "#/components/schemas/Decimal"
          description: Units of buy currency received for one unit of sell currency.
          examples:
            - "1.00"
        fee:
          allOf:
            - $ref: "#/components/schemas/Money"
          description: "Conversion fee, in the ISO 4217 currency of the pair. The quote includes this fee before execution. It is deducted from the sell amount when buying digital currency and from the buy proceeds when selling it."
        externalReference:
          $ref: "#/components/schemas/ExternalReference"
          description: Your reference for correlation, echoed back on related objects.
          examples:
            - conv-2026-0714-01
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp. Formatted in ISO 8601.
          examples:
            - 2026-07-14T14:00:11Z
        completedAt:
          type: string
          format: date-time
          description: Completion timestamp. Formatted in ISO 8601.
          examples:
            - 2026-07-14T14:05:39Z
    ConversionEventData:
      type: object
      description: A compact notification for routing and correlation. Retrieve the conversion from `GET /clients/{clientId}/conversions/{conversionId}` when you need its amounts, rate, or current state.
      required:
        - conversionId
        - status
        - clientId
      properties:
        conversionId:
          type: string
          format: uuid
          description: Conversion identifier (UUID).
          examples:
            - a3f5d7c9-1e2b-4c6a-8d9f-0b1a2c3d4e5f
        status:
          $ref: "#/components/schemas/ConversionStatus"
          description: Conversion status at the time the event was emitted.
          examples:
            - COMPLETED
        externalReference:
          $ref: "#/components/schemas/ExternalReference"
          description: Your reference submitted on creation, where present.
          examples:
            - conv-2026-0714-01
        reasonCode:
          type: string
          description: "Present on `conversion.canceled` — the reason as reported by operations or the liquidity venue. Example: `RATE_EXPIRED`."
        clientId:
          type: string
          format: uuid
          description: Axiym identifier of the client that owns the resource.
          examples:
            - 1d2f7f5e-8a3b-4c6d-9e0f-2a4b6c8d0e2f
    DepositStatus:
      type: string
      description: |
        `PENDING` awaits crediting. `HELD` is temporarily on hold. `COMPLETED` was credited to the account. `CANCELED` or `REJECTED` was not completed; see `reasonCode`.
      enum:
        - PENDING
        - HELD
        - COMPLETED
        - CANCELED
        - REJECTED
      examples:
        - COMPLETED
    Deposit:
      type: object
      required:
        - depositId
        - account
        - amount
        - status
        - createdAt
      properties:
        depositId:
          type: string
          format: uuid
          description: Deposit identifier (UUID).
          examples:
            - 4c8e2b6a-1d9f-4e3b-a7c5-2f0a8d6b4e1c
        account:
          allOf:
            - $ref: "#/components/schemas/AccountRef"
          description: The account the deposit credits, embedded as a compact reference.
        amount:
          allOf:
            - $ref: "#/components/schemas/Money"
          description: "Deposit amount in the receiving account currency. The amount is credited when the deposit is `COMPLETED`."
        fee:
          allOf:
            - $ref: "#/components/schemas/Money"
          description: "Deposit fee, where applicable. Its presence does not mean the deposit has been credited; check `status`."
        status:
          $ref: "#/components/schemas/DepositStatus"
          description: Deposit status.
          examples:
            - COMPLETED
        remitterName:
          type: string
          description: Name of the sender, as reported by the sending bank or network.
          examples:
            - Globex Corporation
        code:
          type: string
          description: System-assigned payment code, shown on the payment.
          examples:
            - AXI00000417
        transactionHash:
          type: string
          description: The transaction hash on the network. Present for wallet deposits.
          examples:
            - "1a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f809"
        reasonCode:
          type: string
          description: "Present when `status` is `CANCELED` or `REJECTED` — the reason as reported by the bank, the network, or Axiym operations. Example: `SENDER_SCREENING_FAILED`."
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp. Formatted in ISO 8601.
          examples:
            - 2026-06-14T18:02:11Z
    DepositInstruction:
      description: Axiym's receiving details for one transfer scheme; the shape matches the scheme.
      oneOf:
        - $ref: "#/components/schemas/BankDepositInstruction"
        - $ref: "#/components/schemas/WalletDepositInstruction"
    BankDepositInstruction:
      type: object
      title: Bank transfer
      description: Axiym's receiving bank details for one transfer scheme. Exactly one of `iban` and `accountNumber` is present. Bank fields are present when the scheme uses them.
      required:
        - scheme
        - beneficiaryName
      properties:
        scheme:
          $ref: "#/components/schemas/TransferScheme"
        beneficiaryName:
          type: string
          description: Name of the receiving party to put on the transfer.
          examples:
            - Axi Labs AG
        beneficiaryAddress:
          allOf:
            - $ref: "#/components/schemas/BankAddress"
          description: Postal address of the receiving party. `country` is always present.
        iban:
          $ref: "#/components/schemas/Iban"
          description: IBAN to send to. Present instead of `accountNumber` when the account is identified by an IBAN.
        accountNumber:
          type: string
          description: Account number to send to. Present instead of `iban` when the account has no IBAN.
          examples:
            - "600000000"
        swiftBic:
          type: string
          description: SWIFT/BIC code of the receiving bank.
          examples:
            - ZEITPRSJXXX
        clearingCode:
          type: string
          description: Local clearing or routing code of the receiving bank (for example the ABA routing number for Fedwire and ACH).
          examples:
            - "021000021"
        clearingSystemCode:
          type: string
          description: Clearing system `clearingCode` belongs to. Present together with `clearingCode`.
          examples:
            - USABA
        bankName:
          type: string
          description: Receiving bank name.
          examples:
            - Zenus Bank International Inc
        bankAddress:
          allOf:
            - $ref: "#/components/schemas/BankAddress"
          description: Postal address of the receiving bank. `country` is always present.
        intermediaryBank:
          $ref: "#/components/schemas/DepositIntermediaryBank"
        reference:
          type: string
          description: ISO 11649 creditor reference (`RF` + check digits) assigned by Axiym, formatted in groups of four. Present when the account is funded through a shared receiving account; include it on the transfer so the deposit is matched automatically (matching ignores the spaces). Absent when the receiving account number alone identifies the Axiym account.
          examples:
            - RF11 0004 4901 01
    DepositIntermediaryBank:
      type: object
      description: Bank the transfer passes through before the receiving bank. Present when the scheme uses one; put it on the transfer as the intermediary bank.
      properties:
        swiftBic:
          type: string
          description: SWIFT/BIC code of the intermediary bank.
          examples:
            - CHASUS33XXX
        clearingCode:
          type: string
          description: Local clearing or routing code of the intermediary bank.
          examples:
            - "021000021"
        clearingSystemCode:
          type: string
          description: Clearing system `clearingCode` belongs to. Present together with `clearingCode`.
          examples:
            - USABA
        bankName:
          type: string
          description: Intermediary bank name.
          examples:
            - JP Morgan Chase NA
        bankAddress:
          allOf:
            - $ref: "#/components/schemas/BankAddress"
          description: Postal address of the intermediary bank. `country` is always present.
    TransferScheme:
      type: string
      description: Transfer scheme the instruction applies to. `BOOK` is a transfer between accounts held at the same provider; `BLOCKCHAIN` is a wallet transfer.
      enum:
        - SWIFT
        - FEDWIRE
        - ACH
        - SEPA
        - FPS
        - BOOK
        - BLOCKCHAIN
    WalletDepositInstruction:
      type: object
      title: Wallet transfer
      required:
        - scheme
        - beneficiaryName
        - walletAddress
        - network
      properties:
        scheme:
          type: string
          enum:
            - BLOCKCHAIN
          description: Always `BLOCKCHAIN` for a wallet instruction.
        beneficiaryName:
          type: string
          description: Name of the receiving party the address belongs to. The transfer itself carries no name; use it in your own records.
          examples:
            - Axi Labs AG
        walletAddress:
          type: string
          description: Deposit address of the account; deposits are matched by the address itself.
          examples:
            - TWd2yzw5yFc5W8Tq6CuNZcVJgfmLnBcT4Q
        network:
          $ref: "#/components/schemas/Network"
          description: Network of the wallet address.
          examples:
            - TRON
    DepositEventData:
      type: object
      description: A compact notification for routing and correlation. Retrieve the deposit from `GET /clients/{clientId}/deposits/{depositId}` when you need its amount, transaction hash, or current state.
      required:
        - depositId
        - status
        - clientId
      properties:
        depositId:
          type: string
          format: uuid
          description: Deposit identifier (UUID).
          examples:
            - 4c8e2b6a-1d9f-4e3b-a7c5-2f0a8d6b4e1c
        status:
          $ref: "#/components/schemas/DepositStatus"
          description: Deposit status at the time the event was emitted.
          examples:
            - COMPLETED
        reasonCode:
          type: string
          description: "Present on `deposit.canceled` / `deposit.rejected` — the reason as reported by the bank, the network, or Axiym operations. Example: `SENDER_SCREENING_FAILED`."
        clientId:
          type: string
          format: uuid
          description: Axiym identifier of the client that owns the resource.
          examples:
            - 1d2f7f5e-8a3b-4c6d-9e0f-2a4b6c8d0e2f
    Bank:
      type: object
      description: Destination bank details. Present on bank destinations only. The address country selects the applicable corridor rules.
      additionalProperties: false
      required:
        - bankName
        - address
      properties:
        bankName:
          type: string
          minLength: 1
          description: Bank name.
          examples:
            - Bank of America
        address:
          $ref: "#/components/schemas/BankAddress"
        swiftBic:
          type: string
          pattern: ^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$
          description: ISO 9362 SWIFT/BIC, when required for the corridor.
          examples:
            - BOFAUS3NXXX
        clearingCode:
          type: string
          description: Local clearing or routing code, when required for the corridor.
          examples:
            - "026009593"
        clearingSystemCode:
          type: string
          description: Clearing system the code belongs to. Axiym derives it from the bank country; supply it where a country has more than one system.
          examples:
            - USABA
    Iban:
      type: string
      pattern: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{10,30}$
      description: International Bank Account Number in electronic format — no spaces, upper case. Its check digits are verified; country-specific lengths are left to the receiving bank.
      examples:
        - LU364080000000711363
    BankAddress:
      type: object
      description: >-
        Postal address of the bank. Only the country is required — it selects the corridor rules. Supply the rest when the corridor or a correspondent asks for it.
      additionalProperties: false
      required:
        - country
      properties:
        streetName:
          type: string
        buildingNumber:
          type: string
        city:
          type: string
          examples:
            - New York
        region:
          type: string
        postalCode:
          type: string
        country:
          $ref: "#/components/schemas/CountryCode"
    CountryCode:
      type: string
      pattern: ^[A-Z]{2}$
      description: ISO 3166-1 alpha-2 country code.
      examples:
        - US
    DestinationStatus:
      type: string
      description: "`PENDING_REVIEW` awaits due diligence and compliance checks. `ACTIVE` is whitelisted for deposits and withdrawals. `SUSPENDED` is temporarily unavailable. `CLOSED` is permanently retired."
      enum:
        - PENDING_REVIEW
        - ACTIVE
        - SUSPENDED
        - CLOSED
      examples:
        - ACTIVE
    AddressBookEntry:
      description: |-
        A registered external bank account or wallet in the selected client's address book. Its status indicates whether it is whitelisted for deposits and withdrawals.

        A bank account contains either `iban` or `accountNumber`, together with `bank`. A wallet contains `walletAddress` and `network`. The two field sets never appear together.
      oneOf:
        - $ref: "#/components/schemas/BankAddressBookEntry"
        - $ref: "#/components/schemas/WalletAddressBookEntry"
    BankAddressBookEntry:
      type: object
      title: Bank account
      description: A registered external bank account. Exactly one of `iban` and `accountNumber` is present.
      required:
        - destinationId
        - status
        - currency
        - bank
      oneOf:
        - title: IBAN
          required:
            - iban
        - title: Account number
          required:
            - accountNumber
      properties:
        destinationId:
          type: string
          format: uuid
          description: "Identifier of the external account in the selected client's address book (UUID)."
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        status:
          $ref: "#/components/schemas/DestinationStatus"
          description: "Review and availability status of the registered external account."
          examples:
            - ACTIVE
        currency:
          $ref: "#/components/schemas/Currency"
          description: "Currency associated with the registered external account."
          examples:
            - USD
        iban:
          $ref: "#/components/schemas/Iban"
          description: IBAN of the account. Present instead of `accountNumber` when the account is identified by an IBAN.
        accountNumber:
          type: string
          description: Domestic bank account number. Present instead of `iban` when the account has no IBAN.
          examples:
            - "0123456789"
        bank:
          $ref: "#/components/schemas/Bank"
          description: Destination bank details.
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp. Formatted in ISO 8601.
          examples:
            - 2026-06-12T14:05:00Z
    WalletAddressBookEntry:
      type: object
      title: Wallet address
      required:
        - destinationId
        - status
        - currency
        - walletAddress
        - network
      properties:
        destinationId:
          type: string
          format: uuid
          description: "Identifier of the external account in the selected client's address book (UUID)."
          examples:
            - e2c8a4f6-7b1d-4e3a-9c5f-8a0b2d4e6f1c
        status:
          $ref: "#/components/schemas/DestinationStatus"
          description: "Review and availability status of the registered external account."
          examples:
            - ACTIVE
        currency:
          $ref: "#/components/schemas/Currency"
          description: "Currency associated with the registered external account."
          examples:
            - USDT
        walletAddress:
          type: string
          description: Wallet address of the entry; static and reusable.
          examples:
            - TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL
        network:
          $ref: "#/components/schemas/Network"
          description: Network of the wallet address.
          examples:
            - TRON
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp. Formatted in ISO 8601.
          examples:
            - 2026-06-12T14:05:00Z
    Destination:
      description: |-
        Where the funds are delivered, as recorded on the operation at creation time. This is a snapshot: it carries the account or wallet details and, when the destination was taken from the address book, its `destinationId`. It does not carry the address book entry's status or creation date; read the address book entry for its current state.

        - A bank destination contains `iban` or `accountNumber`, and `bank`.
        - A wallet destination contains `walletAddress` and `network`.

        The two field sets never appear together.
      oneOf:
        - $ref: "#/components/schemas/BankDestination"
        - $ref: "#/components/schemas/WalletDestination"
    BankDestination:
      type: object
      title: Bank account
      description: The bank account the funds are delivered to. Exactly one of `iban` and `accountNumber` is present.
      required:
        - currency
        - bank
      oneOf:
        - title: IBAN
          required:
            - iban
        - title: Account number
          required:
            - accountNumber
      properties:
        destinationId:
          type: string
          format: uuid
          description: Address book entry the destination was taken from, when applicable.
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        currency:
          $ref: "#/components/schemas/Currency"
          description: Currency delivered to the destination.
          examples:
            - USD
        iban:
          $ref: "#/components/schemas/Iban"
          description: IBAN of the account. Present instead of `accountNumber` when the account is identified by an IBAN.
        accountNumber:
          type: string
          description: Domestic bank account number. Present instead of `iban` when the account has no IBAN.
          examples:
            - "0123456789"
        bank:
          $ref: "#/components/schemas/Bank"
          description: Destination bank details.
    WalletDestination:
      type: object
      title: Wallet address
      required:
        - currency
        - walletAddress
        - network
      properties:
        destinationId:
          type: string
          format: uuid
          description: Address book entry the destination was taken from, when applicable.
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        currency:
          $ref: "#/components/schemas/Currency"
          description: Currency delivered to the destination.
          examples:
            - USDT
        walletAddress:
          type: string
          description: Wallet address on the given network.
          examples:
            - TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL
        network:
          $ref: "#/components/schemas/Network"
          description: Network of the wallet address.
          examples:
            - TRON
    BankDestinationRequest:
      type: object
      description: "Registers an external bank account for whitelisting in the selected client's address book. The entry starts in `PENDING_REVIEW` while Axiym performs due diligence and compliance checks. It can fund deposits and receive withdrawals once `ACTIVE`. Supply exactly one of `iban` and `accountNumber`."
      required:
        - currency
        - bank
      oneOf:
        - title: IBAN
          required:
            - iban
        - title: Account number
          required:
            - accountNumber
      properties:
        currency:
          $ref: "#/components/schemas/Currency"
          description: Currency associated with the external bank account.
          examples:
            - USD
        iban:
          $ref: "#/components/schemas/Iban"
          description: IBAN of the account. Supply it instead of `accountNumber` when the account has an IBAN; the check digits are verified.
        accountNumber:
          type: string
          description: Domestic bank account number. Supply it instead of `iban` when the account has no IBAN.
          examples:
            - "0123456789"
        bank:
          $ref: "#/components/schemas/Bank"
          description: Destination bank details.
    WalletDestinationRequest:
      type: object
      description: "Registers an external wallet for whitelisting in the selected client's address book. The entry starts in `PENDING_REVIEW` while Axiym performs due diligence and compliance checks. It can fund deposits and receive withdrawals once `ACTIVE`."
      required:
        - currency
        - walletAddress
        - network
      properties:
        currency:
          $ref: "#/components/schemas/Currency"
          description: Currency associated with the external wallet.
          examples:
            - USDT
        walletAddress:
          type: string
          description: Wallet address to register as an external account.
          examples:
            - TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL
        network:
          $ref: "#/components/schemas/Network"
          description: Network of the wallet address.
          examples:
            - TRON
    PageInfo:
      type: object
      properties:
        hasNextPage:
          type: boolean
          description: When paginating forwards, are there more items?
          examples:
            - true
        endCursor:
          type: string
          description: When paginating forwards, the cursor to continue.
          examples:
            - eyJvZmZzZXQiOjI1fQ==
      required:
        - hasNextPage
    WithdrawalStatus:
      type: string
      description: "`PENDING_CONFIRMATION` is awaiting explicit confirmation and has not started execution. `PENDING` is queued for execution. `HELD` is temporarily on hold. `COMPLETED` means the withdrawal finished successfully. `CANCELED` and `REJECTED` did not complete (see `reasonCode`)."
      enum:
        - PENDING_CONFIRMATION
        - PENDING
        - HELD
        - COMPLETED
        - CANCELED
        - REJECTED
      examples:
        - PENDING
    Withdrawal:
      type: object
      required:
        - withdrawalId
        - sourceAccount
        - sourceAmount
        - destinationAmount
        - fee
        - destination
        - status
        - createdAt
      properties:
        withdrawalId:
          type: string
          format: uuid
          description: Withdrawal identifier (UUID).
          examples:
            - 9b4e2a1c-6d3f-4a8e-bc7d-1f2a3b4c5d6e
        sourceAccount:
          allOf:
            - $ref: "#/components/schemas/AccountRef"
          description: The source account, embedded as a compact reference.
        sourceAmount:
          allOf:
            - $ref: "#/components/schemas/Money"
          description: "Amount to debit from the source Axiym account, in its currency. This amount is included before execution; check `status` for withdrawal progress."
        destinationAmount:
          allOf:
            - $ref: "#/components/schemas/Money"
          description: "Amount to deliver to the external account, in its currency. Equals `sourceAmount` less `fee`. This amount is included before execution; check `status` for withdrawal progress."
        fee:
          allOf:
            - $ref: "#/components/schemas/Money"
          description: "Fee to deduct from `sourceAmount` before delivery, in the source account currency. Zero when no fee applies. This amount is included before execution."
        destination:
          allOf:
            - $ref: "#/components/schemas/Destination"
          description: Snapshot of the destination selected by `destinationId` at creation time.
        status:
          $ref: "#/components/schemas/WithdrawalStatus"
          description: Withdrawal status.
          examples:
            - COMPLETED
        code:
          type: string
          description: System-assigned payment code, shown on the payment.
          examples:
            - AXI00000418
        reference:
          type: string
          description: Text shown to the recipient, as submitted.
          examples:
            - Treasury sweep
        supportingDocuments:
          type: array
          items:
            $ref: "#/components/schemas/SupportingDocument"
          description: Documents accepted with the payment. File content is not returned.
        externalReference:
          $ref: "#/components/schemas/ExternalReference"
          description: Your reference for correlation, echoed back on related objects.
          examples:
            - wd-2026-0714-01
        transactionHash:
          type: string
          description: The transaction hash on the network. Present for wallet withdrawals once the withdrawal is `COMPLETED`.
          examples:
            - "9f8e7d6c5b4a39281706f5e4d3c2b1a0998877665544332211ffeeddccbbaa00"
        reasonCode:
          type: string
          description: "Present when `status` is `CANCELED` or `REJECTED` — the cancellation/rejection reason as reported by the bank, the network, or Axiym operations. Example: `INSUFFICIENT_BENEFICIARY_DETAILS`."
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp. Formatted in ISO 8601.
          examples:
            - 2026-07-14T20:06:50Z
    WithdrawalRequest:
      type: object
      description: "A withdrawal from the selected client's Axiym account to a whitelisted external account identified by `destinationId` in that client's address book. Both accounts must be `ACTIVE` and use the same currency. Creating the withdrawal returns `PENDING_CONFIRMATION`; call `POST /clients/{clientId}/withdrawals/{withdrawalId}/confirm` to begin execution."
      additionalProperties: false
      required:
        - sourceAccountId
        - sourceAmount
        - destinationId
      properties:
        sourceAccountId:
          type: string
          format: uuid
          description: Source account identifier (UUID).
          examples:
            - 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
        sourceAmount:
          allOf:
            - $ref: "#/components/schemas/Money"
          description: Amount to debit from the source account. Its currency must be the source account currency.
        destinationId:
          type: string
          format: uuid
          description: "Identifier of the whitelisted external account in the selected client's address book. It must be `ACTIVE` and use the source Axiym account's currency."
          examples:
            - e2c8a4f6-7b1d-4e3a-9c5f-8a0b2d4e6f1c
        reference:
          type: string
          maxLength: 140
          description: Text shown to the recipient, typically the invoice number.
          examples:
            - Invoice INV-20416
        supportingDocuments:
          type: array
          maxItems: 10
          items:
            $ref: "#/components/schemas/SupportingDocumentInput"
          description: Documents supporting the payment, such as an invoice. Required where the destination corridor requires evidence.
        externalReference:
          $ref: "#/components/schemas/ExternalReference"
          description: Your reference for correlation, echoed back on related objects.
          examples:
            - wd-2026-0714-01
    SupportingDocumentType:
      type: string
      description: "Axiym classification of evidence supplied with a withdrawal."
      enum:
        - PASSPORT
        - NATIONAL_ID
        - DRIVER_LICENSE
        - RESIDENCE_PERMIT
        - PROOF_OF_ADDRESS
        - UTILITY_BILL
        - BANK_STATEMENT
        - TAX_CERTIFICATE
        - CERTIFICATE_OF_INCORPORATION
        - REGISTRY_EXTRACT
        - ARTICLES_OF_ASSOCIATION
        - SHAREHOLDER_REGISTER
        - DIRECTOR_REGISTER
        - UBO_DECLARATION
        - POWER_OF_ATTORNEY
        - BOARD_RESOLUTION
        - REGULATORY_LICENSE
        - BUSINESS_LICENSE
        - FINANCIAL_STATEMENT
        - AUDIT_REPORT
        - SOURCE_OF_FUNDS
        - INVOICE
        - CONTRACT
        - PURCHASE_ORDER
        - PAYROLL_FILE
        - LOAN_AGREEMENT
        - SHIPPING_DOCUMENT
        - CUSTOMS_DECLARATION
        - OTHER
      examples:
        - INVOICE
    SupportingDocumentInput:
      type: object
      description: "A document supporting the payment, such as an invoice or contract. One item is one file of up to 10 MB in PDF, JPEG or PNG format; supply the file content as base64."
      additionalProperties: false
      required:
        - documentType
        - data
        - name
      properties:
        documentType:
          $ref: "#/components/schemas/SupportingDocumentType"
        data:
          type: string
          contentEncoding: base64
          description: Complete file encoded as base64 from its raw bytes. Do not include a data-URL prefix.
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: File name, including the extension.
          examples:
            - INV-20416.pdf
    SupportingDocument:
      type: object
      description: Metadata of a document accepted with the payment. File content is not returned.
      additionalProperties: false
      required:
        - documentType
        - fileId
        - name
        - contentType
        - size
      properties:
        documentType:
          $ref: "#/components/schemas/SupportingDocumentType"
        fileId:
          type: string
          format: uuid
          description: Identifier of the stored file.
        name:
          type: string
          description: File name supplied with the document.
        contentType:
          type: string
          description: MIME type detected from the file content.
          examples:
            - application/pdf
        size:
          type: integer
          description: File size in bytes.
    ClientEventData:
      type: object
      description: Client record snapshot at the time of the event. Fetch `GET /clients/{clientId}` when current profile details are required.
      required:
        - clientId
        - legalEntityName
        - paymentRails
        - currency
        - status
      properties:
        clientId:
          type: string
          format: uuid
        code:
          type: string
          description: Human-readable Axiym client code, where available.
        legalEntityName:
          type: string
        paymentRails:
          type: string
        currency:
          type: string
        status:
          type: string
    ClientStatusEventData:
      type: object
      description: Compact client availability change. Fetch `GET /clients/{clientId}` when current profile details are required.
      required:
        - clientId
        - status
      properties:
        clientId:
          type: string
          format: uuid
          description: Axiym identifier of the represented client.
          examples:
            - 1d2f7f5e-8a3b-4c6d-9e0f-2a4b6c8d0e2f
        status:
          type: string
          description: Client availability at the time the event was emitted.
          enum:
            - ACTIVE
            - DISABLED
          examples:
            - ACTIVE
    ClientOnboardingEventData:
      type: object
      description: Compact outcome of a client onboarding review. Fetch `GET /onboardings/{clientId}` for the authoritative case, including any available rejection reason.
      required:
        - clientId
        - partnerClientId
        - status
      properties:
        clientId:
          type: string
          format: uuid
          description: Axiym identifier assigned to the represented client.
          examples:
            - 1d2f7f5e-8a3b-4c6d-9e0f-2a4b6c8d0e2f
        partnerClientId:
          type: string
          description: Your stable identifier for the client.
          examples:
            - acme-sg-001
        status:
          type: string
          description: Terminal onboarding decision.
          enum:
            - ACTIVE
            - REJECTED
          examples:
            - ACTIVE
    WithdrawalEventStatus:
      type: string
      description: "Statuses that appear in withdrawal events. `PENDING_CONFIRMATION` never does: events start with `withdrawal.created` once the withdrawal is confirmed."
      enum:
        - PENDING
        - HELD
        - COMPLETED
        - CANCELED
        - REJECTED
    WithdrawalEventData:
      type: object
      description: A compact notification for routing and correlation. Retrieve the withdrawal from `GET /clients/{clientId}/withdrawals/{withdrawalId}` when you need its amount, fees, transaction hash, or current state.
      required:
        - withdrawalId
        - status
        - clientId
      properties:
        withdrawalId:
          type: string
          format: uuid
          description: Withdrawal identifier (UUID).
          examples:
            - 9b4e2a1c-6d3f-4a8e-bc7d-1f2a3b4c5d6e
        status:
          $ref: "#/components/schemas/WithdrawalEventStatus"
          description: Withdrawal status at the time the event was emitted.
          examples:
            - COMPLETED
        externalReference:
          $ref: "#/components/schemas/ExternalReference"
          description: Your reference submitted on creation, where present.
          examples:
            - wd-2026-0714-01
        reasonCode:
          type: string
          description: "Present on `withdrawal.canceled` / `withdrawal.rejected` — the reason as reported by the bank, the network, or Axiym operations. Example: `INSUFFICIENT_BENEFICIARY_DETAILS`."
        clientId:
          type: string
          format: uuid
          description: Axiym identifier of the client that owns the resource.
          examples:
            - 1d2f7f5e-8a3b-4c6d-9e0f-2a4b6c8d0e2f
    AccountMovementEventData:
      type: object
      description: A posted account movement. The event includes the movement amount but not the current balance. Retrieve the account when you need its latest balance.
      required:
        - accountId
        - amount
        - currency
        - occurredAt
        - clientId
      properties:
        accountId:
          type: string
          format: uuid
          description: Account identifier (UUID).
          examples:
            - 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
        amount:
          allOf:
            - $ref: "#/components/schemas/Decimal"
          description: Positive movement amount in the account currency; direction is in the event type.
          examples:
            - "500.00"
        currency:
          $ref: "#/components/schemas/Currency"
          description: Account currency.
          examples:
            - USDT
        relatedResourceType:
          type: string
          description: Type of the linked money movement; absent for movements with no linked API resource.
          enum:
            - DEPOSIT
            - WITHDRAWAL
            - CONVERSION
            - PAYOUT
            - TRANSFER
          examples:
            - WITHDRAWAL
        relatedResourceId:
          type: string
          format: uuid
          description: Identifier of the linked resource, where present.
          examples:
            - 9b4e2a1c-6d3f-4a8e-bc7d-1f2a3b4c5d6e
        occurredAt:
          type: string
          format: date-time
          description: When the movement occurred. Formatted in ISO 8601.
          examples:
            - 2026-07-14T20:07:31Z
        clientId:
          type: string
          format: uuid
          description: Axiym identifier of the client that owns the resource.
          examples:
            - 1d2f7f5e-8a3b-4c6d-9e0f-2a4b6c8d0e2f
    AccountStatusEventData:
      type: object
      description: Account lifecycle notification.
      required:
        - accountId
        - status
        - clientId
      properties:
        accountId:
          type: string
          format: uuid
          description: Account identifier (UUID).
          examples:
            - 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
        status:
          $ref: "#/components/schemas/AccountStatus"
          description: Account status at the time the event was emitted.
          examples:
            - SUSPENDED
        clientId:
          type: string
          format: uuid
          description: Axiym identifier of the client that owns the resource.
          examples:
            - 1d2f7f5e-8a3b-4c6d-9e0f-2a4b6c8d0e2f
    DestinationEventData:
      type: object
      description: "Notification about the review or availability of an external account registered in the selected client's address book. `destinationId` identifies its address book entry."
      required:
        - destinationId
        - status
        - clientId
      properties:
        destinationId:
          type: string
          format: uuid
          description: "Identifier of the external account in the selected client's address book (UUID)."
          examples:
            - e2c8a4f6-7b1d-4e3a-9c5f-8a0b2d4e6f1c
        status:
          $ref: "#/components/schemas/DestinationStatus"
          description: "External account status at the time the event was emitted."
          examples:
            - ACTIVE
        clientId:
          type: string
          format: uuid
          description: "Axiym identifier of the client whose address book contains the external account."
          examples:
            - 1d2f7f5e-8a3b-4c6d-9e0f-2a4b6c8d0e2f
    Event:
      type: object
      description: Webhook event envelope delivered to your registered endpoint.
      required:
        - id
        - timestamp
        - type
        - data
      properties:
        id:
          type: string
          format: uuid
          description: "Unique event identifier. Repeated deliveries of the same event carry the same `id`; use it to avoid processing the event more than once."
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        timestamp:
          type: string
          format: date-time
          description: Event timestamp. Formatted in ISO 8601.
          examples:
            - 2026-07-14T20:08:00Z
        type:
          type: string
          description: Event type.
          examples:
            - withdrawal.completed
        data:
          type: object
          properties: {}
          description: Event data.
    Subscription:
      type: object
      properties:
        subscriptionId:
          type: string
          description: Subscription identifier (UUID).
          format: uuid
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        endpoint:
          type: string
          description: URL of the endpoint to subscribe to notifications. Must be publicly accessible, use HTTPS, and respond with a 2XX status to a POST request.
          title: ""
          format: uri
          examples:
            - https://api.acme.example/webhooks
      required:
        - subscriptionId
        - endpoint
    RequestStatus:
      type: object
      properties:
        status:
          type: string
          description: "`OK` means the test delivery request was accepted. It does not confirm successful delivery or processing by your endpoint."
          examples:
            - OK
          default: OK
          enum:
            - OK
      required:
        - status
    PublicKey:
      type: object
      properties:
        publicKeyId:
          type: string
          description: Public key identifier (UUID).
          format: uuid
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        active:
          type: boolean
          description: "Indicates whether the key is active."
          examples:
            - true
        algorithm:
          type: string
          description: "Signature algorithm associated with the public key."
          examples:
            - ED25519
        publicKey:
          type: string
          description: "Base64-encoded DER SubjectPublicKeyInfo (SPKI) public key used to verify webhook signatures."
          examples:
            - string
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp. Formatted in ISO 8601.
          examples:
            - 2026-07-14T20:08:00Z
      required:
        - publicKeyId
        - algorithm
        - publicKey
        - createdAt
        - active
    Money:
      type: object
      description: Monetary amount and its currency.
      additionalProperties: false
      required:
        - amount
        - currency
      properties:
        amount:
          $ref: "#/components/schemas/Decimal"
        currency:
          $ref: "#/components/schemas/Currency"
    Decimal:
      type: string
      description: Decimal number serialized as a string to preserve precision. Amounts sent to Axiym are positive and carry at most 8 decimal places.
      examples:
        - "1000.00"
    ExternalReference:
      type: string
      maxLength: 255
      description: |
        Your optional identifier for correlating the resource with your system. Axiym returns it on reads. It does not make retries safe; use `Idempotency-Key` for that.
      examples:
        - wd-2026-0714-01
    ValidationFieldErrors:
      description: Nested validation errors keyed by field name or array index. Leaf values are arrays of `ValidationError` objects.
      oneOf:
        - type: array
          items:
            $ref: "#/components/schemas/ValidationError"
        - type: object
          additionalProperties:
            $ref: "#/components/schemas/ValidationFieldErrors"
          properties: {}
    Network:
      type: string
      description: Wallet network.
      enum:
        - TRON
        - AVALANCHE
      examples:
        - TRON
    ValidationError:
      type: object
      description: One field-level validation error.
      properties:
        code:
          type: string
          description: "Identifier of the validation rule that failed, such as `length` or `invalid_currency`."
          examples:
            - length
        message:
          type:
            - string
            - "null"
          description: Human-readable message.
          examples:
            - string
        params:
          type: object
          description: Rule-specific parameters. Always includes `value` (the offending input). Additional keys depend on the rule (e.g. `min`, `max` for length).
          properties:
            value:
              description: The submitted value that failed validation.
              examples:
                - string
      required:
        - code
        - params
  responses:
    BadRequest:
      description: "The request is malformed or cannot be processed as supplied."
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                description: HTTP status code, duplicated in the body.
              message:
                type: string
                description: Human-readable message describing the error.
              errors:
                type:
                  - object
                  - "null"
                properties:
                  message:
                    type: string
                description: Additional error details; null when there are none.
            required:
              - code
              - message
              - errors
          examples:
            Malformed JSON body:
              summary: Malformed JSON body
              value:
                code: 400
                message: Bad Request
                errors:
                  message: "Failed to parse the request body as JSON: expected value at line 1 column 5"
            Generic:
              summary: Generic
              value:
                code: 400
                message: Invalid cursor
                errors: null
      headers:
        X-Request-Id:
          description: Unique id of this request (echoed from the request, or generated when omitted). Recorded in Axiym logs — quote it when contacting support about a failed request.
          schema:
            type: string
            format: uuid
            examples:
              - 3fa85f64-5717-4562-b3fc-2c963f66afa6
    Unauthorized:
      description: "Authentication is missing or invalid."
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                description: HTTP status code, duplicated in the body.
              message:
                type: string
                description: Human-readable message describing the error.
              errors:
                type:
                  - object
                  - "null"
                description: Additional error details; null when there are none.
            required:
              - code
              - message
              - errors
          examples:
            Example 1:
              summary: Example 1
              value:
                code: 401
                message: Unauthorized
                errors: null
      headers:
        X-Request-Id:
          description: Unique id of this request (echoed from the request, or generated when omitted). Recorded in Axiym logs — quote it when contacting support about a failed request.
          schema:
            type: string
            format: uuid
            examples:
              - 3fa85f64-5717-4562-b3fc-2c963f66afa6
    InternalError:
      description: "An unexpected server error prevented the request from completing."
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                description: HTTP status code, duplicated in the body.
              message:
                type: string
                description: Human-readable message describing the error.
              errors:
                type:
                  - object
                  - "null"
                description: Additional error details; null when there are none.
            required:
              - code
              - message
              - errors
          examples:
            Example 1:
              summary: Example 1
              value:
                code: 500
                message: Internal Error
                errors: null
      headers:
        X-Request-Id:
          description: Unique id of this request (echoed from the request, or generated when omitted). Recorded in Axiym logs — quote it when contacting support about a failed request.
          schema:
            type: string
            format: uuid
            examples:
              - 3fa85f64-5717-4562-b3fc-2c963f66afa6
    Forbidden:
      description: "Your access token does not permit this operation or access to the requested resource."
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                description: HTTP status code, duplicated in the body.
              message:
                type: string
                description: Human-readable message describing the error.
              errors:
                type:
                  - object
                  - "null"
                description: Additional error details; null when there are none.
            required:
              - code
              - message
              - errors
          examples:
            Example 1:
              summary: Example 1
              value:
                code: 403
                message: Forbidden
                errors: null
      headers:
        X-Request-Id:
          description: Unique id of this request (echoed from the request, or generated when omitted). Recorded in Axiym logs — quote it when contacting support about a failed request.
          schema:
            type: string
            format: uuid
            examples:
              - 3fa85f64-5717-4562-b3fc-2c963f66afa6
    NotFound:
      description: "The requested resource was not found."
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                description: HTTP status code, duplicated in the body.
              message:
                type: string
                description: "Human-readable message: either the generic 'Not Found' or a domain-specific one such as 'Client Not Found'."
              errors:
                type:
                  - object
                  - "null"
                description: Additional error details; null when there are none.
            required:
              - code
              - message
              - errors
          examples:
            Generic:
              summary: Generic
              value:
                code: 404
                message: Not Found
                errors: null
            Client not found:
              summary: Client not found
              value:
                code: 404
                message: Client Not Found
                errors: null
      headers:
        X-Request-Id:
          description: Unique id of this request (echoed from the request, or generated when omitted). Recorded in Axiym logs — quote it when contacting support about a failed request.
          schema:
            type: string
            format: uuid
            examples:
              - 3fa85f64-5717-4562-b3fc-2c963f66afa6
    InvalidParams:
      description: "The request failed validation or a business rule. Validation failures return `errors` keyed by request field. Business rejections return `errors: null` and explain the reason in `message`."
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                description: HTTP status code, duplicated in the body.
              message:
                type: string
                description: "`Invalid Parameters` for validation failures; the rejection reason otherwise."
              errors:
                type:
                  - object
                  - "null"
                description: For validation failures, keys follow the request fields and values contain field errors or nested errors. Business rejections return `null`.
                additionalProperties:
                  $ref: "#/components/schemas/ValidationFieldErrors"
            required:
              - code
              - message
              - errors
          examples:
            Flat field errors:
              summary: Flat field errors
              value:
                code: 422
                message: Invalid Parameters
                errors:
                  legalEntityName:
                    - code: length
                      message: null
                      params:
                        value: ""
                        min: 1
                  currency:
                    - code: invalid_currency
                      message: null
                      params:
                        value: ZZZ
            Nested struct errors:
              summary: Nested struct errors
              value:
                code: 422
                message: Invalid Parameters
                errors:
                  legalAddress:
                    country:
                      - code: invalid_country
                        message: null
                        params:
                          value: INVALID
                    postalCode:
                      - code: length
                        message: null
                        params:
                          value: ""
                          min: 1
            List item errors:
              summary: List item errors
              value:
                code: 422
                message: Invalid Parameters
                errors:
                  authorizedDirectors:
                    "0":
                      firstName:
                        - code: length
                          message: null
                          params:
                            value: ""
                            min: 1
                      email:
                        - code: email
                          message: null
                          params:
                            value: not-an-email
            Custom validator:
              summary: Custom validator
              value:
                code: 422
                message: Invalid Parameters
                errors:
                  disbursementAccount:
                    - code: disbursement_account_required
                      message: null
                      params:
                        value: null
            Business rejection:
              summary: Business rejection
              value:
                code: 422
                message: Documents Not Accepted
                errors: null
      headers:
        X-Request-Id:
          description: Unique id of this request (echoed from the request, or generated when omitted). Recorded in Axiym logs — quote it when contacting support about a failed request.
          schema:
            type: string
            format: uuid
            examples:
              - 3fa85f64-5717-4562-b3fc-2c963f66afa6
webhooks:
  withdrawal.created:
    post:
      tags:
        - Webhooks/Withdrawal
      summary: Created
      operationId: onWithdrawalCreated
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: withdrawal.created
                    data:
                      $ref: "#/components/schemas/WithdrawalEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  withdrawal.held:
    post:
      tags:
        - Webhooks/Withdrawal
      summary: Held
      operationId: onWithdrawalHeld
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: withdrawal.held
                    data:
                      $ref: "#/components/schemas/WithdrawalEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  withdrawal.completed:
    post:
      tags:
        - Webhooks/Withdrawal
      summary: Completed
      operationId: onWithdrawalCompleted
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: withdrawal.completed
                    data:
                      $ref: "#/components/schemas/WithdrawalEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  withdrawal.canceled:
    post:
      tags:
        - Webhooks/Withdrawal
      summary: Canceled
      operationId: onWithdrawalCanceled
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: withdrawal.canceled
                    data:
                      $ref: "#/components/schemas/WithdrawalEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  withdrawal.rejected:
    post:
      tags:
        - Webhooks/Withdrawal
      summary: Rejected
      operationId: onWithdrawalRejected
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: withdrawal.rejected
                    data:
                      $ref: "#/components/schemas/WithdrawalEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  account.credited:
    post:
      tags:
        - Webhooks/Account
      summary: Credited
      operationId: onAccountCredited
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: account.credited
                    data:
                      $ref: "#/components/schemas/AccountMovementEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  account.debited:
    post:
      tags:
        - Webhooks/Account
      summary: Debited
      operationId: onAccountDebited
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: account.debited
                    data:
                      $ref: "#/components/schemas/AccountMovementEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  account.activated:
    post:
      tags:
        - Webhooks/Account
      summary: Activated
      operationId: onAccountActivated
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: account.activated
                    data:
                      $ref: "#/components/schemas/AccountStatusEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  account.suspended:
    post:
      tags:
        - Webhooks/Account
      summary: Suspended
      operationId: onAccountSuspended
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: account.suspended
                    data:
                      $ref: "#/components/schemas/AccountStatusEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  account.closed:
    post:
      tags:
        - Webhooks/Account
      summary: Closed
      operationId: onAccountClosed
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: account.closed
                    data:
                      $ref: "#/components/schemas/AccountStatusEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  conversion.created:
    post:
      tags:
        - Webhooks/Conversion
      summary: Created
      operationId: onConversionCreated
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: conversion.created
                    data:
                      $ref: "#/components/schemas/ConversionEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  conversion.completed:
    post:
      tags:
        - Webhooks/Conversion
      summary: Completed
      operationId: onConversionCompleted
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: conversion.completed
                    data:
                      $ref: "#/components/schemas/ConversionEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  conversion.canceled:
    post:
      tags:
        - Webhooks/Conversion
      summary: Canceled
      operationId: onConversionCanceled
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: conversion.canceled
                    data:
                      $ref: "#/components/schemas/ConversionEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  deposit.created:
    post:
      tags:
        - Webhooks/Deposit
      summary: Created
      operationId: onDepositCreated
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: deposit.created
                    data:
                      $ref: "#/components/schemas/DepositEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  deposit.held:
    post:
      tags:
        - Webhooks/Deposit
      summary: Held
      operationId: onDepositHeld
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: deposit.held
                    data:
                      $ref: "#/components/schemas/DepositEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  deposit.completed:
    post:
      tags:
        - Webhooks/Deposit
      summary: Completed
      operationId: onDepositCompleted
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: deposit.completed
                    data:
                      $ref: "#/components/schemas/DepositEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  deposit.canceled:
    post:
      tags:
        - Webhooks/Deposit
      summary: Canceled
      operationId: onDepositCanceled
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: deposit.canceled
                    data:
                      $ref: "#/components/schemas/DepositEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  deposit.rejected:
    post:
      tags:
        - Webhooks/Deposit
      summary: Rejected
      operationId: onDepositRejected
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: deposit.rejected
                    data:
                      $ref: "#/components/schemas/DepositEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  destination.created:
    post:
      tags:
        - Webhooks/Address book entry
      summary: Address book entry created
      operationId: onDestinationCreated
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: destination.created
                    data:
                      $ref: "#/components/schemas/DestinationEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  destination.activated:
    post:
      tags:
        - Webhooks/Address book entry
      summary: Address book entry activated
      operationId: onDestinationActivated
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: destination.activated
                    data:
                      $ref: "#/components/schemas/DestinationEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  destination.suspended:
    post:
      tags:
        - Webhooks/Address book entry
      summary: Address book entry suspended
      operationId: onDestinationSuspended
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: destination.suspended
                    data:
                      $ref: "#/components/schemas/DestinationEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  destination.closed:
    post:
      tags:
        - Webhooks/Address book entry
      summary: Address book entry closed
      operationId: onDestinationClosed
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: destination.closed
                    data:
                      $ref: "#/components/schemas/DestinationEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  client.created:
    post:
      tags:
        - Webhooks/Client
      summary: Client created
      description: Sent when Axiym creates a client record for your partnership.
      operationId: onClientCreated
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: client.created
                    data:
                      $ref: "#/components/schemas/ClientEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  client.updated:
    post:
      tags:
        - Webhooks/Client
      summary: Client updated
      description: Sent when Axiym updates a client record. A disabled or archived update also emits `client.disabled`.
      operationId: onClientUpdated
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: client.updated
                    data:
                      $ref: "#/components/schemas/ClientEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  client.activated:
    post:
      tags:
        - Webhooks/Client
      summary: Client activated
      description: Sent when an onboarded client becomes available for Client Account API operations, including when a previously disabled client is re-enabled.
      operationId: onClientActivated
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: client.activated
                    data:
                      $ref: "#/components/schemas/ClientStatusEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  client.disabled:
    post:
      tags:
        - Webhooks/Client
      summary: Client disabled
      description: Sent when an onboarded client can no longer use Client Account API operations. Do not create new Client Account API resources for the client until `client.activated` is received.
      operationId: onClientDisabled
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: client.disabled
                    data:
                      $ref: "#/components/schemas/ClientStatusEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  client.onboarding-finished:
    post:
      tags:
        - Webhooks/Client
      summary: Client onboarding finished
      description: Deprecated legacy activation event. It is emitted alongside `client.activated` for the same activation moment until legacy integrators migrate.
      deprecated: true
      operationId: onClientOnboardingFinished
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: client.onboarding-finished
                    data:
                      $ref: "#/components/schemas/ClientOnboardingEventData"
      responses:
        "200":
          description: Acknowledged by your endpoint.
  subscription.test:
    post:
      tags:
        - Webhooks/Webhook subscription
      summary: Webhook subscription test
      description: Sent only when you request a test delivery for a webhook subscription.
      operationId: onSubscriptionTest
      security: []
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/Event"
                - type: object
                  properties:
                    type:
                      type: string
                      const: subscription.test
                    data:
                      type: object
                      required:
                        - test
                      properties:
                        test:
                          type: string
                          const: OK
                          description: Test delivery marker.
      responses:
        "200":
          description: Acknowledged by your endpoint.
