openapi: 3.1.0
info:
  title: Axiym Client Trade API
  version: 0.3.0
  description: |-
    Use the Client Trade API to manage balances and move funds on behalf of clients onboarded through your partnership. The partner access token identifies the partnership, and `clientId` identifies the client that owns each account, address book entry, deposit, conversion, and withdrawal.

    Webhook subscriptions are partnership-owned and deliver events for client-owned resources. Use the event `clientId` to route each event to the correct client context.
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 Trade API operations.
  - name: Accounts
    description: Axiym accounts and balances owned by the represented client.
  - name: Address Book
    description: External bank accounts and wallets owned by the represented client, registered as deposit sources and withdrawal recipients.
  - 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 `TRADE` scope and send the returned token as a bearer token on subsequent Client Trade API requests.
      deprecated: false
      tags:
        - Auth
      parameters:
        - $ref: "#/components/parameters/RequestId"
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                client_id:
                  type: string
                  examples:
                    - eb81336d-378a-4ab8-8c0e-a2f39ac0e87a
                  example: eb81336d-378a-4ab8-8c0e-a2f39ac0e87a
                client_secret:
                  type: string
                  examples:
                    - d5a9df2f93dba5f3def1e1d7585f476f054fe955a02e6b152f3145adce49c6ffc94be6ea7a2d7385f111f17541c1fe0239e8902b33e41fed7610098995081d3e59b2fe7ae2877dcbcdcd04c14cdfa298e85a079066d0b1e0eaaa978110ba300c7e8341b68c0d9a8deb03122f4504e6317b53b473c5917e4ae073422241f59120
                  example: d5a9df2f93dba5f3def1e1d7585f476f054fe955a02e6b152f3145adce49c6ffc94be6ea7a2d7385f111f17541c1fe0239e8902b33e41fed7610098995081d3e59b2fe7ae2877dcbcdcd04c14cdfa298e85a079066d0b1e0eaaa978110ba300c7e8341b68c0d9a8deb03122f4504e6317b53b473c5917e4ae073422241f59120
                grant_type:
                  type: string
                  examples:
                    - client_credentials
                  example: client_credentials
                scope:
                  type: string
                  enum:
                    - TRADE
                  examples:
                    - TRADE
                  example: TRADE
            example:
              client_id: eb81336d-378a-4ab8-8c0e-a2f39ac0e87a
              client_secret: d5a9df2f93dba5f3def1e1d7585f476f054fe955a02e6b152f3145adce49c6ffc94be6ea7a2d7385f111f17541c1fe0239e8902b33e41fed7610098995081d3e59b2fe7ae2877dcbcdcd04c14cdfa298e85a079066d0b1e0eaaa978110ba300c7e8341b68c0d9a8deb03122f4504e6317b53b473c5917e4ae073422241f59120
              grant_type: client_credentials
              scope: TRADE
        required: true
      responses:
        "201":
          description: ""
          content:
            application/json:
              schema:
                type: object
                properties:
                  token_type:
                    type: string
                  expires_in:
                    type: integer
                  access_token:
                    type: string
                  scope:
                    type: string
                required:
                  - token_type
                  - expires_in
                  - access_token
                  - scope
          headers: {}
        "400":
          $ref: "#/components/responses/BadRequest"
          description: ""
        "401":
          $ref: "#/components/responses/Unauthorized"
          description: ""
        "500":
          $ref: "#/components/responses/InternalError"
          description: ""
      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 owned by Axiym's compliance KYB flow. The client is visible in `GET /clients` after approval; 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 Trade 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 Trade 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
            default: 10
            maximum: 100
            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 an `ACTIVE` entry in that client's address book. Partner-owned and third-party accounts cannot be used.

        **Instruction type**

        - Bank instructions contain the receiving-bank details and, when present, an account-specific `reference`. Include the reference on the transfer.
        - Wallet instructions contain the wallet address and 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.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DepositInstruction"
              examples:
                Bank transfer:
                  summary: Bank transfer
                  value:
                    beneficiaryName: Axi Labs AG
                    accountNumber: "1050004921"
                    swiftBic: ZEITPRSJXXX
                    bankName: Zenus Bank International Inc.
                    reference: RF11 0004 4901 01
                Wallet transfer:
                  summary: Wallet transfer
                  value:
                    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 `ACTIVE` entries in that 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, credited account, amount, currency, and available bank or blockchain details.
      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:
                    amount: "10000.00"
                    currency: USD
                  externalReference: conv-2026-0714-01
              USDT to USD:
                summary: USDT → USD
                value:
                  pairId: 2b8d0c4e-6f1a-4d3c-8e5b-9a7c3f0d2e4a
                  sellAmount:
                    amount: "5000.00"
                    currency: USDT
                  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 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 entries in the client's address book: the external bank accounts and wallets registered for the client. Filter the results by currency or status.
        An `ACTIVE` account may fund the client's deposits and receive the client's withdrawals.
  /clients/{clientId}/address-book/bank-accounts:
    post:
      tags:
        - Address Book
      summary: Add a bank account
      operationId: createBankEntry
      description: |-
        Adds an external bank account owned by the selected client to the client's address book. Partner-owned and third-party accounts are not allowed.
        The account starts in `PENDING_REVIEW`. After it becomes `ACTIVE`, it may fund the client's deposits and receive the client's withdrawals. The `destination.activated` webhook reports this change.
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/RequestId"
        - $ref: "#/components/parameters/IdempotencyKey"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BankDestinationRequest"
      responses:
        "201":
          description: Bank account added to the client's address book and awaiting review.
          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: |-
        Adds an external wallet owned by the selected client to the client's address book. Partner-owned and third-party wallets are not allowed.
        The wallet starts in `PENDING_REVIEW`. After it becomes `ACTIVE`, it may fund the client's deposits and receive the client's withdrawals. The `destination.activated` webhook reports this change.
      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: Wallet address added to the client's address book and awaiting review.
          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 one entry from the client's address book, including its current status and payment details.
        An `ACTIVE` account may fund the client's deposits and receive the client's withdrawals. Its identifier is returned as `destinationId`.
      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 one of the client's address book entries.

        **Requirements**

        - `sourceAccountId` and `destinationId` must belong to the client.
        - Both accounts must be `ACTIVE` and use the same currency.
        - Partner-owned and third-party external accounts are not allowed.

        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
            default: 10
            maximum: 100
            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: ""
          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: ""
        "401":
          $ref: "#/components/responses/Unauthorized"
          description: ""
        "403":
          $ref: "#/components/responses/Forbidden"
          description: Forbidden
        "422":
          $ref: "#/components/responses/InvalidParams"
          description: ""
        "500":
          $ref: "#/components/responses/InternalError"
          description: ""
      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: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Subscription"
          headers: {}
        "400":
          $ref: "#/components/responses/BadRequest"
          description: ""
        "401":
          $ref: "#/components/responses/Unauthorized"
          description: ""
        "403":
          $ref: "#/components/responses/Forbidden"
          description: Forbidden
        "422":
          $ref: "#/components/responses/InvalidParams"
          description: ""
        "500":
          $ref: "#/components/responses/InternalError"
          description: ""
      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
            examples:
              - ""
        - $ref: "#/components/parameters/RequestId"
        - $ref: "#/components/parameters/IdempotencyKey"
      responses:
        "201":
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RequestStatus"
          headers: {}
        "400":
          $ref: "#/components/responses/BadRequest"
          description: ""
        "401":
          $ref: "#/components/responses/Unauthorized"
          description: ""
        "403":
          $ref: "#/components/responses/Forbidden"
          description: Forbidden
        "404":
          $ref: "#/components/responses/NotFound"
          description: ""
        "422":
          $ref: "#/components/responses/InvalidParams"
          description: ""
        "500":
          $ref: "#/components/responses/InternalError"
          description: ""
      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:
              - ""
        - $ref: "#/components/parameters/RequestId"
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Subscription"
          headers: {}
        "400":
          $ref: "#/components/responses/BadRequest"
          description: ""
        "401":
          $ref: "#/components/responses/Unauthorized"
          description: ""
        "403":
          $ref: "#/components/responses/Forbidden"
          description: Forbidden
        "404":
          $ref: "#/components/responses/NotFound"
          description: ""
        "422":
          $ref: "#/components/responses/InvalidParams"
          description: ""
        "500":
          $ref: "#/components/responses/InternalError"
          description: ""
      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
            examples:
              - ""
        - $ref: "#/components/parameters/RequestId"
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicKey"
          headers: {}
        "400":
          $ref: "#/components/responses/BadRequest"
          description: ""
        "401":
          $ref: "#/components/responses/Unauthorized"
          description: ""
        "403":
          $ref: "#/components/responses/Forbidden"
          description: Forbidden
        "404":
          $ref: "#/components/responses/NotFound"
          description: ""
        "422":
          $ref: "#/components/responses/InvalidParams"
          description: ""
        "500":
          $ref: "#/components/responses/InternalError"
          description: ""
      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 that makes a funds-moving request safe to retry. Reusing the key returns the original result instead of creating a duplicate. 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: Address book entry identifier (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 Trade 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 legal entity was established
          format: date
          examples:
            - '2020-01-15'
        registrationDate:
          type: string
          description: Date when the company registered / 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: Unique identifier from the partner side to maintain data mapping and ensure onboarding uniqueness.
          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 legal entity was established
          format: date
          examples:
            - '2020-01-15'
        registrationDate:
          type: string
          description: Date when the company registered / 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 own identifier 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. Once approved, the client appears in `GET /clients`; 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 legal entity was established
          format: date
          examples:
            - '2020-01-15'
        registrationDate:
          type: string
          description: Date when the company registered / 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 own identifier 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:
      type: object
      properties:
        city:
          type: string
          description: City portion of the address.
          examples:
            - New York
        country:
          type: string
          description: Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.
          examples:
            - US
        address:
          type: string
          description: Line one of the street address.
          examples:
            - 350 Fifth Avenue
        addressExtended:
          type: string
          description: Line two of the street address.
          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 / ZIP code of the address.
          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:
      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
          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/Money"
          description: Amount to sell. Its currency must be the sell currency of the pair.
        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 sold, in the sell currency.
        buyAccount:
          allOf:
            - $ref: "#/components/schemas/AccountRef"
          description: The buy-side account, embedded as a compact reference.
        buyAmount:
          allOf:
            - $ref: "#/components/schemas/Money"
          description: Amount bought and credited to the buy-side account.
        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: Fee charged, in the ISO 4217 currency of the pair. 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
        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 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: Amount credited to the account.
        fee:
          allOf:
            - $ref: "#/components/schemas/Money"
          description: Fee charged, when any.
        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 the account; the shape matches the account type.
      oneOf:
        - $ref: "#/components/schemas/BankDepositInstruction"
        - $ref: "#/components/schemas/WalletDepositInstruction"
    BankDepositInstruction:
      type: object
      title: Bank transfer
      required:
        - beneficiaryName
        - accountNumber
        - swiftBic
        - bankName
      properties:
        beneficiaryName:
          type: string
          description: Name of the receiving party to put on the transfer.
          examples:
            - Axi Labs AG
        accountNumber:
          type: string
          description: Receiving bank account number.
          examples:
            - "1050004921"
        swiftBic:
          type: string
          description: SWIFT/BIC code of the receiving bank.
          examples:
            - ZEITPRSJXXX
        bankName:
          type: string
          description: Receiving bank name.
          examples:
            - Zenus Bank International Inc.
        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
    WalletDepositInstruction:
      type: object
      title: Wallet transfer
      required:
        - walletAddress
        - network
      properties:
        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
    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 review. `ACTIVE` may fund deposits and receive withdrawals. `SUSPENDED` is temporarily unavailable. `CLOSED` is permanently retired.
      enum:
        - PENDING_REVIEW
        - ACTIVE
        - SUSPENDED
        - CLOSED
      examples:
        - ACTIVE
    AddressBookEntry:
      description: >-
        An address book entry — a registered external bank account or wallet owned by the client.
        The variant is signaled by its fields: a bank destination carries `accountNumber`
        and the `bank` block; a wallet destination carries `walletAddress` and `network`.
        The two sets never appear together.
      oneOf:
        - $ref: "#/components/schemas/BankAddressBookEntry"
        - $ref: "#/components/schemas/WalletAddressBookEntry"
    BankAddressBookEntry:
      type: object
      title: Bank account
      required:
        - destinationId
        - status
        - currency
        - accountNumber
        - bank
      properties:
        destinationId:
          type: string
          format: uuid
          description: Address book entry identifier (UUID).
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        status:
          $ref: "#/components/schemas/DestinationStatus"
          description: Address book entry status.
          examples:
            - ACTIVE
        currency:
          $ref: "#/components/schemas/Currency"
          description: Currency associated with the address book entry.
          examples:
            - USD
        accountNumber:
          type: string
          description: Bank account number.
          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: Address book entry identifier (UUID).
          examples:
            - e2c8a4f6-7b1d-4e3a-9c5f-8a0b2d4e6f1c
        status:
          $ref: "#/components/schemas/DestinationStatus"
          description: Address book entry status.
          examples:
            - ACTIVE
        currency:
          $ref: "#/components/schemas/Currency"
          description: Currency associated with the address book entry.
          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 `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
      required:
        - currency
        - accountNumber
        - bank
      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
        accountNumber:
          type: string
          description: Bank account number or 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: Add an owned external bank account to the address book as a permitted deposit source and withdrawal recipient. The entry starts in `PENDING_REVIEW`.
      required:
        - currency
        - accountNumber
        - bank
      properties:
        currency:
          $ref: "#/components/schemas/Currency"
          description: Currency associated with the external bank account.
          examples:
            - USD
        accountNumber:
          type: string
          description: Bank account number.
          examples:
            - "0123456789"
        bank:
          $ref: "#/components/schemas/Bank"
          description: Destination bank details.
    WalletDestinationRequest:
      type: object
      description: Add an owned external wallet to the address book as a permitted deposit source and withdrawal recipient. The entry starts in `PENDING_REVIEW`.
      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 — no action needed from you. `COMPLETED` is done. `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 debited from the source account, in the source account currency.
        destinationAmount:
          allOf:
            - $ref: "#/components/schemas/Money"
          description: Amount delivered to the destination, in the destination currency. Equals `sourceAmount` less `fee`.
        fee:
          allOf:
            - $ref: "#/components/schemas/Money"
          description: Total deducted from `sourceAmount` before delivery, in the source account currency. Zero when no fee applies.
        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 `sourceAccountId` to an address book entry. `sourceAmount` is debited from the source account in its currency. The `destinationId` 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 address book entry to pay. It must be `ACTIVE` and in 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 payout.
      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.
    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/WithdrawalStatus"
          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
          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: Address book entry lifecycle notification. The contract retains the `destinationId` field name and the `destination.*` event names.
      required:
        - destinationId
        - status
        - clientId
      properties:
        destinationId:
          type: string
          format: uuid
          description: Address book entry identifier (UUID).
          examples:
            - e2c8a4f6-7b1d-4e3a-9c5f-8a0b2d4e6f1c
        status:
          $ref: "#/components/schemas/DestinationStatus"
          description: Address book entry status when the event was emitted.
          examples:
            - ACTIVE
        clientId:
          type: string
          format: uuid
          description: Axiym identifier of the client that owns the resource.
          examples:
            - 1d2f7f5e-8a3b-4c6d-9e0f-2a4b6c8d0e2f
    Event:
      type: object
      description: Webhook event envelope delivered to your registered endpoint.
      required:
        - id
        - timestamp
        - data
      properties:
        id:
          type: string
          format: uuid
          description: Event ID. Use this for de-duplication.
          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: Request status.
          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: Encryption algorithm
          examples:
            - ED25519
        publicKey:
          type: string
          description: Public Key
          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: Validation rule code (e.g. 'length', 'email', 'invalid_currency', 'disbursement_account_required').
          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: ""
      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: ""
      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: ""
      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: Forbidden
      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: ""
      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.
