openapi: 3.1.0
info:
  title: Axiym Trade API
  version: 0.2.0
  description: |-
    Use the 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, registered external account, 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 Trade API operations.
  - name: Accounts
    description: Axiym accounts and balances owned by the represented client.
  - name: Registered External Accounts
    description: External bank accounts and wallets owned by the represented client.
  - 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 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 a KYB onboarding case for a client you represent. The client remains your customer; Axiym reviews the case before Trade API resources can be used for that client.

        This is the API onboarding route. You can instead complete the same onboarding process manually with Axiym. Trade-only onboarding does not include PNSL financial underwriting. A `partnerClientId` may identify only one onboarding case in your partnership; a new request using an existing value returns `409 Conflict`.
      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
                  partnerClientId: acme-sg-001
      responses:
        "201":
          description: Onboarding case accepted 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"
        "409":
          $ref: "#/components/responses/Conflict"
        "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 onboarding is approved, use the returned `clientId` in 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 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
                properties:
                  nodes:
                    type: array
                    items:
                      $ref: "#/components/schemas/Account"
              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
        "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` external account registered for that client. Partner-owned and third-party accounts cannot be used.

        **Instruction type**

        - Bank instructions contain the receiving-bank details and 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: TWd2yzw5yFc5W8Tq6CuNZcVJgfmLqf67gW
                    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` external accounts registered for that client.

        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: "10000.00"
                        buyAccount:
                          accountId: 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
                          currency: USDT
                          paymentRails: TRON
                        buyAmount: "9985.00"
                        rate: "1.00"
                        feeAmount: "15.00"
                        feeCurrency: 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: "5000.00"
                        buyAccount:
                          accountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                          currency: USD
                          paymentRails: ZENUS_BANK
                        buyAmount: "4992.50"
                        rate: "1.00"
                        feeAmount: "7.50"
                        feeCurrency: USD
                        externalReference: conv-2026-0714-02
                        createdAt: 2026-07-14T14:05:44Z
                    pageInfo:
                      hasNextPage: false
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "422":
          $ref: "#/components/responses/InvalidParams"
        "500":
          $ref: "#/components/responses/InternalError"
      description: |-
        Returns confirmed conversions created for the selected client. Filter the results by status or `externalReference`.
        An unconfirmed `PENDING` conversion appears only in the create response and is not included in this list.
    post:
      tags:
        - Conversions
      summary: Create conversion
      operationId: createConversion
      description: |-
        Creates a conversion quote for the selected client. Provide a permitted `pairId` and the amount to sell. The pair determines the client's sell and buy accounts.
        The response locks the rate and returns the expected `buyAmount`, fee, and expiry time with status `PENDING`.
        Confirm the conversion before it expires to begin execution. An unconfirmed conversion does not execute and cannot be retrieved later.
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/RequestId"
        - $ref: "#/components/parameters/IdempotencyKey"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ConversionRequest"
            examples:
              USD to USDT:
                summary: USD → USDT
                value:
                  pairId: 7c9e1a3b-5d2f-4e8a-9b0c-6d4f2a8e1c3b
                  sellAmount: "10000.00"
                  externalReference: conv-2026-0714-01
              USDT to USD:
                summary: USDT → USD
                value:
                  pairId: 2b8d0c4e-6f1a-4d3c-8e5b-9a7c3f0d2e4a
                  sellAmount: "5000.00"
                  externalReference: conv-2026-0714-02
      responses:
        "201":
          description: Conversion created with a locked rate, awaiting confirmation.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Conversion"
              examples:
                USD to USDT:
                  summary: USD → USDT, rate locked
                  value:
                    conversionId: a3f5d7c9-1e2b-4c6a-8d9f-0b1a2c3d4e5f
                    pairId: 7c9e1a3b-5d2f-4e8a-9b0c-6d4f2a8e1c3b
                    status: PENDING
                    sellAccount:
                      accountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                      currency: USD
                      paymentRails: ZENUS_BANK
                    sellAmount: "10000.00"
                    buyAccount:
                      accountId: 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
                      currency: USDT
                      paymentRails: TRON
                    buyAmount: "9985.00"
                    rate: "1.00"
                    feeAmount: "15.00"
                    feeCurrency: 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: "5000.00"
                    buyAccount:
                      accountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                      currency: USD
                      paymentRails: ZENUS_BANK
                    buyAmount: "4992.50"
                    rate: "1.00"
                    feeAmount: "7.50"
                    feeCurrency: 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: "10000.00"
                    buyAccount:
                      accountId: 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
                      currency: USDT
                      paymentRails: TRON
                    buyAmount: "9985.00"
                    rate: "1.00"
                    feeAmount: "15.00"
                    feeCurrency: 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: "5000.00"
                    buyAccount:
                      accountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                      currency: USD
                      paymentRails: ZENUS_BANK
                    buyAmount: "4992.50"
                    rate: "1.00"
                    feeAmount: "7.50"
                    feeCurrency: 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: "10000.00"
                    buyAccount:
                      accountId: 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
                      currency: USDT
                      paymentRails: TRON
                    buyAmount: "9985.00"
                    rate: "1.00"
                    feeAmount: "15.00"
                    feeCurrency: 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: "5000.00"
                    buyAccount:
                      accountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                      currency: USD
                      paymentRails: ZENUS_BANK
                    buyAmount: "4992.50"
                    rate: "1.00"
                    feeAmount: "7.50"
                    feeCurrency: 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}/whitelisted-own-accounts:
    get:
      tags:
        - Registered External Accounts
      summary: List registered external accounts
      operationId: listWhitelistedOwnAccounts
      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 registered external accounts.
          content:
            application/json:
              schema:
                type: object
                required:
                  - nodes
                  - pageInfo
                properties:
                  nodes:
                    type: array
                    items:
                      $ref: "#/components/schemas/Destination"
                  pageInfo:
                    $ref: "#/components/schemas/PageInfo"
              examples:
                Registered external accounts:
                  summary: A bank account and a wallet address
                  value:
                    nodes:
                      - destinationId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                        status: ACTIVE
                        currency: USD
                        accountNumber: "0123456789"
                        swiftBic: BOFAUS3NXXX
                        bankName: Bank of America
                        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 external bank accounts and wallets registered for the selected 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}/whitelisted-own-accounts/bank:
    post:
      tags:
        - Registered External Accounts
      summary: Register bank account
      operationId: createBankDestination
      description: |-
        Registers an external bank account owned by the selected client. 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: Client external bank account registered and awaiting review.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Destination"
              examples:
                Bank account:
                  summary: Bank account
                  value:
                    destinationId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                    status: PENDING_REVIEW
                    currency: USD
                    accountNumber: "0123456789"
                    swiftBic: BOFAUS3NXXX
                    bankName: Bank of America
                    createdAt: 2026-07-14T12:00: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}/whitelisted-own-accounts/wallet:
    post:
      tags:
        - Registered External Accounts
      summary: Register wallet address
      operationId: createWalletDestination
      description: |-
        Registers an external wallet owned by the selected client. 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: Client external wallet registered and awaiting review.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Destination"
              examples:
                Wallet address:
                  summary: Wallet address
                  value:
                    destinationId: e2c8a4f6-7b1d-4e3a-9c5f-8a0b2d4e6f1c
                    status: PENDING_REVIEW
                    currency: USDT
                    walletAddress: TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL
                    network: TRON
                    createdAt: 2026-07-14T12:00: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}/whitelisted-own-accounts/{destinationId}:
    get:
      tags:
        - Registered External Accounts
      summary: Get registered external account
      description: |-
        Returns one external bank account or wallet registered for the selected client, 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: getWhitelistedOwnAccount
      parameters:
        - $ref: "#/components/parameters/ClientId"
        - $ref: "#/components/parameters/DestinationId"
        - $ref: "#/components/parameters/RequestId"
      responses:
        "200":
          description: Client registered external account.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Destination"
              examples:
                Bank account:
                  summary: Bank account
                  value:
                    destinationId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                    status: ACTIVE
                    currency: USD
                    accountNumber: "0123456789"
                    swiftBic: BOFAUS3NXXX
                    bankName: Bank of America
                    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
      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:
              - acme-ref-00417
      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
      summary: Create withdrawal
      operationId: createWithdrawal
      description: |-
        Creates a withdrawal from the selected client's Axiym account to one of the client's registered external accounts.
        **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.
      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
                  amount: "500.00"
                  destinationId: e2c8a4f6-7b1d-4e3a-9c5f-8a0b2d4e6f1c
              Bank:
                summary: Bank
                value:
                  sourceAccountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                  amount: "12500.00"
                  destinationId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
      responses:
        "201":
          description: Withdrawal created.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Withdrawal"
              examples:
                Wallet:
                  summary: Wallet
                  value:
                    withdrawalId: 9b4e2a1c-6d3f-4a8e-bc7d-1f2a3b4c5d6e
                    status: PENDING
                    sourceAccount:
                      accountId: 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
                      currency: USDT
                      paymentRails: TRON
                    amount: "500.00"
                    feeAmount: "5.00"
                    currency: USDT
                    destination:
                      destinationId: e2c8a4f6-7b1d-4e3a-9c5f-8a0b2d4e6f1c
                      status: ACTIVE
                      currency: USDT
                      walletAddress: TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL
                      network: TRON
                      createdAt: 2026-06-12T14:05:00Z
                    code: AXI00000418
                    purpose: 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
                    sourceAccount:
                      accountId: 5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e
                      currency: USD
                      paymentRails: ZENUS_BANK
                    amount: "12500.00"
                    feeAmount: "25.00"
                    currency: USD
                    destination:
                      destinationId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                      status: ACTIVE
                      currency: USD
                      accountNumber: "0123456789"
                      swiftBic: BOFAUS3NXXX
                      bankName: Bank of America
                      createdAt: 2026-06-12T14:05:00Z
                    code: AXI00000419
                    purpose: 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
      summary: Get withdrawal
      description: Returns one withdrawal for the selected client, including its current status, source account, destination, amount, 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
                    amount: "500.00"
                    feeAmount: "5.00"
                    currency: USDT
                    destination:
                      destinationId: e2c8a4f6-7b1d-4e3a-9c5f-8a0b2d4e6f1c
                      status: ACTIVE
                      currency: USDT
                      walletAddress: TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL
                      network: TRON
                      createdAt: 2026-06-12T14:05:00Z
                    code: AXI00000418
                    transactionHash: "0x9f8e7d6c5b4a39281706f5e4d3c2b1a0998877665544332211ffeeddccbbaa00"
                    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
                    amount: "12500.00"
                    feeAmount: "25.00"
                    currency: USD
                    destination:
                      destinationId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                      status: ACTIVE
                      currency: USD
                      accountNumber: "0123456789"
                      swiftBic: BOFAUS3NXXX
                      bankName: Bank of America
                      createdAt: 2026-06-12T14:05:00Z
                    code: AXI00000419
                    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: Registered external-account 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 Trade API resources. The client must belong to your partnership; anyone else's id returns 404.
  schemas:
    OnboardingRequest:
      type: object
      description: Legal-entity information needed to start KYB onboarding for a represented client.
      required:
        - legalEntityName
        - incorporationDate
        - registrationDate
        - legalAddress
        - partnerClientId
      properties:
        legalEntityName:
          type: string
          description: Official registered name of the client business.
          examples:
            - Acme Corporation Pte. Ltd.
        incorporationDate:
          type: string
          format: date
          description: Date the legal entity was established.
          examples:
            - "2020-01-15"
        registrationDate:
          type: string
          format: date
          description: Date the client joined your organization or service.
          examples:
            - "2024-09-01"
        legalAddress:
          $ref: "#/components/schemas/Address"
          description: Client's registered legal address.
        partnerClientId:
          type: string
          description: Your stable identifier for the client. It must be unique within your partnership and is returned for correlation. A new onboarding request using an existing value returns `409 Conflict`.
          examples:
            - acme-sg-001
    OnboardingCase:
      type: object
      description: A Trade client KYB onboarding case. A client can use Trade API paths only after Axiym approves the case.
      required:
        - clientId
        - legalEntityName
        - partnerClientId
        - status
      properties:
        clientId:
          type: string
          format: uuid
          description: Axiym identifier assigned to the represented client. Use it in `/clients/{clientId}/...` paths after approval.
          examples:
            - 1d2f7f5e-8a3b-4c6d-9e0f-2a4b6c8d0e2f
        legalEntityName:
          type: string
          description: Official registered name of the client business.
          examples:
            - Acme Corporation Pte. Ltd.
        partnerClientId:
          type: string
          description: Your identifier for this client.
          examples:
            - acme-sg-001
        status:
          type: string
          description: Current onboarding state. `ONBOARDING` is under review; `ACTIVE` is ready for Trade API operations; `REJECTED` cannot use Trade API operations.
          enum:
            - ONBOARDING
            - ACTIVE
            - REJECTED
          examples:
            - ONBOARDING
        rejectionReason:
          type: string
          description: Reason Axiym provided when the case is rejected, where available.
          examples:
            - INCOMPLETE_KYB_INFORMATION
    Client:
      type: object
      description: A client record associated with your partnership. The record may be onboarding, active, or disabled; only an active client can use Trade API operations.
      required:
        - clientId
        - code
        - legalEntityName
        - legalAddress
        - incorporationDate
        - registrationDate
        - status
        - partnerClientId
      properties:
        clientId:
          type: string
          format: uuid
          description: Axiym identifier for this client. Use it in `/clients/{clientId}/...` paths.
          examples:
            - 1d2f7f5e-8a3b-4c6d-9e0f-2a4b6c8d0e2f
        code:
          type: string
          description: Human-readable Axiym client code.
          examples:
            - AXI000221
        legalEntityName:
          type: string
          description: Official registered name of the client business.
          examples:
            - Acme Corporation Pte. Ltd.
        legalAddress:
          $ref: "#/components/schemas/Address"
          description: Client's registered legal address.
        incorporationDate:
          type: string
          format: date
          description: Date the legal entity was established.
          examples:
            - "2020-01-15"
        registrationDate:
          type: string
          format: date
          description: Date the client joined your organization or service.
          examples:
            - "2024-09-01"
        status:
          type: string
          description: Current Axiym status. `ACTIVE` clients can use Trade API operations; `ONBOARDING` is under review and `DISABLED` cannot use them.
          enum:
            - ONBOARDING
            - ACTIVE
            - DISABLED
          examples:
            - ACTIVE
        partnerClientId:
          type: string
          description: Your stable identifier for this client.
          examples:
            - acme-sg-001
    Address:
      type: object
      description: Registered legal address of a business.
      required:
        - address
        - city
        - postalCode
        - country
      properties:
        address:
          type: string
          description: First address line.
          examples:
            - 10 Anson Road
        addressExtended:
          type: string
          description: Second address line, where applicable.
          examples:
            - "#12-01"
        city:
          type: string
          description: City or locality.
          examples:
            - Singapore
        district:
          type: string
          description: State, province, or region, where applicable.
          examples:
            - Central Singapore
        postalCode:
          type: string
          description: Postal or ZIP code.
          examples:
            - "079903"
        country:
          type: string
          pattern: "^[A-Z]{2}$"
          description: ISO 3166-1 alpha-2 country code.
          examples:
            - SG
    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 Axiym account that holds one currency on one payment rail. Retrieve its receiving details from `GET /clients/{clientId}/accounts/{accountId}/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:
            - "505.00"
        currency:
          $ref: "#/components/schemas/Currency"
          description: Account currency.
          examples:
            - USD
        balanceBefore:
          allOf:
            - $ref: "#/components/schemas/Decimal"
          description: Running balance before this movement.
          examples:
            - "48250.00"
        balanceAfter:
          allOf:
            - $ref: "#/components/schemas/Decimal"
          description: Running balance after this movement.
          examples:
            - "47745.00"
        relatedResourceType:
          type: string
          description: Type of the linked money movement; absent for ledger adjustments with no linked resource.
          enum:
            - DEPOSIT
            - WITHDRAWAL
            - CONVERSION
          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-06-14T20:07:31Z
    ConversionStatus:
      type: string
      description: |
        `PENDING` awaits confirmation and appears only in the create response. `ACTIVE` is executing. `COMPLETED` means the funds were exchanged. `CANCELED` means the conversion stopped; see `reasonCode`.
      enum:
        - PENDING
        - ACTIVE
        - COMPLETED
        - CANCELED
      examples:
        - PENDING
    ConversionPair:
      type: object
      description: An allowed exchange direction. You sell the `sell` side and buy the `buy` side. Use its stable `pairId` to create a conversion; Axiym selects the corresponding accounts.
      required:
        - pairId
        - pair
        - sell
        - buy
        - minAmount
      properties:
        pairId:
          type: string
          format: uuid
          description: Conversion pair identifier (UUID), stable for the pair and direction.
          examples:
            - 7c9e1a3b-5d2f-4e8a-9b0c-6d4f2a8e1c3b
        pair:
          type: string
          description: Pair symbol, `<sellCurrency>-<buyCurrency>`.
          examples:
            - USD-USDT
        sell:
          allOf:
            - $ref: "#/components/schemas/ConversionPairSide"
          description: The side you sell.
        buy:
          allOf:
            - $ref: "#/components/schemas/ConversionPairSide"
          description: The side you buy.
        minAmount:
          allOf:
            - $ref: "#/components/schemas/Decimal"
          description: Minimum sell amount, in the sell currency.
    ConversionPairSide:
      type: object
      description: One side of a conversion pair.
      required:
        - currency
        - paymentRails
      properties:
        currency:
          $ref: "#/components/schemas/Currency"
          description: Side currency.
          examples:
            - USD
        paymentRails:
          $ref: "#/components/schemas/PaymentRailsCode"
          description: Rail the side settles on.
          examples:
            - ZENUS_BANK
    ConversionRequest:
      type: object
      description: |
        A conversion along one of your conversion pairs. `pairId` selects the accounts on both sides; `sellAmount` is in the pair's sell currency.
      required:
        - pairId
        - sellAmount
      properties:
        pairId:
          type: string
          format: uuid
          description: Conversion pair identifier from `GET /clients/{clientId}/conversion-pairs`.
          examples:
            - 7c9e1a3b-5d2f-4e8a-9b0c-6d4f2a8e1c3b
        sellAmount:
          allOf:
            - $ref: "#/components/schemas/Decimal"
          description: Amount to sell, in the pair's sell currency.
          examples:
            - "10000.00"
        externalReference:
          $ref: "#/components/schemas/ExternalReference"
          description: Your reference for correlation, echoed back on related objects.
          examples:
            - conv-2026-0714-01
    Conversion:
      type: object
      required:
        - conversionId
        - pairId
        - status
        - sellAccount
        - sellAmount
        - buyAccount
        - buyAmount
        - rate
        - feeAmount
        - feeCurrency
        - 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/Decimal"
          description: Amount sold, in the sell currency.
          examples:
            - "10000.00"
        buyAccount:
          allOf:
            - $ref: "#/components/schemas/AccountRef"
          description: The buy-side account, embedded as a compact reference.
        buyAmount:
          allOf:
            - $ref: "#/components/schemas/Decimal"
          description: Amount bought and credited to the buy-side account, net of fee.
          examples:
            - "9985.00"
        rate:
          allOf:
            - $ref: "#/components/schemas/Decimal"
          description: Units of buy currency received for one unit of sell currency.
          examples:
            - "1.00"
        feeAmount:
          allOf:
            - $ref: "#/components/schemas/Decimal"
          description: Fee charged in the pair's ISO 4217 currency. It is deducted from the sell amount when buying digital currency and from the buy proceeds when selling it.
          examples:
            - "15.00"
        feeCurrency:
          $ref: "#/components/schemas/Currency"
          description: Currency of the fee — always the ISO 4217 currency of the pair.
          examples:
            - USD
        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
        - currency
      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/Decimal"
          description: Amount credited to the account, before fee.
          examples:
            - "1000.00"
        feeAmount:
          allOf:
            - $ref: "#/components/schemas/Decimal"
          description: Fee charged.
          examples:
            - "0.00"
        currency:
          $ref: "#/components/schemas/Currency"
          description: Account currency.
          examples:
            - USD
        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:
            - "0x9f8e7d6c5b4a39281706f5e4d3c2b1a0998877665544332211ffeeddccbbaa00"
        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
        - reference
      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 to this account, formatted in groups of four. Include it on the transfer so the deposit is matched automatically; matching ignores the spaces.
          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:
            - TWd2yzw5yFc5W8Tq6CuNZcVJgfmLqf67gW
        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
    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
    Destination:
      description: A registered external bank account or wallet; the shape matches the account type.
      oneOf:
        - $ref: "#/components/schemas/BankDestination"
        - $ref: "#/components/schemas/WalletDestination"
    BankDestination:
      type: object
      title: Bank account
      required:
        - destinationId
        - status
        - currency
        - accountNumber
        - swiftBic
        - bankName
      properties:
        destinationId:
          type: string
          format: uuid
          description: Registered external-account identifier (UUID).
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        status:
          $ref: "#/components/schemas/DestinationStatus"
          description: Registered external-account status.
          examples:
            - ACTIVE
        currency:
          $ref: "#/components/schemas/Currency"
          description: Currency associated with the registered external account.
          examples:
            - USD
        accountNumber:
          type: string
          description: Bank account number.
          examples:
            - "0123456789"
        swiftBic:
          type: string
          description: SWIFT/BIC code.
          examples:
            - BOFAUS3NXXX
        bankName:
          type: string
          description: Bank name.
          examples:
            - Bank of America
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp. Formatted in ISO 8601.
          examples:
            - 2026-06-12T14:05:00Z
    WalletDestination:
      type: object
      title: Wallet address
      required:
        - destinationId
        - status
        - currency
        - walletAddress
        - network
      properties:
        destinationId:
          type: string
          format: uuid
          description: Registered external-account identifier (UUID).
          examples:
            - e2c8a4f6-7b1d-4e3a-9c5f-8a0b2d4e6f1c
        status:
          $ref: "#/components/schemas/DestinationStatus"
          description: Registered external-account status.
          examples:
            - ACTIVE
        currency:
          $ref: "#/components/schemas/Currency"
          description: Currency associated with the registered external account.
          examples:
            - USDT
        walletAddress:
          type: string
          description: Wallet address of the registered external account; 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
    BankDestinationRequest:
      type: object
      description: Register an owned external bank account as a permitted deposit source and withdrawal recipient. The registered account starts in `PENDING_REVIEW`.
      required:
        - currency
        - accountNumber
        - swiftBic
        - bankName
      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"
        swiftBic:
          type: string
          description: SWIFT/BIC code.
          examples:
            - BOFAUS3NXXX
        bankName:
          type: string
          description: Bank name.
          examples:
            - Bank of America
    WalletDestinationRequest:
      type: object
      description: Register an owned external wallet as a permitted deposit source and withdrawal recipient. The registered wallet 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` awaiting execution, `HELD` temporarily on hold — no action needed from you, `COMPLETED` done, `CANCELED`/`REJECTED` not completed (see `reasonCode`).
      enum:
        - PENDING
        - HELD
        - COMPLETED
        - CANCELED
        - REJECTED
      examples:
        - PENDING
    Withdrawal:
      type: object
      required:
        - withdrawalId
        - sourceAccount
        - amount
        - destination
        - status
        - createdAt
        - currency
      properties:
        withdrawalId:
          type: string
          format: uuid
          description: Withdrawal identifier (UUID).
          examples:
            - 9b4e2a1c-6d3f-4a8e-bc7d-1f2a3b4c5d6e
        sourceAccount:
          allOf:
            - $ref: "#/components/schemas/AccountRef"
          description: The sell-side account, embedded as a compact reference.
        amount:
          allOf:
            - $ref: "#/components/schemas/Decimal"
          description: Amount sent to the registered external account, before fee.
          examples:
            - "500.00"
        feeAmount:
          allOf:
            - $ref: "#/components/schemas/Decimal"
          description: Fee charged.
          examples:
            - "1.00"
        currency:
          $ref: "#/components/schemas/Currency"
          description: Currency code (ISO 4217 or a supported digital currency).
          examples:
            - USD
        destination:
          allOf:
            - $ref: "#/components/schemas/Destination"
          description: The registered external account selected by `destinationId`, embedded in full.
        status:
          $ref: "#/components/schemas/WithdrawalStatus"
          description: Withdrawal status.
          examples:
            - COMPLETED
        code:
          type: string
          description: System-assigned payment code, shown on the payment.
          examples:
            - AXI00000418
        purpose:
          type: string
          description: Free-text purpose of the payment, as submitted.
          examples:
            - Invoice INV-20416
        externalReference:
          $ref: "#/components/schemas/ExternalReference"
          description: Your reference for correlation, echoed back on related objects.
          examples:
            - wd-2026-0614-01
        transactionHash:
          type: string
          description: The transaction hash on the network. Present for wallet withdrawals once the withdrawal is `COMPLETED`.
          examples:
            - "0x9f8e7d6c5b4a39281706f5e4d3c2b1a0998877665544332211ffeeddccbbaa00"
        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-06-14T20:06:50Z
    WithdrawalRequest:
      type: object
      description: |
        A withdrawal from `sourceAccountId` to a registered external account. `amount` uses the source account's currency. The `destinationId` must be `ACTIVE` and use the same currency.
      required:
        - sourceAccountId
        - amount
        - destinationId
      properties:
        sourceAccountId:
          type: string
          format: uuid
          description: Source account identifier (UUID).
          examples:
            - 8f1d4a2c-3b5e-4c7a-9d1f-2a6b8c0e4d3a
        amount:
          allOf:
            - $ref: "#/components/schemas/Decimal"
          description: Amount to send, before fee. In the source account's currency.
          examples:
            - "500.00"
        destinationId:
          type: string
          format: uuid
          description: Identifier of the registered external bank account or wallet to pay. It must be `ACTIVE` and in the source Axiym account's currency.
          examples:
            - e2c8a4f6-7b1d-4e3a-9c5f-8a0b2d4e6f1c
        purpose:
          type: string
          description: Free-text purpose of the payment.
          examples:
            - Invoice INV-20416
        externalReference:
          $ref: "#/components/schemas/ExternalReference"
          description: Your reference for correlation, echoed back on related objects.
          examples:
            - wd-2026-0614-01
    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:
            - "1000.00"
        currency:
          $ref: "#/components/schemas/Currency"
          description: Account currency.
          examples:
            - USD
        relatedResourceType:
          type: string
          description: Type of the linked money movement; absent for movements with no linked API resource.
          enum:
            - DEPOSIT
            - WITHDRAWAL
            - CONVERSION
          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-06-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: Registered external-account lifecycle notification. The contract retains the `destinationId` field name.
      required:
        - destinationId
        - status
        - clientId
      properties:
        destinationId:
          type: string
          format: uuid
          description: Registered external-account identifier (UUID).
          examples:
            - e2c8a4f6-7b1d-4e3a-9c5f-8a0b2d4e6f1c
        status:
          $ref: "#/components/schemas/DestinationStatus"
          description: Registered external-account 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-06-23T14:05:09Z
        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-06-23T14:05:09Z
      required:
        - publicKeyId
        - algorithm
        - publicKey
        - createdAt
        - active
    Decimal:
      type: string
      description: Decimal number serialized as a string to preserve precision.
      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:
        - acme-cl-00417
    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:
            - AXI000221
        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:
    Conflict:
      description: An onboarding case already exists for the supplied `partnerClientId` in this partnership.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - message
              - errors
            properties:
              code:
                type: integer
                description: HTTP status code, duplicated in the body.
              message:
                type: string
                description: Human-readable conflict reason.
              errors:
                type:
                  - object
                  - "null"
                description: Additional error details; null when there are none.
          examples:
            Existing partner client ID:
              value:
                code: 409
                message: Client onboarding already exists for this partnerClientId
                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
    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/Registered external account
      summary: Registered external account 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/Registered external account
      summary: Registered external account 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/Registered external account
      summary: Registered external account 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/Registered external account
      summary: Registered external account 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.
