---
openapi: 3.0.3
info:
  title: Cybrid Bank API
  termsOfService: https://www.cybrid.xyz/tos
  description: "# Cybrid API documentation\n\nWelcome to Cybrid, an all-in-one crypto
    platform that enables you to easily **build** and **launch** white-label crypto
    products or services.\n\nIn these documents, you'll find details on how our REST
    API operates and generally how our platform functions.\n\nIf you're looking for
    our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or
    demo applications, head over to our [Github repo](https://github.com/Cybrid-app).\n\n\U0001F4A1
    We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies)
    which contains many helpful links to platform resources.\n\n## Getting Started\n\nThis
    is Cybrid's public interactive API documentation, which allows you to fully test
    our APIs. If you'd like to use a different tool to exercise our APIs, you can
    download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml)
    for import.\n\nIf you're new to our APIs and the Cybrid Platform, follow the below
    guides to get set up and familiar with the platform:\n\n1. [Introduction](https://docs.cybrid.xyz/docs/introduction)\n2.
    [Platform Overview](https://docs.cybrid.xyz/docs/platform-overview)\n3. [Testing
    with Hosted Web Demo App](https://docs.cybrid.xyz/docs/hosted-demo-app)\n\nIn
    [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/cybrid-sandbox),
    we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/)
    to create a test bank and generate API keys. In [Getting Ready for Trading](https://docs.cybrid.xyz/docs/trade-process),
    we walk through creating customers, customer identities, accounts, as well as
    executing quotes and trades.\n\n## Working with the Cybrid Platform\n\nThere are
    three primary ways you can interact with the Cybrid platform:\n\n1. Directly via
    our RESTful API (this documentation)\n2. Using our API clients available in a
    variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular),
    [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin),
    [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby),
    [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript))\n3.
    Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web),
    [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios))\n\nOur
    complete set of APIs allows you to manage resources across three distinct areas:
    your `Organization`, your `Banks` and your `Identities`. For most of your testing
    and interaction you'll be using the `Bank` API, which is where the majority of
    APIs reside.\n\n*The complete set of APIs can be found on the following pages:*\n\n|
    API                                                              | Description
    \                                                |\n|------------------------------------------------------------------|-------------------------------------------------------------|\n|
    [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui)
    \  | APIs to manage organizations                                |\n| [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui)
    \                  | APIs to manage banks (and all downstream customer activity)
    |\n| [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui)
    \                      | APIs to manage organization and bank identities             |\n\nFor
    questions please contact [Support](mailto:support@cybrid.xyz) at any time for
    assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product
    suggestions.\n\n## Authenticating with the API\n\nThe Cybrid Platform uses OAuth
    2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create
    `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app).
    Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app)
    as well.\n\nAn `Organization` access token applies broadly to the whole Organization
    and all of its `Banks`, whereas, a `Bank` access token is specific to an individual
    Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank.\n\nBoth
    `Organization` and `Bank` tokens can be created using the OAuth Client Credential
    Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret`
    that allows for machine-to-machine authentication.\n\nA `Bank` can then generate
    `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui).\n\n<font
    color=\"orange\">**⚠️ Never share your Client ID or Secret publicly or in your
    source code repository.**</font>\n\nYour `Client ID` and `Secret` can be exchanged
    for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider
    or through interacting with the **Authorize** button in this document.\n\nThe
    following curl command can be used to quickly generate a `Bearer Token` for use
    in testing the API or demo applications.\n\n```\n# Example request when using
    Bank credentials\ncurl -X POST https://id.production.cybrid.app/oauth/token -d
    '{\n    \"grant_type\": \"client_credentials\",\n    \"client_id\": \"<Your Client
    ID>\",\n    \"client_secret\": \"<Your Secret>\",\n    \"scope\": \"banks:read
    banks:write bank_applications:read bank_applications:write bank_applications:execute
    accounts:read accounts:execute counterparties:read counterparties:pii:read counterparties:write
    counterparties:execute customers:read customers:pii:read customers:write customers:execute
    prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute
    transfers:read transfers:write external_bank_accounts:read external_bank_accounts:pii:read
    external_bank_accounts:write external_bank_accounts:execute external_wallets:read
    external_wallets:execute workflows:read workflows:execute deposit_addresses:read
    deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute
    invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:pii:read
    identity_verifications:write identity_verifications:execute persona_sessions:execute
    plans:execute plans:read executions:execute executions:read files:read files:pii:read
    files:execute\"\n  }' -H \"Content-Type: application/json\"\n\n# When using Organization
    credentials set `scope` to 'organizations:read organizations:write organization_applications:read
    organization_applications:write organization_applications:execute banks:read banks:write
    banks:execute bank_applications:read bank_applications:write bank_applications:execute
    users:read users:write users:execute counterparties:read counterparties:pii:read
    customers:read customers:pii:read accounts:read prices:read quotes:execute quotes:read
    trades:execute trades:read transfers:read transfers:write transfers:execute external_bank_accounts:read
    external_bank_accounts:pii:read external_wallets:read workflows:read deposit_addresses:read
    deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write
    subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read
    identity_verifications:pii:read identity_verifications:execute persona_sessions:execute
    plans:execute plans:read executions:execute executions:read files:read files:pii:read
    files:execute'\n```\n<font color=\"orange\">**⚠️ Note: The above curl will create
    a bearer token with full scope access. Delete scopes if you'd like to restrict
    access.**</font>\n\n## Authentication Scopes\n\nThe Cybrid platform supports the
    use of scopes to control the level of access a token is limited to. Scopes do
    not grant access to resources; instead, they provide limits, in support of the
    least privilege principal.\n\nThe following scopes are available on the platform
    and can be requested when generating either an Organization, Bank or Customer
    token. Generally speaking, the _Read_ scope is required to read and list resources,
    the _Write_ scope is required to update a resource and the _Execute_ scope is
    required to create a resource.\n\n| Resource              | Read scope (Token
    Type)                                    | Write scope (Token Type)                      |
    Execute scope (Token Type)                       |\n|-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------|\n|
    Account               | accounts:read (Organization, Bank, Customer)               |
    \                                              | accounts:execute (Bank, Customer)
    \               |\n| Bank                  | banks:read (Organization, Bank)                            |
    banks:write (Organization, Bank)              | banks:execute (Organization)                     |\n|
    Customer              | customers:read (Organization, Bank, Customer)              |
    customers:write (Bank, Customer)              | customers:execute (Bank)                         |\n|
    Counterparty          | counterparties:read (Organization, Bank, Customer)         |
    counterparties:write (Bank, Customer)         | counterparties:execute (Bank)
    \                   |\n| Deposit Address       | deposit_addresses:read (Organization,
    Bank, Customer)      | deposit_addresses:write (Bank, Customer)      | deposit_addresses:execute
    (Bank, Customer)       |\n| External Bank Account | external_bank_accounts:read
    (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer)
    | external_bank_accounts:execute (Bank, Customer)  |\n| External Wallet       |
    external_wallet:read (Organization, Bank, Customer)        |                                               |
    external_wallet:execute (Bank, Customer)         |\n| Organization          |
    organizations:read (Organization)                          | organizations:write
    (Organization)            |                                                  |\n|
    User                  | users:read (Organization)                                  |
    \                                              | users:execute (Organization)
    \                    |\n| Price                 | prices:read (Bank, Customer)
    \                              |                                               |
    \                                                 |\n| Quote                 |
    quotes:read (Organization, Bank, Customer)                 |                                               |
    quotes:execute (Organization, Bank, Customer)    |\n| Trade                 |
    trades:read (Organization, Bank, Customer)                 |                                               |
    trades:execute (Organization, Bank, Customer)    |\n| Transfer              |
    transfers:read (Organization, Bank, Customer)              |                                               |
    transfers:execute (Organization, Bank, Customer) |\n| Workflow              |
    workflows:read (Organization, Bank, Customer)              |                                               |
    workflows:execute (Bank, Customer)               |\n| Invoice               |
    invoices:read (Organization, Bank, Customer)               | invoices:write (Bank,
    Customer)               | invoices:execute (Bank, Customer)                |\n\n##
    Available Endpoints\n\nThe available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui),
    [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui)
    and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services
    are listed below:\n\n| API Service  | Model                | API Endpoint Path
    \             | Description                                                                                       |\n|--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------|\n|
    Identity     | Bank                 | /api/bank_applications         | Create
    and list banks                                                                             |\n|
    Identity     | CustomerToken        | /api/customer_tokens           | Create
    customer JWT access tokens                                                                 |\n|
    Identity     | Organization         | /api/organization_applications | Create
    and list organizations                                                                     |\n|
    Identity     | Organization         | /api/users                     | Create
    and list organization users                                                                |\n|
    Organization | Organization         | /api/organizations             | APIs to
    retrieve and update organization name                                                     |\n|
    Bank         | Account              | /api/accounts                  | Create
    and list accounts, which hold a specific asset for a customers                             |\n|
    Bank         | Asset                | /api/assets                    | Get a list
    of assets supported by the platform (ex: BTC, ETH)                                     |\n|
    Bank         | Bank                 | /api/banks                     | Create,
    update and list banks, the parent to customers, accounts, etc                             |\n|
    Bank         | Customer             | /api/customers                 | Create
    and list customers                                                                         |\n|
    Bank         | Counterparty         | /api/counterparties            | Create
    and list counterparties                                                                    |\n|
    Bank         | DepositAddress       | /api/deposit_addresses         | Create,
    get and list deposit addresses                                                            |\n|
    Bank         | ExternalBankAccount  | /api/external_bank_accounts    | Create,
    get and list external bank accounts, which connect customer bank accounts to the
    platform |\n| Bank         | ExternalWallet       | /api/external_wallets          |
    Create, get, list and delete external wallets, which connect customer wallets
    to the platform     |\n| Bank         | IdentityVerification | /api/identity_verifications
    \   | Create and list identity verifications, which are performed on customers
    for KYC                  |\n| Bank         | Invoice              | /api/invoices
    \                 | Create, get, cancel and list invoices                                                             |\n|
    Bank         | PaymentInstruction   | /api/payment_instructions      | Create,
    get and list payment instructions for invoices                                            |\n|
    Bank         | Price                | /api/prices                    | Get the
    current prices for assets on the platform                                                 |\n|
    Bank         | Quote                | /api/quotes                    | Create
    and list quotes, which are required to execute trades                                      |\n|
    Bank         | Symbol               | /api/symbols                   | Get a list
    of symbols supported for trade (ex: BTC-USD)                                           |\n|
    Bank         | Trade                | /api/trades                    | Create
    and list trades, which buy or sell cryptocurrency                                          |\n|
    Bank         | Transfer             | /api/transfers                 | Create,
    get and list transfers (e.g., funding, book)                                              |\n|
    Bank         | Workflow             | /api/workflows                 | Create,
    get and list workflows                                                                    |\n\n##
    Understanding Object Models & Endpoints\n\n**Organizations**\n\nAn `Organization`
    is meant to represent the organization partnering with Cybrid to use our platform.\n\nAn
    `Organization` typically does not directly interact with `customers`. Instead,
    an Organization has one or more `banks`, which encompass the financial service
    offerings of the platform.\n\n**Banks**\n\nA `Bank` is owned by an `Organization`
    and can be thought of as an environment or container for `customers` and product
    offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox`
    is the environment that you would test, prototype and build in prior to moving
    to `Production`.\n\nAn `Organization` can have multiple `banks`, in either `Sandbox`
    or `Production` environments. A `Sandbox Bank` will be backed by stubbed data
    and process flows. For instance, funding source transfer processes as well as
    trades will be simulated rather than performed, however asset prices are representative
    of real-world values. You have an unlimited amount of simulated fiat currency
    for testing purposes.\n\n**Customers**\n\n`Customers` represent your banking users
    on the platform. At present, we offer support for `Individuals` as Customers.\n\n`Customers`
    must be verified (i.e., KYC'd) in our system before they can play any part on
    the platform, which means they must have an associated and a passing `Identity
    Verification`. See the Identity Verifications section for more details on how
    a customer can be verified.\n\n`Customers` must also have an `Account` to be able
    to transact, in the desired asset class. See the Accounts APIs for more details
    on setting up accounts for the customer.\n"
  version: v0.129.47
  contact:
    name: Cybrid Support
    email: support@cybrid.app
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
paths:
  "/api/accounts":
    post:
      summary: Create Account
      tags:
      - Accounts
      operationId: createAccount
      description: "Creates an account.\n\n## Account Type\n\nAn Account is tied to
        a specific cryptocurrency or fiat and is comprised of transactions and a current
        balance.\n\nAn account is required to allow a Bank or Customer to hold cryptocurrency
        or a Customer to hold fiat on the Cybrid Platform.\n\nAt present, accounts
        can be created as `trading`, `storage` or `fiat ` accounts and are required
        before a Customer can generate quotes or execute a `trade` or `transfer`.\n\nTo
        create accounts for your Bank, omit the `customer_guid` parameter in the request
        body. To create accounts for your Customers, include the `customer_guid` parameter
        in the request body.\n\nAt the bank level, `invoice_operations` accounts can
        be configured to pre-fund your customers' Lightning Network operations.\n\n##
        Asset\n\nThe asset is the specific cryptocurrency or fiat that the account
        holds, e.g., 'BTC' for Bitcoin or `USD` for US dollars. See the Symbols API
        for a complete list of cryptocurrencies and fiat supported. \n\n## State\n\n|
        State | Description |\n|-------|-------------|\n| storing | The Platform is
        storing the account details in our private store |\n| created | The Platform
        has created the account |\n\n\n\nRequired scope: **accounts:execute**"
      security:
      - BearerAuth: []
        oauth2:
        - accounts:execute
      parameters: []
      responses:
        '201':
          description: account created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Account"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                missing_parameter:
                  value:
                    status: 400
                    error_message: 'Missing parameter. Required: type, customer_guid,
                      asset, name'
                    message_code: missing_parameter
                invalid_parameter_value:
                  value:
                    status: 400
                    error_message: 'Invalid value exception. Parameter: type supported
                      values: ["trading"] '
                    message_code: invalid_value
                invalid_value:
                  value:
                    status: 400
                    error_message: name must be at the most 128 characters long
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: accounts:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PostAccount"
        required: true
    get:
      summary: List Accounts
      tags:
      - Accounts
      operationId: listAccounts
      description: |-
        Retrieves a list of accounts. Records are sorted by creation date in descending order.

        Required scope: **accounts:read**
      security:
      - BearerAuth: []
        oauth2:
        - accounts:read
      parameters:
      - name: page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPage"
        description: The page index to retrieve.
      - name: per_page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPerPage"
        description: The number of entities per page to return.
      - name: owner
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestOwner"
        description: The owner of the entity.
      - name: guid
        in: query
        required: false
        description: Comma separated account_guids to list accounts for.
        schema:
          type: string
      - name: type
        in: query
        required: false
        description: Comma separated account_types to list accounts for.
        schema:
          type: string
      - name: bank_guid
        in: query
        required: false
        description: Comma separated bank_guids to list accounts for.
        schema:
          type: string
      - name: customer_guid
        in: query
        required: false
        description: Comma separated customer_guids to list accounts for.
        schema:
          type: string
      - name: label
        in: query
        required: false
        description: Comma separated labels to list accounts for.
        schema:
          type: string
      responses:
        '200':
          description: get list of accounts
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/AccountList"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                invalid_value:
                  value:
                    status: 400
                    error_message: comma separated bank guids must be at the most
                      4096 characters long
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: accounts:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/accounts/{account_guid}":
    get:
      summary: Get Account
      tags:
      - Accounts
      operationId: getAccount
      description: |-
        Retrieves an account.

        Required scope: **accounts:read**
      security:
      - BearerAuth: []
        oauth2:
        - accounts:read
      parameters:
      - name: account_guid
        in: path
        required: true
        description: Identifier for the account.
        schema:
          type: string
      responses:
        '200':
          description: account found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Account"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: accounts:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: account not found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: account not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/assets":
    get:
      summary: Get assets list
      tags:
      - Assets
      operationId: listAssets
      description: Retrieves a listing of assets.
      parameters:
      - name: page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPage"
        description: The page index to retrieve.
      - name: per_page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPerPage"
        description: The number of entities per page to return.
      - name: code
        in: query
        required: false
        description: Comma separated codes to list assets for.
        schema:
          type: string
      responses:
        '200':
          description: get list of assets
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/AssetList"
  "/api/banks":
    post:
      summary: Create Bank
      tags:
      - Banks
      operationId: createBank
      description: |-
        Creates a bank.

        ## Bank Type

        Bank's can be created in either `sandbox` or `production` mode. Sandbox Banks will not transact in real fiat dollars or cryptocurrencies.

        Via the API, only `sandbox` banks can be created. In order to enable a `production` bank please contact [Support](mailto:support@cybrid.app).



        Required scope: **banks:execute**
      security:
      - BearerAuth: []
        oauth2:
        - banks:execute
      parameters: []
      responses:
        '201':
          description: Bank created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Bank"
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Forbidden
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: banks:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                unsupported_value_1:
                  value:
                    status: 422
                    error_message: Fiat asset not supported
                    message_code: unsupported_value
                unsupported_value_2:
                  value:
                    status: 422
                    error_message: Trading symbol not supported
                    message_code: unsupported_value
                unsupported_value_3:
                  value:
                    status: 422
                    error_message: Trading symbols contain an asset that is not configured
                      as supported
                    message_code: unsupported_value
                unsupported_value_4:
                  value:
                    status: 422
                    error_message: Payout symbols contain an asset that is not configured
                      as supported
                    message_code: unsupported_value
                unsupported_value_5:
                  value:
                    status: 422
                    error_message: Country code not supported
                    message_code: unsupported_value
                unsupported_value_6:
                  value:
                    status: 422
                    error_message: Bank must be configured with kyc_identity_verifications
                    message_code: unsupported_value
                unsupported_value_7:
                  value:
                    status: 422
                    error_message: Bank must be configured with individual_customers
                      or business_customers
                    message_code: unsupported_value
                unsupported_value_8:
                  value:
                    status: 422
                    error_message: CORS allowed origins must all be valid HTTPS URIs.
                    message_code: unsupported_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PostBank"
        required: true
    get:
      summary: Get banks list
      tags:
      - Banks
      operationId: listBanks
      description: |-
        Retrieves a listing of bank. Records are sorted by creation date in descending order.

        Required scope: **banks:read**
      security:
      - BearerAuth: []
        oauth2:
        - banks:read
      parameters:
      - name: page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPage"
        description: The page index to retrieve.
      - name: per_page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPerPage"
        description: The number of entities per page to return.
      - name: type
        in: query
        required: false
        description: Comma separated types to list banks for.
        schema:
          type: string
      - name: guid
        in: query
        required: false
        description: Comma separated bank_guids to list banks for.
        schema:
          type: string
      responses:
        '200':
          description: get list of banks
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/BankList"
        '401':
          description: Unauthorized - invalid subject, Authentication failed
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: banks:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/banks/{bank_guid}":
    get:
      summary: Get Bank
      tags:
      - Banks
      operationId: getBank
      description: |-
        Retrieves a bank.

        Required scope: **banks:read**
      security:
      - BearerAuth: []
        oauth2:
        - banks:read
      parameters:
      - name: bank_guid
        in: path
        required: true
        description: Identifier for the bank.
        schema:
          type: string
      responses:
        '200':
          description: bank found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Bank"
        '401':
          description: Unauthorized - Authentication failed, invalid subject
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: banks:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: bank not found
          content:
            application/json:
              examples:
                invalid_value:
                  value:
                    status: 400
                    error_message: invalid bank_guid value
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
    patch:
      summary: Patch Bank
      tags:
      - Banks
      operationId: updateBank
      description: |-
        Update a bank.

        Required scope: **banks:write**
      security:
      - BearerAuth: []
        oauth2:
        - banks:write
      parameters:
      - name: bank_guid
        in: path
        required: true
        description: Identifier for the bank.
        schema:
          type: string
      responses:
        '200':
          description: bank found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Bank"
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Forbidden
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: banks:write'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                unsupported_value_1:
                  value:
                    status: 422
                    error_message: Trading symbol not supported
                    message_code: unsupported_value
                unsupported_value_2:
                  value:
                    status: 422
                    error_message: Payout symbols contain an asset that is not configured
                      as supported
                    message_code: unsupported_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PatchBank"
        required: true
  "/api/counterparties":
    post:
      summary: Create Counterparty
      tags:
      - Counterparties
      operationId: createCounterparty
      description: |-
        Creates a counterparty.

        ## Counterparty Type

        Counterparty resources are an abstraction for real world individuals and businesses that are not directly on the Cybrid Platform.

        ## State

        | State | Description |
        |-------|-------------|
        | storing | The Platform is storing the counterparty details in our private store |
        | unverified | The Platform has not yet verified the counterparty's identity |
        | verified | The Platform has verified the counterparty's identity |
        | rejected | The Platform was not able to successfully verify the counterparty's identity |



        Required scope: **counterparties:execute**
      security:
      - BearerAuth: []
        oauth2:
        - counterparties:execute
      parameters: []
      responses:
        '201':
          description: counterparty created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Counterparty"
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or customer'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Forbidden
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: counterparties:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                invalid_parameter_1:
                  value:
                    status: 400
                    error_message: Missing required address field
                    message_code: invalid_parameter
                invalid_parameter_2:
                  value:
                    status: 400
                    error_message: Invalid address format
                    message_code: invalid_parameter
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                unknown_bank:
                  value:
                    status: 422
                    error_message: Bank not found
                    message_code: unknown_bank
                no_customer:
                  value:
                    status: 422
                    error_message: Customer not found
                    message_code: no_customer
                invalid_value:
                  value:
                    status: 422
                    error_message: Country code not supported
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PostCounterparty"
        required: true
    get:
      summary: Get counterparties list
      tags:
      - Counterparties
      operationId: listCounterparties
      description: |-
        Retrieves a listing of counterparties. Records are sorted by creation date in descending order.

        Required scope: **counterparties:read**
        Optional scope: **counterparties:pii:read**.
      security:
      - BearerAuth: []
        oauth2:
        - counterparties:read
      parameters:
      - name: page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPage"
      - name: per_page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPerPage"
      - name: type
        in: query
        required: false
        description: Comma separated types to list counterparties for.
        schema:
          type: string
      - name: bank_guid
        in: query
        required: false
        description: Comma separated bank_guids to list counterparties for.
        schema:
          type: string
      - name: customer_guid
        in: query
        required: false
        description: Comma separated customer_guids to list counterparties for.
        schema:
          type: string
      - name: guid
        in: query
        required: false
        description: Comma separated counterparty_guids to list counterparties for.
        schema:
          type: string
      - name: label
        in: query
        required: false
        description: Comma separated labels to list counterparties for.
        schema:
          type: string
      - name: include_pii
        in: query
        required: false
        description: Include PII in the response (requires **counterparties:pii:read**
          scope).
        schema:
          type: boolean
      responses:
        '200':
          description: get list of counterparties
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CounterpartyList"
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: organization or
                      bank or customer'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Forbidden
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: counterparties:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/counterparties/{counterparty_guid}":
    get:
      summary: Get Counterparty
      tags:
      - Counterparties
      operationId: getCounterparty
      description: |-
        Retrieves a counterparty.

        Required scope: **counterparties:read**
        Optional scope: **counterparties:pii:read**.
      security:
      - BearerAuth: []
        oauth2:
        - counterparties:read
      parameters:
      - name: counterparty_guid
        in: path
        required: true
        description: Identifier for the counterparty.
        schema:
          type: string
      - name: include_pii
        in: query
        required: false
        description: Include PII in the response (requires **counterparties:pii:read**
          scope).
        schema:
          type: boolean
      responses:
        '200':
          description: counterparty found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Counterparty"
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: organization or
                      bank or customer'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Forbidden
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: counterparties:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/customers":
    post:
      summary: Create Customer
      tags:
      - Customers
      operationId: createCustomer
      description: |-
        Creates a customer.

        ## Customer Type

        Customer resources are an abstraction for real world individuals and businesses on the Cybrid Platform and are used throughout the platform to perform high level operations, e.g., create a quote, execute a trade, etc..

        Customers can have additional resources attached to them, e.g., identity verifications, accounts, etc.

        ## State

        | State | Description |
        |-------|-------------|
        | storing | The Platform is storing the customer details in our private store |
        | unverified | The Platform has not yet verified the customer's identity |
        | verified | The Platform has verified the customer's identity |
        | rejected | The Platform was not able to successfully verify the customer's identity |
        | frozen | The customer has been frozen on the Platform |



        Required scope: **customers:execute**
      security:
      - BearerAuth: []
        oauth2:
        - customers:execute
      parameters: []
      responses:
        '201':
          description: customer created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Customer"
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Forbidden
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: customers:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                unknown_bank:
                  value:
                    status: 422
                    error_message: Bank not found
                    message_code: unknown_bank
                unsupported_value:
                  value:
                    status: 422
                    error_message: Bank must be configured to support customer type
                    message_code: unsupported_value
                missing_parameter_1:
                  value:
                    status: 422
                    error_message: Customer name required
                    message_code: missing_parameter
                missing_parameter_2:
                  value:
                    status: 422
                    error_message: Customer address required
                    message_code: missing_parameter
                missing_parameter_3:
                  value:
                    status: 422
                    error_message: Customer date of birth required
                    message_code: missing_parameter
                missing_parameter_4:
                  value:
                    status: 422
                    error_message: Customer email address required
                    message_code: missing_parameter
                missing_parameter_5:
                  value:
                    status: 422
                    error_message: Customer identification numbers required
                    message_code: missing_parameter
                invalid_value_1:
                  value:
                    status: 422
                    error_message: Identification number duplicate type supplied
                    message_code: invalid_value
                invalid_value_2:
                  value:
                    status: 422
                    error_message: Identification number missing
                    message_code: invalid_value
                invalid_value_3:
                  value:
                    status: 422
                    error_message: Identification number not supported
                    message_code: invalid_value
                invalid_value_4:
                  value:
                    status: 422
                    error_message: Address country code not supported
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PostCustomer"
        required: true
    get:
      summary: Get customers list
      tags:
      - Customers
      operationId: listCustomers
      description: |-
        Retrieves a listing of customers. Records are sorted by creation date in descending order.

        Required scope: **customers:read**
        Optional scope: **customers:pii:read**.
      security:
      - BearerAuth: []
        oauth2:
        - customers:read
      parameters:
      - name: page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPage"
      - name: per_page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPerPage"
      - name: type
        in: query
        required: false
        description: Comma separated types to list customers for.
        schema:
          type: string
      - name: bank_guid
        in: query
        required: false
        description: Comma separated bank_guids to list customers for.
        schema:
          type: string
      - name: guid
        in: query
        required: false
        description: Comma separated customer_guids to list customers for.
        schema:
          type: string
      - name: label
        in: query
        required: false
        description: Comma separated labels to list customers for.
        schema:
          type: string
      - name: include_pii
        in: query
        required: false
        description: Include PII in the response (requires **customers:pii:read**
          scope).
        schema:
          type: boolean
      responses:
        '200':
          description: get list of customers
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CustomerList"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                invalid_value:
                  value:
                    status: 400
                    error_message: comma separated bank guids must be at the most
                      4096 characters long
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: Unauthorized - Authentication failed, invalid subject,
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: customers:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/customers/{customer_guid}":
    get:
      summary: Get Customer
      tags:
      - Customers
      operationId: getCustomer
      description: |-
        Retrieves a customer.

        Required scope: **customers:read**
        Optional scope: **customers:pii:read**.
      security:
      - BearerAuth: []
        oauth2:
        - customers:read
      parameters:
      - name: customer_guid
        in: path
        required: true
        description: Identifier for the customer.
        schema:
          type: string
      - name: include_pii
        in: query
        required: false
        description: Include PII in the response (requires **customers:pii:read**
          scope).
        schema:
          type: boolean
      responses:
        '200':
          description: customer found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Customer"
        '401':
          description: Unauthorized - Authentication failed, invalid subject
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: customers:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: customer not found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: customer not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
    patch:
      summary: Patch Customer
      tags:
      - Customers
      operationId: updateCustomer
      description: |-
        Update a customer.

        Required scope: **customers:write**
      security:
      - BearerAuth: []
        oauth2:
        - customers:write
      parameters:
      - name: customer_guid
        in: path
        required: true
        description: Identifier for the customer.
        schema:
          type: string
      responses:
        '200':
          description: customer found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Customer"
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: organization or
                      bank or customer'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Forbidden
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: customers:write'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                invalid_parameter:
                  value:
                    status: 400
                    error_message: Invalid state
                    message_code: invalid_parameter
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PatchCustomer"
        required: true
  "/api/deposit_addresses":
    post:
      summary: Create Deposit Address
      tags:
      - DepositAddresses
      operationId: createDepositAddress
      description: |-
        Creates a deposit address.

        ## State

        | State | Description |
        |-------|-------------|
        | storing | The Platform is storing the deposit address details in our private store |
        | created | The Platform has created the deposit address |



        Required scope: **deposit_addresses:execute**
      security:
      - BearerAuth: []
        oauth2:
        - deposit_addresses:execute
      parameters: []
      responses:
        '201':
          description: Deposit Address created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DepositAddress"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: deposit_addresses:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '409':
          description: Conflict
          content:
            application/json:
              examples:
                data_exists:
                  value:
                    status: 409
                    error_message: Deposit address(es) for account already exists
                    message_code: data_exists
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                invalid_asset:
                  value:
                    status: 422
                    error_message: Asset not supported
                    message_code: invalid_asset
                no_account:
                  value:
                    status: 422
                    error_message: Account not found
                    message_code: no_account
                frozen_customer:
                  value:
                    status: 422
                    error_message: Customer has been frozen
                    message_code: frozen_customer
                rejected_customer:
                  value:
                    status: 422
                    error_message: Customer has been rejected
                    message_code: rejected_customer
                unverified_customer:
                  value:
                    status: 422
                    error_message: Customer has not been verified
                    message_code: unverified_customer
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PostDepositAddress"
        required: true
    get:
      summary: List Deposit Addresses
      tags:
      - DepositAddresses
      operationId: listDepositAddresses
      description: |-
        Retrieves a list of deposit addresses. Records are sorted by creation date in descending order.

        Required scope: **deposit_addresses:read**
      security:
      - BearerAuth: []
        oauth2:
        - deposit_addresses:read
      parameters:
      - name: page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPage"
        description: The page index to retrieve.
      - name: per_page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPerPage"
        description: The number of entities per page to return.
      - name: guid
        in: query
        required: false
        description: Comma separated guids to list deposit addresses for.
        schema:
          type: string
      - name: bank_guid
        in: query
        required: false
        description: Comma separated bank_guids to list deposit addresses for.
        schema:
          type: string
      - name: customer_guid
        in: query
        required: false
        description: Comma separated customer_guids to list deposit addresses for.
        schema:
          type: string
      - name: label
        in: query
        required: false
        description: Comma separated labels to list deposit addresses for.
        schema:
          type: string
      responses:
        '200':
          description: get list of deposit addresses
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DepositAddressList"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                invalid_value:
                  value:
                    status: 400
                    error_message: comma separated bank guids must be at the most
                      4096 characters long
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: deposit_addresses:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/deposit_addresses/{deposit_address_guid}":
    get:
      summary: Get Deposit Address
      tags:
      - DepositAddresses
      operationId: getDepositAddress
      description: |-
        Retrieves a deposit address.

        Required scope: **deposit_addresses:read**
      security:
      - BearerAuth: []
        oauth2:
        - deposit_addresses:read
      parameters:
      - name: deposit_address_guid
        in: path
        required: true
        description: Identifier for the deposit address.
        schema:
          type: string
      responses:
        '200':
          description: deposit address found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DepositAddress"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: deposit_addresses:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: deposit_address not found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: deposit_address not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/deposit_bank_accounts":
    post:
      summary: Create Deposit Bank Account
      tags:
      - DepositBankAccounts
      operationId: createDepositBankAccount
      description: |-
        Creates a deposit bank account.

        ## State

        | State | Description |
        |-------|-------------|
        | storing | The Platform is storing the deposit bank account details in our private store |
        | created | The Platform has created the deposit bank account |



        Required scope: **deposit_bank_accounts:execute**
      security:
      - BearerAuth: []
        oauth2:
        - deposit_bank_accounts:execute
      parameters: []
      responses:
        '201':
          description: Deposit Bank Account created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DepositBankAccount"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: deposit_bank_accounts:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                unprocessable_request:
                  value:
                    status: 422
                    error_message: 'Unable to process request: UnsupportedCountry
                      - Country not supported'
                    message_code: unsupported_value
                invalid_asset:
                  value:
                    status: 422
                    error_message: Asset not supported
                    message_code: invalid_asset
                unsupported_value_1:
                  value:
                    status: 422
                    error_message: Country not supported
                    message_code: unsupported_value
                unsupported_value_2:
                  value:
                    status: 422
                    error_message: Invalid type or parameters
                    message_code: unsupported_value
                frozen_customer:
                  value:
                    status: 422
                    error_message: Customer has been frozen
                    message_code: frozen_customer
                rejected_customer:
                  value:
                    status: 422
                    error_message: Customer has been rejected
                    message_code: rejected_customer
                unverified_customer:
                  value:
                    status: 422
                    error_message: Customer has not been verified
                    message_code: unverified_customer
                no_account_1:
                  value:
                    status: 422
                    error_message: Account not found
                    message_code: no_account
                no_account_2:
                  value:
                    status: 422
                    error_message: Parent deposit bank account not found
                    message_code: no_account
                invalid_account:
                  value:
                    status: 422
                    error_message: Account is invalid
                    message_code: invalid_account
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '409':
          description: Conflict
          content:
            application/json:
              examples:
                data_exists:
                  value:
                    status: 409
                    error_message: Deposit address for account already exists
                    message_code: data_exists
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PostDepositBankAccount"
        required: true
    get:
      summary: List Deposit Bank Accounts
      tags:
      - DepositBankAccounts
      operationId: listDepositBankAccounts
      description: |-
        Retrieves a list of deposit bank accounts. Records are sorted by creation date in descending order.

        Required scope: **deposit_bank_accounts:read**
      security:
      - BearerAuth: []
        oauth2:
        - deposit_bank_accounts:read
      parameters:
      - name: page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPage"
        description: The page index to retrieve.
      - name: per_page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPerPage"
        description: The number of entities per page to return.
      - name: guid
        in: query
        required: false
        description: Comma separated guids to list deposit bank accounts for.
        schema:
          type: string
      - name: bank_guid
        in: query
        required: false
        description: Comma separated bank_guids to list deposit bank accounts for.
        schema:
          type: string
      - name: customer_guid
        in: query
        required: false
        description: Comma separated customer_guids to list deposit bank accounts
          for.
        schema:
          type: string
      - name: label
        in: query
        required: false
        description: Comma separated labels to list deposit bank accounts for.
        schema:
          type: string
      - name: unique_memo_id
        in: query
        required: false
        description: Comma separated unique memo ids to list deposit bank accounts
          for.
        schema:
          type: string
      - name: type
        in: query
        required: false
        description: Comma separated types to list deposit bank accounts for.
        schema:
          type: string
      - name: parent_deposit_bank_account_guid
        in: query
        required: false
        description: Comma separated guids for parent accounts to list deposit bank
          accounts for.
        schema:
          type: string
      responses:
        '200':
          description: get list of deposit bank accounts
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DepositBankAccountList"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                invalid_value:
                  value:
                    status: 400
                    error_message: comma separated bank guids must be at the most
                      4096 characters long
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: deposit_bank_accounts:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/deposit_bank_accounts/{deposit_bank_account_guid}":
    get:
      summary: Get Deposit Bank Account
      tags:
      - DepositBankAccounts
      operationId: getDepositBankAccount
      description: |-
        Retrieves a deposit bank account.

        Required scope: **deposit_bank_accounts:read**
      security:
      - BearerAuth: []
        oauth2:
        - deposit_bank_accounts:read
      parameters:
      - name: deposit_bank_account_guid
        in: path
        required: true
        description: Identifier for the deposit bank account.
        schema:
          type: string
      responses:
        '200':
          description: deposit bank account found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DepositBankAccount"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: deposit_bank_accounts:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: deposit_bank_account not found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: deposit_bank_account not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/executions":
    post:
      summary: Create Execution
      tags:
      - Executions
      operationId: createExecution
      description: |-
        Creates an execution.

        ## Create a plan execution

        | State | Description |
        |-------|-------------|
        | storing | The Platform is storing the execution details in our private store |
        | executing | The Platform is executing the plan |
        | completed | The Platform has successfully completed the plan execution |
        | failed | The Platform was not able to successfully complete the plan execution |

        ## Failure codes

        | Code | Description |
        |------|-------------|
        | invalid_counterparty | The payout failed due to an invalid or rejected counterparty |
        | invalid_destination_account | The payout failed due to an invalid, closed, or blocked destination account |



        Required scope: **executions:execute**
      security:
      - BearerAuth: []
        oauth2:
        - executions:execute
      parameters: []
      responses:
        '201':
          description: execution created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Execution"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                missing_parameter:
                  value:
                    status: 400
                    error_message: 'Missing parameter. Required: type, plan_guid'
                    message_code: missing_parameter
                invalid_value:
                  value:
                    status: 400
                    error_message: Invalid value. plan guids must be at the most 32
                      characters long
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: executions:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                unprocessable_request:
                  value:
                    status: 422
                    error_message: 'Unable to process request: TravelInfoInvalidException
                      - Travel rule information is invalid'
                    message_code: invalid_parameter
                invalid_parameter_1:
                  value:
                    status: 422
                    error_message: Plan not valid for execution
                    message_code: invalid_parameter
                invalid_parameter_2:
                  value:
                    status: 422
                    error_message: Travel rule information is invalid
                    message_code: invalid_parameter
                invalid_parameter_3:
                  value:
                    status: 422
                    error_message: Plan already executed
                    message_code: invalid_parameter
                plan_expired:
                  value:
                    status: 422
                    error_message: Plan has expired
                    message_code: plan_expired
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PostExecution"
        required: true
    get:
      summary: Get executions list
      tags:
      - Executions
      operationId: listExecutions
      description: |-
        Retrieves a listing of executions. Records are sorted by creation date in descending order.

        Required scope: **executions:read**
      security:
      - BearerAuth: []
        oauth2:
        - executions:read
      parameters:
      - name: page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPage"
        description: The page index to retrieve.
      - name: per_page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPerPage"
        description: The number of entities per page to return.
      - name: guid
        in: query
        required: false
        description: Comma separated execution_guids to list executions for.
        schema:
          type: string
      - name: plan_guid
        in: query
        required: false
        description: Comma separated plan_guids to list executions for.
        schema:
          type: string
      - name: bank_guid
        in: query
        required: false
        description: Comma separated bank_guids to list executions for.
        schema:
          type: string
      - name: customer_guid
        in: query
        required: false
        description: Comma separated customer_guids to list executions for.
        schema:
          type: string
      - name: type
        in: query
        required: false
        description: Comma separated types to list executions for.
        schema:
          type: string
      - name: state
        in: query
        required: false
        description: Comma separated states to list executions for.
        schema:
          type: string
      - name: source_account_guid
        in: query
        required: false
        description: Comma separated source account guids to list executions for.
        schema:
          type: string
      - name: destination_account_guid
        in: query
        required: false
        description: Comma separated destination account guids to list executions
          for.
        schema:
          type: string
      - name: created_at_gte
        in: query
        required: false
        description: Created at start date-time inclusive lower bound, ISO8601.
        schema:
          type: string
      - name: created_at_lt
        in: query
        required: false
        description: Created at end date-time exclusive upper bound, ISO8601.
        schema:
          type: string
      - name: updated_at_gte
        in: query
        required: false
        description: Updated at start date-time inclusive lower bound, ISO8601.
        schema:
          type: string
      - name: updated_at_lt
        in: query
        required: false
        description: Updated at end date-time exclusive upper bound, ISO8601.
        schema:
          type: string
      responses:
        '200':
          description: get list of executions
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ExecutionList"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                invalid_value:
                  value:
                    status: 400
                    error_message: Invalid value. comma separated destination account
                      guids must be at the most 4096 characters long
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: executions:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/executions/{execution_guid}":
    get:
      summary: Get Execution
      tags:
      - Executions
      operationId: getExecution
      description: |-
        Retrieves a execution.

        Required scope: **executions:read**
      security:
      - BearerAuth: []
        oauth2:
        - executions:read
      parameters:
      - name: execution_guid
        in: path
        required: true
        description: Identifier for the payment instruction.
        schema:
          type: string
      responses:
        '200':
          description: execution found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Execution"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank
                      or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: executions:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: execution not found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: execution not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/external_bank_accounts":
    post:
      summary: Create ExternalBankAccount
      tags:
      - ExternalBankAccounts
      operationId: createExternalBankAccount
      description: |-
        Create an ExternalBankAccount.

        ## Account creation

        Accounts can be created for a Bank or a Customer.

        To create accounts for your Bank, omit the `customer_guid` parameter in the request body. To create accounts for your Customers, include the `customer_guid` parameter in the request body.

        ## State

        | State | Description |
        |-------|-------------|
        | storing | The Platform is storing the external bank account details in our private store |
        | completed | The Platform has created the external bank account |
        | unverified | The external bank account is created, but it has not yet been verified |
        | failed | The Platform was not able to successfully create the external bank account |
        | refresh_required | The Platform has created the external bank account, but needs to be refreshed |
        | deleting | The Platform is deleting the external bank account |
        | deleted | The Platform has deleted the external bank account |

        ## Failure codes

        | Code | Description |
        |------|-------------|
        | invalid_routing_number | The provided routing number is invalid |
        | invalid_account_number | The account number is invalid |
        | invalid_account_type | The account type is invalid |
        | duplicate | An account with the same details already exists |
        | plaid_processor_token | An account could not be created due to an invalid Plaid processor token or an error with Plaid |
        | plaid_multiple_accounts | The supplied Plaid token is associated with multiple accounts. Must only be a single account. |
        | create_failed | The bank account and associated holder could not be created correctly |
        | unverified_counterparty | The counterparty account is unverified |



        Required scope: **external_bank_accounts:execute**
      security:
      - BearerAuth: []
        oauth2:
        - external_bank_accounts:execute
      parameters: []
      responses:
        '201':
          description: ExternalBankAccount created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ExternalBankAccount"
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                missing_parameter:
                  value:
                    status: 400
                    error_message: 'Missing parameter. Required: name, asset, account_kind'
                    message_code: missing_parameter
                invalid_value:
                  value:
                    status: 400
                    error_message: Invalid value. plaid_account_id must be at the
                      most 128 characters long
                    message_code: invalid_value
                invalid_parameter_value:
                  value:
                    status: 400
                    error_message: 'Invalid value exception. Parameter: account_kind
                      supported values: ["plaid", "plaid_processor_token", "raw_routing_details"] '
                    message_code: invalid_value
                invalid_asset:
                  value:
                    status: 400
                    error_message: Invalid asset
                    message_code: invalid_asset
                invalid_routing_number_1:
                  value:
                    status: 400
                    error_message: Invalid payment rail
                    message_code: invalid_routing_number
                invalid_routing_number_2:
                  value:
                    status: 400
                    error_message: Invalid routing number
                    message_code: invalid_routing_number
                invalid_account_number:
                  value:
                    status: 400
                    error_message: Invalid account number
                    message_code: invalid_account_number
                invalid_account_type:
                  value:
                    status: 400
                    error_message: Invalid account type
                    message_code: invalid_account_type
                invalid_counterparty:
                  value:
                    status: 400
                    error_message: Invalid counterparty name
                    message_code: invalid_counterparty
                unverified_counterparty:
                  value:
                    status: 400
                    error_message: Counterparty not verified
                    message_code: unverified_counterparty
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or customer'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: external_bank_accounts:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                unprocessable_request:
                  value:
                    status: 422
                    error_message: 'Unable to process request: InvalidCustomer - Customer
                      not found'
                    message_code: no_customer
                no_exchange:
                  value:
                    status: 422
                    error_message: Exchange not found
                    message_code: no_exchange
                unknown_bank:
                  value:
                    status: 422
                    error_message: Bank not found
                    message_code: unknown_bank
                no_customer:
                  value:
                    status: 422
                    error_message: Customer not found
                    message_code: no_customer
                no_counterparty:
                  value:
                    status: 422
                    error_message: Counterparty not found
                    message_code: no_counterparty
                not_raw_routing_details_bank_1:
                  value:
                    status: 422
                    error_message: Invalid bank configuration
                    message_code: not_raw_routing_details_bank
                not_raw_routing_details_bank_2:
                  value:
                    status: 422
                    error_message: Business customer raw routing details not enabled
                      for this bank
                    message_code: not_raw_routing_details_bank
                not_raw_routing_details_bank_3:
                  value:
                    status: 422
                    error_message: Individual customer raw routing details not enabled
                      for this bank
                    message_code: not_raw_routing_details_bank
                not_a_counterparty_external_bank_accounts_bank:
                  value:
                    status: 422
                    error_message: Invalid bank configuration
                    message_code: not_a_counterparty_external_bank_accounts_bank
                invalid_value:
                  value:
                    status: 422
                    error_message: Invalid bank account service
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PostExternalBankAccount"
        required: true
    get:
      summary: Get external bank accounts list
      tags:
      - ExternalBankAccounts
      operationId: listExternalBankAccounts
      description: |-
        Retrieves a listing of external bank accounts. Records are sorted by creation date in descending order.

        Required scope: **external_bank_accounts:read**
      security:
      - BearerAuth: []
        oauth2:
        - external_bank_accounts:read
      parameters:
      - name: page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPage"
        description: The page index to retrieve.
      - name: per_page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPerPage"
        description: The number of entities per page to return.
      - name: guid
        in: query
        required: false
        description: Comma separated external_bank_account_guids to list external_bank_accounts
          for.
        schema:
          type: string
      - name: bank_guid
        in: query
        required: false
        description: Comma separated bank_guids to list external_bank_accounts for.
        schema:
          type: string
      - name: customer_guid
        in: query
        required: false
        description: Comma separated customer_guids to list external_bank_accounts
          for.
        schema:
          type: string
      - name: counterparty_guid
        in: query
        required: false
        description: Comma separated counterparty_guids to list external_bank_accounts
          for.
        schema:
          type: string
      - name: asset
        in: query
        required: false
        description: Comma separated assets to list external_bank_accounts for.
        schema:
          type: string
      - name: state
        in: query
        required: false
        description: Comma separated states to list external_bank_accounts for. Filtering
          by "completed" and "unverified" states is only supported for individual
          customer accounts.
        schema:
          type: string
      responses:
        '200':
          description: Get list of external_bank_accounts
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ExternalBankAccountList"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                invalid_value:
                  value:
                    status: 400
                    error_message: Invalid value. comma separated bank guids must
                      be at the most 4096 characters long
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank
                      or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: external_bank_accounts:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/external_bank_accounts/{external_bank_account_guid}":
    delete:
      summary: Delete External Bank Account
      tags:
      - ExternalBankAccounts
      operationId: deleteExternalBankAccount
      description: |-
        Deletes an external bank account.

        Required scope: **external_bank_accounts:execute**
      security:
      - BearerAuth: []
        oauth2:
        - external_bank_accounts:execute
      parameters:
      - name: external_bank_account_guid
        in: path
        required: true
        description: Identifier for the external bank account.
        schema:
          type: string
      responses:
        '200':
          description: External bank account deleted
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ExternalBankAccount"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: external_bank_accounts:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: ExternalBankAccount not found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: ExternalBankAccount not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
    get:
      summary: Get External Bank Account
      tags:
      - ExternalBankAccounts
      operationId: getExternalBankAccount
      description: |-
        Retrieves an external bank account.

        ## ExternalBankAccount retrieval

        When retrieving an external bank account and include_balances is set to true, the Platform will attempt to retrieve the balance from the account's financial institution.

        If force_balance_refresh is set to true, the Platform will always attempt to retrieve the most up to date balance from the account's financial institution. If force_balance_refresh is set to false, the Platform will return the cached balance.

        If while getting the balance the Platform determines that the account needs to be refreshed, the Platform will return a 422 status code with the message "Bank account refresh required" and the ExternalBankAccount will be put into the refresh_required state.

        If while getting the balance the Platform determines that the account is no longer valid, the Platform will return a 422 status code with the message "Bank account can no longer be used and is being deleted. It must be re-added" and the ExternalBankAccount will be deleted.

        When retrieving an external bank account and include_pii is set to true, the Platform will include the account holder's information in the response.



        Required scope: **external_bank_accounts:read**
        Optional scope: **external_bank_accounts:pii:read**.
      security:
      - BearerAuth: []
        oauth2:
        - external_bank_accounts:read
      parameters:
      - name: external_bank_account_guid
        in: path
        required: true
        description: Identifier for the external bank account.
        schema:
          type: string
      - name: force_balance_refresh
        in: query
        required: false
        description: Force the balance on the account to be retrieved.
        schema:
          type: boolean
      - name: include_balances
        in: query
        required: false
        description: Include balance information in the response. If `force_balance_refresh`
          is `true`, the most up to date balance will be returned. If `force_balance_refresh`
          is `false`, the cached balance will be returned. `balance_updated_at` in
          the response will provide the timestamp the balance was last updated.
        schema:
          type: boolean
      - name: include_pii
        in: query
        required: false
        description: Include the account holder's PII in the response (requires **external_bank_accounts:pii:read**
          scope).
        schema:
          type: boolean
      responses:
        '200':
          description: External bank account found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ExternalBankAccount"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank
                      or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: external_bank_accounts:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: ExternalBankAccount not found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: ExternalBankAccount not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '422':
          description: Unable to process request
          content:
            application/json:
              examples:
                unprocessable_request:
                  value:
                    status: 422
                    error_message: 'Unable to process request: PlaidInstitutionNotRespondingError
                      - Financial institution did not respond'
                    message_code: request_timeout
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
    patch:
      summary: Patch ExternalBankAccount
      tags:
      - ExternalBankAccounts
      operationId: patchExternalBankAccount
      description: |-
        Patch an external bank account.

        Required scope: **external_bank_accounts:write**
      security:
      - BearerAuth: []
        oauth2:
        - external_bank_accounts:write
      parameters:
      - name: external_bank_account_guid
        in: path
        required: true
        description: Identifier for the external bank account.
        schema:
          type: string
      responses:
        '200':
          description: external bank account found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ExternalBankAccount"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: external_bank_accounts:write'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: ExternalBankAccount not found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: ExternalBankAccount not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PatchExternalBankAccount"
        required: true
  "/api/external_wallets":
    post:
      summary: Create ExternalWallet
      tags:
      - ExternalWallets
      operationId: createExternalWallet
      description: |-
        Create an ExternalWallet.

        ## Wallet creation

        External Wallets can be created for a Bank or a Customer.

        To create a wallet for your Bank, omit the `customer_guid` parameter in the request body. To create a wallet for your Customers, include the `customer_guid` parameter in the request body.

        ## State

        | State | Description |
        |-------|-------------|
        | storing | The Platform is storing the external wallet details in our private store |
        | pending | The Platform is waiting for the external wallet to be created |
        | reviewing | The Platform is reviewing the external wallet for compliance |
        | completed | The Platform has created the external wallet |
        | failed | The Platform was not able to successfully create the external wallet |
        | deleting | The Platform is deleting the external wallet |
        | deleted | The Platform has deleted the external wallet |

        ## Failure Codes

        | Code | Description |
        |-------|-------------|
        | invalid_address | The provided wallet address is invalid |
        | prohibited_address | The provided wallet address failed screening |



        External wallets can be added to the bank by leaving the customer_guid blank. External wallets added to the bank can be used by any customer of the bank.

        External wallets can also be added to a specific customer by providing the customer_guid. External wallets added to a customer can only be used by that customer.

        Required scope: **external_wallets:execute**
      security:
      - BearerAuth: []
        oauth2:
        - external_wallets:execute
      parameters: []
      responses:
        '201':
          description: ExternalWallet created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ExternalWallet"
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                missing_parameter:
                  value:
                    status: 400
                    error_message: 'Missing parameter. Required: name, asset'
                    message_code: missing_parameter
                invalid_value:
                  value:
                    status: 400
                    error_message: Invalid value. customer_guid must  32 characters
                      long
                    message_code: invalid_value
                invalid_parameter_value:
                  value:
                    status: 400
                    error_message: 'Invalid value exception. Parameter: account_kind
                      supported values: ["fireblocks_external_wallet", "circle_wire_external_wallet"] '
                    message_code: invalid_value
                invalid_asset:
                  value:
                    status: 400
                    error_message: Invalid asset
                    message_code: invalid_asset
                invalid_parameter:
                  value:
                    status: 400
                    error_message: Invalid expected behaviour
                    message_code: invalid_parameter
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or customer'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: external_wallets:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '409':
          description: Data already exists
          content:
            application/json:
              examples:
                already_exists:
                  value:
                    status: 409
                    error_message: 'Data exists: External wallet already exists'
                    message_code: data_exists
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                unprocessable_request:
                  value:
                    status: 422
                    error_message: 'Unable to process request: InvalidCustomer - Customer
                      not found'
                    message_code: no_customer
                unknown_bank:
                  value:
                    status: 422
                    error_message: Bank not found
                    message_code: unknown_bank
                no_customer:
                  value:
                    status: 422
                    error_message: Customer not found
                    message_code: no_customer
                no_counterparty:
                  value:
                    status: 422
                    error_message: Counterparty not found
                    message_code: no_counterparty
                not_a_counterparty_external_bank_accounts_bank:
                  value:
                    status: 422
                    error_message: Invalid bank configuration
                    message_code: not_a_counterparty_external_bank_accounts_bank
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PostExternalWallet"
        required: true
    get:
      summary: Get external wallets list
      tags:
      - ExternalWallets
      operationId: listExternalWallets
      description: |-
        Retrieves a listing of external wallets. Records are sorted by creation date in descending order.

        Required scope: **external_wallets:read**
      security:
      - BearerAuth: []
        oauth2:
        - external_wallets:read
      parameters:
      - name: page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPage"
        description: The page index to retrieve.
      - name: per_page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPerPage"
        description: The number of entities per page to return.
      - name: owner
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestOwner"
        description: The owner of the entity.
      - name: guid
        in: query
        required: false
        description: Comma separated external_wallet_guids to list external_wallets
          for.
        schema:
          type: string
      - name: bank_guid
        in: query
        required: false
        description: Comma separated bank_guids to list external_wallets for.
        schema:
          type: string
      - name: customer_guid
        in: query
        required: false
        description: Comma separated customer_guids to list external_wallets for.
        schema:
          type: string
      - name: counterparty_guid
        in: query
        required: false
        description: Comma separated counterparty_guids to list external_wallets for.
        schema:
          type: string
      - name: asset
        in: query
        required: false
        description: Comma separated assets to list external_wallets for.
        schema:
          type: string
      - name: state
        in: query
        required: false
        description: Comma separated states to list external_wallets for.
        schema:
          type: string
      responses:
        '200':
          description: Get list of external_wallets
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ExternalWalletList"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                invalid_value:
                  value:
                    status: 400
                    error_message: Invalid value. comma separated bank guids must
                      be at the most 4096 characters long
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank
                      or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: external_wallets:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/external_wallets/{external_wallet_guid}":
    delete:
      summary: Delete External Wallet
      tags:
      - ExternalWallets
      operationId: deleteExternalWallet
      description: |-
        Deletes an external wallet.

        Required scope: **external_wallets:execute**
      security:
      - BearerAuth: []
        oauth2:
        - external_wallets:execute
      parameters:
      - name: external_wallet_guid
        in: path
        required: true
        description: Identifier for the external wallet.
        schema:
          type: string
      responses:
        '200':
          description: External wallet deleted
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ExternalWallet"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: external_wallets:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: ExternalWallet not found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: ExternalWallet not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
    get:
      summary: Get External Wallet
      tags:
      - ExternalWallets
      operationId: getExternalWallet
      description: |-
        Retrieves an external_wallet.

        Required scope: **external_wallets:read**
      security:
      - BearerAuth: []
        oauth2:
        - external_wallets:read
      parameters:
      - name: external_wallet_guid
        in: path
        required: true
        description: Identifier for the external_wallet.
        schema:
          type: string
      responses:
        '200':
          description: External wallet found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ExternalWallet"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank
                      or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: external_wallets:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: ExternalWallet not found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: ExternalWallet not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/files":
    post:
      summary: Create File
      tags:
      - Files
      operationId: createFile
      description: |-
        Creates a file.

        #### This feature is currently in preview mode and is not yet available for partner use.

        ## Data

        The attribute contains the base64 encoded file content. The value needs to be smaller than 10MB otherwise the Platform will reject the request. To upload files larger than 10MB do not provide the content and use the returned upload URL to provide the file.

        ## State

        | State | Description |
        |-------|-------------|
        | storing | The Platform is storing the file in our private store |
        | completed | The Platform has completed storing the file |
        | failed | The Platform failed to store the file |



        Required scope: **files:execute**
      security:
      - BearerAuth: []
        oauth2:
        - files:execute
      parameters: []
      responses:
        '201':
          description: file created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/PlatformFile"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                missing_parameter:
                  value:
                    status: 400
                    error_message: 'Missing parameter. Required: type, customer_guid,
                      content_type, filename'
                    message_code: missing_parameter
                invalid_parameter_value:
                  value:
                    status: 400
                    error_message: 'Invalid value exception. Parameter: content_type
                      supported values: ["[\"image/jpeg\", \"image/png\", \"application/pdf\",
                      \"application/json\", \"video/mp4\"]"] '
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: files:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PostFile"
        required: true
    get:
      summary: List Files
      tags:
      - Files
      operationId: listFiles
      description: |-
        Retrieves a list of files. Records are sorted by creation date in descending order.

        Required scope: **files:read**
      security:
      - BearerAuth: []
        oauth2:
        - accounts:read
      parameters:
      - name: page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPage"
        description: The page index to retrieve.
      - name: per_page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPerPage"
        description: The number of entities per page to return.
      - name: guid
        in: query
        required: false
        description: Comma separated file_guids to list files for.
        schema:
          type: string
      - name: type
        in: query
        required: false
        description: Comma separated file types to list files for.
        schema:
          type: string
      - name: state
        in: query
        required: false
        description: Comma separated file states to list files for.
        schema:
          type: string
      - name: bank_guid
        in: query
        required: false
        description: Comma separated bank_guids to list files for.
        schema:
          type: string
      - name: customer_guid
        in: query
        required: false
        description: Comma separated customer_guids to list files for.
        schema:
          type: string
      responses:
        '200':
          description: get list of files
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/PlatformFileList"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                invalid_value:
                  value:
                    status: 400
                    error_message: comma separated types must be at the most 4096
                      characters long
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: files:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/files/{file_guid}":
    get:
      summary: Get File
      tags:
      - Files
      operationId: getFile
      description: |-
        Retrieves a file.

        Required scopes: **files:read,  files:pii:read**
      security:
      - BearerAuth: []
        oauth2:
        - files:read
      parameters:
      - name: file_guid
        in: path
        required: true
        description: Identifier for the file.
        schema:
          type: string
      - name: include_download_url
        in: query
        required: false
        description: Include download information in response. Note, the files:pii:read
          scope is required if this parameter is set.
        schema:
          type: string
      responses:
        '200':
          description: file found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/PlatformFile"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: files:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: file not found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: file not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/identity_verifications":
    post:
      summary: Create Identity Verification
      tags:
      - IdentityVerifications
      operationId: createIdentityVerification
      description: |-
        Creates an Identity Verification.

        ## Identity Verifications

        Identity Verifications confirm an individual's identity with for the purpose of inclusion on the platform. This know-your-customer (KYC) process is a requirement for individuals to be able to transact. At present, we offer support for Cybrid performing the verification or working with partners to accept their KYC/AML process and have it attested to in our platform.

        ## State

        | State | Description |
        |-------|-------------|
        | storing | The Platform is storing the identity verification details in our private store |
        | waiting | The Platform is waiting for the customer to start the identity verification process |
        | pending | The Platform is waiting for the customer to finish the identity verification process |
        | reviewing | The Platform is waiting for compliance to review the identity verification results |
        | expired | The identity verification process has expired |
        | completed | The identity verification process has been completed |

        ## Outcome

        | State | Description |
        |-------|-------------|
        | passed | The customer has passed the identity verification process |
        | failed | The customer has failed the identity verification process |

        ## Failure Codes

        | Code | Description |
        |-------|-------------|
        | id_check_failure | Failure due to an issue verifying the provided ID |
        | id_quality_check_failure | Failure due to an issue verifying the provided ID based on the image quality |
        | id_barcode_check_failure | Failure due to an issue verifying the provided ID based on the barcode |
        | id_mrz_check_failure | Failure due to an issue verifying the provided ID based on the machine-readable zone (MRZ) |
        | id_presence_check_failure | Failure due to an issue verifying the provided ID based on the presence of the ID |
        | id_expiration_check_failure | Failure due to an issue verifying the provided ID based on the expiration date |
        | id_double_side_check_failure | Failure due to an issue verifying the provided ID based on both sides not being provided |
        | id_type_allowed_check_failure | Failure due to an issue verifying the provided ID based on the type provided |
        | id_country_allowed_check_failure | Failure due to an issue verifying the provided ID based on the issuing country |
        | id_digital_replica_check_failure | Failure due to an issue verifying the provided ID based on it being a digital replica |
        | id_paper_replica_check_failure | Failure due to an issue verifying the provided ID based on it being a paper replica |
        | database_check_failure | Failure due to an issue verifying the provided information against authoritative data sources |
        | selfie_failure | Failure due to an issue verifying the provided selfie photo |
        | selfie_pose_check_failure | Failure due to an issue verifying the provided selfie photo based on incorrect poses |
        | selfie_quality_check_failure | Failure due to an issue verifying the provided selfie photo based on the image quality |
        | country_comparison_check_failure | Failure due the customer verification being performed out of country |
        | duplicate_person_check_failure | Failure due to a customer already existing for this person |
        | prohibited_person_check_failure | Failure due to a person being on prohibited from accessing the service |
        | name_check_failure | Failure due to an issue verifying the name of the person |
        | address_check_failure | Failure due to an issue verifying the address of the person |
        | account_number_check_failure | Failure due to an issue verifying the account number of the person |
        | dob_check_failure | Failure due to an issue verifying the date of birth of the person |
        | id_number_check_failure | Failure due to an issue verifying an identification number of the person |
        | phone_number_check_failure | Failure due to an issue verifying the phone number of the person |
        | email_address_check_failure | Failure due to an issue verifying the email address of the person |
        | document_type_check_failure | Failure due to the type of document provided not being the correct type |
        | document_quality_check_failure | Failure due to an issue verifying the document based on the image quality |
        | document_check_failure | Failure due to an issue verifying the documents |
        | name_comparison_check_failure | Failure due to a mismatch between the name on the customer account and the name on the provided documents |
        | compliance_rejection | Failure due to compliance rejecting the identity verification |
        | review_required | The verification is inconclusive and requires a manual review |
        | user_canceled | Failure due to the user canceling the identity verification |
        | plaid_failure | Failure due to an issue interacting with Plaid |
        | plaid_item_login_required | Failure due to the Plaid token for the account requiring re-login |
        | plaid_invalid_product | Failure due to the Plaid product not being supported (contact support) |
        | plaid_no_accounts | Failure due to the Plaid token having access to no accounts |
        | plaid_item_not_found | Failure due to Plaid not being able to find the associated account |
        | decision_timeout | Failure due to an issue verifying the email address of the person |
        | requested_failure | In sandbox, the caller requested that the process failed |
        | deleted_account | Failure due to the bank account having been deleted before a decision was made |
        |pep_check_failure| Failure due to the person being on a Politically Exposed Persons (PEP) list |
        |media_check_failure| Failure due to the person being on Adverse Media list |
        |watchlist_check_failure| Failure due to the person being on a known government or international watchlist or sanctions list |



        Required scope: **identity_verifications:execute**
      security:
      - BearerAuth: []
        oauth2:
        - identity_verifications:execute
      parameters: []
      responses:
        '201':
          description: Identity Verification created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/IdentityVerification"
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Forbidden
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: identity_verifications:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                invalid_parameter:
                  value:
                    status: 400
                    error_message: Parameter expected_behaviours not permitted in
                      production
                    message_code: invalid_parameter
                missing_parameter:
                  value:
                    status: 400
                    error_message: Supporting file is missing
                    message_code: missing_parameter
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '409':
          description: Conflict
          content:
            application/json:
              examples:
                data_exists_1:
                  value:
                    status: 409
                    error_message: Identity verification in progress already exists
                    message_code: data_exists
                data_exists_2:
                  value:
                    status: 409
                    error_message: Already verified
                    message_code: data_exists
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                no_customer:
                  value:
                    status: 422
                    error_message: Customer not found
                    message_code: no_customer
                rejected_customer:
                  value:
                    status: 422
                    error_message: Customer has been rejected
                    message_code: rejected_customer
                unverified_customer:
                  value:
                    status: 422
                    error_message: Customer has not been verified
                    message_code: unverified_customer
                incomplete_customer:
                  value:
                    status: 422
                    error_message: Customer creation has not yet completed
                    message_code: incomplete_customer
                unsupported_value:
                  value:
                    status: 422
                    error_message: Customer type not supported
                    message_code: unsupported_value
                no_counterparty:
                  value:
                    status: 422
                    error_message: Counterparty not found
                    message_code: no_counterparty
                rejected_counterparty:
                  value:
                    status: 422
                    error_message: Counterparty has been rejected
                    message_code: rejected_counterparty
                incomplete_counterparty:
                  value:
                    status: 422
                    error_message: Counterparty creation has not yet completed
                    message_code: incomplete_counterparty
                invalid_value_1:
                  value:
                    status: 422
                    error_message: Invalid bank account to verify
                    message_code: invalid_value
                invalid_value_2:
                  value:
                    status: 422
                    error_message: Identification number duplicate type supplied
                    message_code: invalid_value
                invalid_parameter_1:
                  value:
                    status: 422
                    error_message: Parameter country_code must be set
                    message_code: invalid_parameter
                invalid_parameter_2:
                  value:
                    status: 422
                    error_message: Workflow not found
                    message_code: invalid_parameter
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PostIdentityVerification"
        required: true
    get:
      summary: List Identity Verifications
      tags:
      - IdentityVerifications
      operationId: listIdentityVerifications
      description: |-
        Retrieves a list of identity verifications. Records are sorted by creation date in descending order.

        Required scope: **identity_verifications:read**
      security:
      - BearerAuth: []
        oauth2:
        - identity_verifications:read
      parameters:
      - name: page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPage"
        description: The page index to retrieve.
      - name: per_page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPerPage"
        description: The number of entities per page to return.
      - name: guid
        in: query
        required: false
        description: Comma separated guids to list identity verifications for.
        schema:
          type: string
      - name: bank_guid
        in: query
        required: false
        description: Comma separated bank_guids to list identity verifications for.
        schema:
          type: string
      - name: customer_guid
        in: query
        required: false
        description: Comma separated customer_guids to list identity verifications
          for.
        schema:
          type: string
      - name: counterparty_guid
        in: query
        required: false
        description: Comma separated counterparty_guids to list identity verifications
          for.
        schema:
          type: string
      - name: state
        in: query
        required: false
        description: Comma separated states to list identity verifications for.
        schema:
          type: string
      - name: type
        in: query
        required: false
        description: Comma separated types to list identity verifications for.
        schema:
          type: string
      - name: method
        in: query
        required: false
        description: Comma separated methods to list identity verifications for.
        schema:
          type: string
      responses:
        '200':
          description: get list of identity verifications
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/IdentityVerificationList"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                invalid_value:
                  value:
                    status: 400
                    error_message: comma separated methods must be at the most 4096
                      characters long
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Forbidden
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: identity_verifications:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/identity_verifications/{identity_verification_guid}":
    get:
      summary: Get Identity Verification
      tags:
      - IdentityVerifications
      operationId: getIdentityVerification
      description: |-
        Retrieves an identity verification.

        Required scope: **identity_verifications:read**
        Optional scope: **identity_verifications:pii:read**.
      security:
      - BearerAuth: []
        oauth2:
        - identity_verifications:read
      parameters:
      - name: identity_verification_guid
        in: path
        required: true
        description: Identifier for the identity verification.
        schema:
          type: string
      - name: include_pii
        in: query
        required: false
        description: Include PII in the response (requires **identity_verifications:pii:read**
          scope).
        schema:
          type: boolean
      responses:
        '200':
          description: identity verification found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/IdentityVerificationWithDetails"
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Forbidden
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: identity_verifications:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: Not Found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: identity_verification not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/invoices":
    post:
      summary: Create Invoice
      tags:
      - Invoices
      operationId: createInvoice
      description: "Creates a invoice.\n\n## State\n\n| State | Description |\n|-------|-------------|\n|
        storing    | The Platform is storing the invoice details in our private store
        |\n| unpaid     | The invoice is unpaid. Payment instructions can be generated
        for an invoice in this state |\n| cancelling | The invocie is in the process
        of being cancelled |\n| cancelled  | The invoice has been cancelled | \n|
        settling   | The invoice has been paid and the funds associated with this
        invoice are in the process of being settled |\n| paid       | The invoice
        has been paid and the funds associated with this invoice have been settled
        | \n\n\n\nRequired scope: **invoices:execute**"
      security:
      - BearerAuth: []
        oauth2:
        - invoices:execute
      parameters: []
      responses:
        '201':
          description: Invoice created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Invoice"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: invoices:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                not_found_1:
                  value:
                    status: 422
                    error_message: Payment account not found
                    message_code: not_found
                not_found_2:
                  value:
                    status: 422
                    error_message: Bank fee account not found
                    message_code: not_found
                not_found_3:
                  value:
                    status: 422
                    error_message: Platform fee account not found
                    message_code: not_found
                not_found_4:
                  value:
                    status: 422
                    error_message: Internal account not found
                    message_code: not_found
                not_found_5:
                  value:
                    status: 422
                    error_message: Customer cannot be found
                    message_code: not_found
                not_found_6:
                  value:
                    status: 422
                    error_message: Bank cannot be found
                    message_code: not_found
                invalid_value_1:
                  value:
                    status: 422
                    error_message: Payment account in invalid state
                    message_code: invalid_value
                invalid_value_2:
                  value:
                    status: 422
                    error_message: Multiple fiat accounts found
                    message_code: invalid_value
                invalid_value_3:
                  value:
                    status: 422
                    error_message: Bank fee account in invalid state
                    message_code: invalid_value
                invalid_value_4:
                  value:
                    status: 422
                    error_message: Platform fee account is in an invalid state
                    message_code: invalid_value
                invalid_value_5:
                  value:
                    status: 422
                    error_message: Internal account is in an invalid state
                    message_code: invalid_value
                invalid_value_6:
                  value:
                    status: 422
                    error_message: Amount is invalid
                    message_code: invalid_value
                invalid_asset:
                  value:
                    status: 422
                    error_message: Asset is not supported.
                    message_code: invalid_asset
                frozen_customer:
                  value:
                    status: 422
                    error_message: Customer has been frozen
                    message_code: frozen_customer
                rejected_customer:
                  value:
                    status: 422
                    error_message: Customer has been rejected
                    message_code: rejected_customer
                unverified_customer:
                  value:
                    status: 422
                    error_message: Customer has not been verified
                    message_code: unverified_customer
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PostInvoice"
        required: true
    get:
      summary: List Invoices
      tags:
      - Invoices
      operationId: listInvoices
      description: |-
        Retrieves a list of invoices. Records are sorted by creation date in descending order.

        Required scope: **invoices:read**
      security:
      - BearerAuth: []
        oauth2:
        - invoices:read
      parameters:
      - name: page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPage"
        description: The page index to retrieve.
      - name: per_page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPerPage"
        description: The number of entities per page to return.
      - name: guid
        in: query
        required: false
        description: Comma separated guids to list invoices for.
        schema:
          type: string
      - name: bank_guid
        in: query
        required: false
        description: Comma separated bank_guids to list invoices for.
        schema:
          type: string
      - name: customer_guid
        in: query
        required: false
        description: Comma separated customer_guids to list invoices for.
        schema:
          type: string
      - name: account_guid
        in: query
        required: false
        description: Comma separated account_guids to list invoices for.
        schema:
          type: string
      - name: state
        in: query
        required: false
        description: Comma separated states to list invoices for.
        schema:
          type: string
      - name: asset
        in: query
        required: false
        description: Comma separated assets to list invoices for.
        schema:
          type: string
      - name: environment
        in: query
        required: false
        schema:
          description: The environment to list invoices for.
          type: string
          enum:
          - sandbox
          - production
      - name: label
        in: query
        required: false
        description: Comma separated labels to list invoices for.
        schema:
          type: string
      responses:
        '200':
          description: get list of invoices
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/InvoiceList"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                invalid_value:
                  value:
                    status: 400
                    error_message: comma separated bank guids must be at the most
                      4096 characters long
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank
                      or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: invoices:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/invoices/{invoice_guid}":
    delete:
      summary: Cancel Invoice
      tags:
      - Invoices
      operationId: cancelInvoice
      description: |-
        Cancels an invoice.

        Required scope: **invoices:execute**
      security:
      - BearerAuth: []
        oauth2:
        - invoices:execute
      parameters:
      - name: invoice_guid
        in: path
        required: true
        description: Identifier for the invoice.
        schema:
          type: string
      responses:
        '200':
          description: Invoice cancelled
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Invoice"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: invoices:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: Invoice not found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: Invoice not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                invalid_parameter:
                  value:
                    status: 422
                    error_message: Invalid state transition
                    message_code: invalid_parameter
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
    get:
      summary: Get Invoice
      tags:
      - Invoices
      operationId: getInvoice
      description: |-
        Retrieves a invoice.

        Required scope: **invoices:read**
      security:
      - BearerAuth: []
        oauth2:
        - invoices:read
      parameters:
      - name: invoice_guid
        in: path
        required: true
        description: Identifier for the payment instruction.
        schema:
          type: string
      responses:
        '200':
          description: invoice found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Invoice"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank
                      or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: invoices:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: invoice not found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: invoice not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/payment_instructions":
    post:
      summary: Create Payment Instruction
      tags:
      - PaymentInstructions
      operationId: createPaymentInstruction
      description: |-
        Creates a payment instruction.

        ## State

        | State | Description |
        |-------|-------------|
        | storing | The Platform is storing the payment instruction details in our private store |
        | created | The Platform has created the payment instruction |
        | expired | The PaymentInstruction is no longer valid |



        Required scope: **invoices:write**
      security:
      - BearerAuth: []
        oauth2:
        - invoices:write
      parameters: []
      responses:
        '201':
          description: Payment Instruction created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/PaymentInstruction"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: invoices:write'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                invalid_parameter:
                  value:
                    status: 400
                    error_message: Parameter expected_behaviour invalid or not permitted
                      in production
                    message_code: invalid_parameter
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '409':
          description: Conflict
          content:
            application/json:
              examples:
                data_exists:
                  value:
                    status: 409
                    error_message: Payment instruction for invoice already exists
                    message_code: data_exists
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 422
                    error_message: PaymentInstruction not found
                    message_code: not_found
                invalid_value:
                  value:
                    status: 422
                    error_message: PaymentInstruction is in an invalid state
                    message_code: invalid_value
                frozen_customer:
                  value:
                    status: 422
                    error_message: Customer has been frozen
                    message_code: frozen_customer
                rejected_customer:
                  value:
                    status: 422
                    error_message: Customer has been rejected
                    message_code: rejected_customer
                unverified_customer:
                  value:
                    status: 422
                    error_message: Customer has not been verified
                    message_code: unverified_customer
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PostPaymentInstruction"
        required: true
    get:
      summary: List Payment Instructions
      tags:
      - PaymentInstructions
      operationId: listPaymentInstructions
      description: |-
        Retrieves a list of payment instructions. Records are sorted by creation date in descending order.

        Required scope: **invoices:read**
      security:
      - BearerAuth: []
        oauth2:
        - invoices:read
      parameters:
      - name: page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPage"
        description: The page index to retrieve.
      - name: per_page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPerPage"
        description: The number of entities per page to return.
      - name: guid
        in: query
        required: false
        description: Comma separated guids to list payment instructions for.
        schema:
          type: string
      - name: bank_guid
        in: query
        required: false
        description: Comma separated bank_guids to list payment instructions for.
        schema:
          type: string
      - name: customer_guid
        in: query
        required: false
        description: Comma separated customer_guids to list payment instructions for.
        schema:
          type: string
      - name: invoice_guid
        in: query
        required: false
        description: Comma separated invoice_guids to list payment instructions for.
        schema:
          type: string
      responses:
        '200':
          description: get list of payment instructions
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/PaymentInstructionList"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                invalid_value:
                  value:
                    status: 400
                    error_message: comma separated bank guids must be at the most
                      4096 characters long
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank
                      or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: invoices:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/payment_instructions/{payment_instruction_guid}":
    get:
      summary: Get Payment Instruction
      tags:
      - PaymentInstructions
      operationId: getPaymentInstruction
      description: |-
        Retrieves a payment_instruction.

        Required scope: **invoices:read**
      security:
      - BearerAuth: []
        oauth2:
        - invoices:read
      parameters:
      - name: payment_instruction_guid
        in: path
        required: true
        description: Identifier for the payment instruction.
        schema:
          type: string
      responses:
        '200':
          description: payment_instruction found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/PaymentInstruction"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank
                      or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: invoices:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: payment_instruction not found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: payment_instruction not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/persona_sessions":
    post:
      summary: Create Persona Session
      tags:
      - PersonaSessions
      operationId: createPersonaSession
      description: |-
        Create a Persona session.

        Required scope: **persona_sessions:execute**
      security:
      - BearerAuth: []
        oauth2:
        - persona_sessions:execute
      parameters: []
      responses:
        '201':
          description: session created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/PersonaSession"
        '409':
          description: Inquiry already completed
          content:
            application/json:
              examples:
                already_exists:
                  value:
                    status: 409
                    error_message: 'Data exists: Inquiry already completed'
                    message_code: data_exists
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: persona_sessions:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: Identity verification not found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: Identity verification not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PostPersonaSession"
        required: true
  "/api/plans":
    post:
      summary: Create Plan
      tags:
      - Plans
      operationId: createPlan
      description: |-
        Creates a plan.

        ## Create a plan

        Plans can be created for a Bank or a Customer.

        To create plan for your Bank, omit the `customer_guid` parameter in the request body. To create plans for your Customers, include the `customer_guid` parameter in the request body.

        | State | Description |
        |-------|-------------|
        | storing | The Platform is storing the plan details in our private store |
        | planning | The Platform is currently building the plan |
        | completed | The Platform has successfully completed the plan |
        | failed | The Platform was not able to successfully complete the plan |



        Required scope: **plans:execute**
      security:
      - BearerAuth: []
        oauth2:
        - plans:execute
      parameters: []
      responses:
        '201':
          description: plan created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Plan"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                missing_parameter:
                  value:
                    status: 400
                    error_message: 'Missing parameter. Required: type, destination_account,
                      source_account'
                    message_code: missing_parameter
                invalid_value:
                  value:
                    status: 400
                    error_message: Invalid value. customer guids must be at the most
                      32 characters long
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: plans:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '422':
          description: Unable to process request
          content:
            application/json:
              examples:
                unprocessable_request:
                  value:
                    status: 422
                    error_message: 'Unable to process request: InvalidPurposeOfTransactionException
                      - Purpose of transaction is not accepted for this destination'
                    message_code: invalid_purpose_of_transaction
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PostPlan"
        required: true
    get:
      summary: Get plans list
      tags:
      - Plans
      operationId: listPlans
      description: |-
        Retrieves a listing of plans. Records are sorted by creation date in descending order.

        Required scope: **plans:read**
      security:
      - BearerAuth: []
        oauth2:
        - plans:read
      parameters:
      - name: page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPage"
        description: The page index to retrieve.
      - name: per_page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPerPage"
        description: The number of entities per page to return.
      - name: guid
        in: query
        required: false
        description: Comma separated plan_guids to list plans for.
        schema:
          type: string
      - name: bank_guid
        in: query
        required: false
        description: Comma separated bank_guids to list plans for.
        schema:
          type: string
      - name: customer_guid
        in: query
        required: false
        description: Comma separated customer_guids to list plans for.
        schema:
          type: string
      - name: type
        in: query
        required: false
        description: Comma separated types to list plans for.
        schema:
          type: string
      - name: state
        in: query
        required: false
        description: Comma separated states to list plans for.
        schema:
          type: string
      - name: source_account_guid
        in: query
        required: false
        description: Comma separated source account guids to list plans for.
        schema:
          type: string
      - name: destination_account_guid
        in: query
        required: false
        description: Comma separated destination account guids to list plans for.
        schema:
          type: string
      - name: created_at_gte
        in: query
        required: false
        description: Created at start date-time inclusive lower bound, ISO8601.
        schema:
          type: string
      - name: created_at_lt
        in: query
        required: false
        description: Created at end date-time exclusive upper bound, ISO8601.
        schema:
          type: string
      - name: updated_at_gte
        in: query
        required: false
        description: Updated at start date-time inclusive lower bound, ISO8601.
        schema:
          type: string
      - name: updated_at_lt
        in: query
        required: false
        description: Updated at end date-time exclusive upper bound, ISO8601.
        schema:
          type: string
      responses:
        '200':
          description: get list of plans
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/PlanList"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                invalid_value:
                  value:
                    status: 400
                    error_message: Invalid value. comma separated destination account
                      guids must be at the most 4096 characters long
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: plans:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/plans/{plan_guid}":
    get:
      summary: Get Plan
      tags:
      - Plans
      operationId: getPlan
      description: |-
        Retrieves a plan.

        Required scope: **plans:read**
      security:
      - BearerAuth: []
        oauth2:
        - plans:read
      parameters:
      - name: plan_guid
        in: path
        required: true
        description: Identifier for the payment instruction.
        schema:
          type: string
      responses:
        '200':
          description: plan found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Plan"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank
                      or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: plans:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: plan not found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: plan not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/prices":
    get:
      summary: Get Price
      tags:
      - Prices
      operationId: listPrices
      description: |-
        Retrieves a listing of symbol prices.

        ## Symbols

        Symbol are pairs and are in the format asset-counter_asset, e.g., 'BTC-USD' for the Bitcoin/ USD pair. See the Symbols API for a complete list of cryptocurrencies supported.



        Required scope: **prices:read**
      security:
      - BearerAuth: []
        oauth2:
        - prices:read
      parameters:
      - name: symbol
        in: query
        required: false
        description: Comma separated trading symbols to list prices for.
        schema:
          type: string
      - name: trading_symbol
        in: query
        required: false
        description: Comma separated trading symbols to list prices for.
        schema:
          type: string
      - name: payout_symbol
        in: query
        required: false
        description: Comma separated payout symbols to list prices for.
        schema:
          type: string
      - name: payout_country_code
        in: query
        required: false
        description: Comma separated payout country codes to list prices for.
        schema:
          type: string
      - name: payout_participants_type
        in: query
        required: false
        description: Comma separated payout participants types to list prices for.
        schema:
          type: string
      - name: payout_route
        in: query
        required: false
        description: Comma separated payout routes to list prices for.
        schema:
          type: string
      - name: bank_guid
        in: query
        required: false
        description: The bank identifier to retrieve prices for.
        schema:
          type: string
      responses:
        '200':
          description: get list of price
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/SymbolPriceResponse"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                invalid_value:
                  value:
                    status: 400
                    error_message: comma separated symbols must be at the most 4096
                      characters long
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: prices:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/quotes":
    post:
      summary: Create Quote
      tags:
      - Quotes
      operationId: createQuote
      description: |-
        Creates a quote.

        ## Quote creation

        Quotes can be created for a Bank or a Customer.

        To create quotes for your Bank, omit the `customer_guid` parameter in the request body. To create quotes for your Customers, include the `customer_guid` parameter in the request body.

        ## Failure codes

        | Code | Description |
        |------|-------------|
        | invalid_amount | The amount on the invoice is unprocessable |
        | insufficient_balance | There are insufficient funds to process the quote |
        | invalid_invoice | The invoice cannot be processed |



        Required scope: **quotes:execute**
      security:
      - BearerAuth: []
        oauth2:
        - quotes:execute
      parameters: []
      responses:
        '201':
          description: quote created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Quote"
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                missing_parameter:
                  value:
                    status: 400
                    error_message: 'Missing parameter. Required: customer_guid, symbol,
                      side'
                    message_code: missing_parameter
                invalid_value:
                  value:
                    status: 400
                    error_message: Invalid value. customer guids must be at the most
                      32 characters long
                    message_code: invalid_value
                invalid_parameter:
                  value:
                    status: 400
                    error_message: destination_accounts is required for Base blockchain
                      assets
                    message_code: invalid_parameter
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: quotes:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                unprocessable_request:
                  value:
                    status: 422
                    error_message: 'Unable to process request: InvalidAddress - Invalid
                      invoice'
                    message_code: invalid_invoice
                external_wallet_invalid:
                  value:
                    status: 422
                    error_message: Invalid external wallet
                    message_code: invalid_external_wallet
                no_trading_symbol:
                  value:
                    status: 422
                    error_message: Trading symbol not found
                    message_code: no_trading_symbol
                no_asset:
                  value:
                    status: 422
                    error_message: Asset not found
                    message_code: no_asset
                unknown_bank:
                  value:
                    status: 422
                    error_message: Bank not found
                    message_code: unknown_bank
                no_customer:
                  value:
                    status: 422
                    error_message: Customer not found
                    message_code: no_customer
                frozen_customer:
                  value:
                    status: 422
                    error_message: Customer verification has been frozen
                    message_code: frozen_customer
                rejected_customer:
                  value:
                    status: 422
                    error_message: Customer verification has been rejected
                    message_code: rejected_customer
                unverified_customer:
                  value:
                    status: 422
                    error_message: Customer has not been verified
                    message_code: unverified_customer
                no_source_account:
                  value:
                    status: 422
                    error_message: Source account not found
                    message_code: no_source_account
                no_destination_account:
                  value:
                    status: 422
                    error_message: Destination account not found
                    message_code: no_destination_account
                invalid_source_account:
                  value:
                    status: 422
                    error_message: Invalid source account
                    message_code: invalid_source_account
                invalid_destination_account:
                  value:
                    status: 422
                    error_message: Invalid destination account
                    message_code: invalid_destination_account
                no_quote:
                  value:
                    status: 422
                    error_message: No quote available
                    message_code: no_quote
                not_implemented:
                  value:
                    status: 422
                    error_message: Invalid call method
                    message_code: not_implemented
                invalid_quote_amount:
                  value:
                    status: 422
                    error_message: Invalid quote amount
                    message_code: invalid_quote_amount
                invalid_quote_fee_estimate_amount:
                  value:
                    status: 422
                    error_message: Invalid quote fee estimate amount
                    message_code: invalid_quote_fee_estimate_amount
                unsupported_trading_symbol:
                  value:
                    status: 422
                    error_message: Unsupported symbol
                    message_code: unsupported_trading_symbol
                invalid_value:
                  value:
                    status: 422
                    error_message: Unsupported asset
                    message_code: invalid_value
                invalid_parameter_1:
                  value:
                    status: 422
                    error_message: Invalid side
                    message_code: invalid_parameter
                invalid_parameter_2:
                  value:
                    status: 422
                    error_message: Invalid address
                    message_code: invalid_parameter
                invalid_amount:
                  value:
                    status: 422
                    error_message: Invalid amount
                    message_code: invalid_amount
                insufficient_balance:
                  value:
                    status: 422
                    error_message: Insufficient balance
                    message_code: insufficient_balance
                invalid_invoice:
                  value:
                    status: 422
                    error_message: Invalid invoice
                    message_code: invalid_invoice
                invalid_asset:
                  value:
                    status: 422
                    error_message: Asset not supported for batch withdrawal
                    message_code: invalid_asset
                invalid_external_wallet:
                  value:
                    status: 422
                    error_message: Invalid external wallet
                    message_code: invalid_external_wallet
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PostQuote"
        required: true
    get:
      summary: Get quotes list
      tags:
      - Quotes
      operationId: listQuotes
      description: |-
        Retrieves a listing of quotes. Records are sorted by creation date in descending order.

        Required scope: **quotes:read**
      security:
      - BearerAuth: []
        oauth2:
        - quotes:read
      parameters:
      - name: page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPage"
      - name: per_page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPerPage"
      - name: guid
        in: query
        required: false
        description: Comma separated quote_guids to list quotes for.
        schema:
          type: string
      - name: product_type
        in: query
        required: false
        description: Comma separated product_types to list accounts for.
        schema:
          type: string
      - name: bank_guid
        in: query
        required: false
        description: Comma separated bank_guids to list quotes for.
        schema:
          type: string
      - name: customer_guid
        in: query
        required: false
        description: Comma separated customer_guids to list quotes for.
        schema:
          type: string
      - name: side
        in: query
        required: false
        description: Comma separated sides to list quotes for.
        schema:
          type: string
      responses:
        '200':
          description: get list of quotes
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/QuoteList"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                invalid_value:
                  value:
                    status: 400
                    error_message: Invalid value. comma separated bank guids must
                      be at the most 4096 characters long
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: quotes:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/quotes/{quote_guid}":
    get:
      summary: Get Quote
      tags:
      - Quotes
      operationId: getQuote
      description: |-
        Retrieves a quote.

        Required scope: **quotes:read**
      security:
      - BearerAuth: []
        oauth2:
        - quotes:read
      parameters:
      - name: quote_guid
        in: path
        required: true
        description: Identifier for the quote.
        schema:
          type: string
      responses:
        '200':
          description: quote found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Quote"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: quotes:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: quote not found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: quote not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/symbols":
    get:
      summary: Get Symbols list
      tags:
      - Symbols
      operationId: listSymbols
      description: 'Retrieves a listing of symbols.Required scope: **prices:read**'
      security:
      - BearerAuth: []
        oauth2:
        - prices:read
      responses:
        '200':
          description: get list of symbols
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Symbols"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or customer'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/trades":
    post:
      summary: Create Trade
      tags:
      - Trades
      operationId: createTrade
      description: |-
        Creates a trade.

        ## State

        | State | Description |
        |-------|-------------|
        | storing | The Platform is storing the trade details in our private store |
        | pending | The Platform has stored the trade details and is processing it |
        | executed | The Platform has processed the trade and needs to settle it |
        | settling | The Platform has executed the trade and is settling the funds |
        | cancelled | The Platform has cancelled the trade |
        | completed | The Platform has successfully completed the trade |
        | failed | The Platform was not able to successfully complete the trade |

        ## Failure codes

        | Code | Description |
        |------|-------------|
        | non_sufficient_funds | The delivery account does not have enough funds to complete the trade |
        | unsupported | The trading pair is not supported for this customer |
        | limit_exceeded | The customer is over the limits that have been set for them for this activity |
        | daily_limit_exceeded | The customer is over their daily limits for this activity |
        | weekly_limit_exceeded | The customer is over their weekly limits for this activity |
        | monthly_limit_exceeded | The customer is over their monthly limits for this activity |
        | expired_quote | The quote expired before it could be executed |
        | market_volatility | The quote could not be executed due to market volatility |
        | not_filled | The trade could not be filled based on the amounts specified |



        Required scope: **trades:execute**
      security:
      - BearerAuth: []
        oauth2:
        - trades:execute
      parameters: []
      responses:
        '201':
          description: Trade created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Trade"
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                missing_parameter:
                  value:
                    status: 400
                    error_message: 'Missing parameter. Required: quote_guid'
                    message_code: missing_parameter
                invalid_value:
                  value:
                    status: 400
                    error_message: Invalid value. quote guid must be at the most 32
                      characters long
                    message_code: invalid_value
                invalid_parameter:
                  value:
                    status: 400
                    error_message: Invalid configuration
                    message_code: invalid_parameter
                invalid_parameter_value:
                  value:
                    status: 400
                    error_message: 'Invalid value exception. Parameter: expected_error
                      supported values: ["expired_quote", "non_sufficient_funds"] '
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: trades:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '409':
          description: Conflict
          content:
            application/json:
              examples:
                already_exists:
                  value:
                    status: 409
                    error_message: 'Data exists: Trade for quote already exists'
                    message_code: data_exists
                quote_already_exists:
                  value:
                    status: 409
                    error_message: Trade for quote already exists
                    message_code: quote_already_exists
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                unprocessable_request:
                  value:
                    status: 422
                    error_message: 'Unable to process request: QuoteExpiredException
                      - Quote has expired'
                    message_code: quote_expired
                quote_expired:
                  value:
                    status: 422
                    error_message: Quote expired
                    message_code: quote_expired
                invalid_parameter:
                  value:
                    status: 422
                    error_message: Quote invalid
                    message_code: invalid_parameter
                frozen_customer:
                  value:
                    status: 422
                    error_message: Customer has been frozen
                    message_code: frozen_customer
                rejected_customer:
                  value:
                    status: 422
                    error_message: Customer has been rejected
                    message_code: rejected_customer
                unverified_customer:
                  value:
                    status: 422
                    error_message: Customer has not been verified
                    message_code: unverified_customer
                no_quote:
                  value:
                    status: 422
                    error_message: Quote not found
                    message_code: no_quote
                no_source_account:
                  value:
                    status: 422
                    error_message: Source account not found
                    message_code: no_source_account
                invalid_source_account:
                  value:
                    status: 422
                    error_message: Source account state invalid
                    message_code: invalid_source_account
                no_destination_account:
                  value:
                    status: 422
                    error_message: Destination account not found
                    message_code: no_destination_account
                invalid_destination_account:
                  value:
                    status: 422
                    error_message: Destination account state invalid
                    message_code: invalid_destination_account
                invalid_fiat_account:
                  value:
                    status: 422
                    error_message: Multiple fiat accounts found
                    message_code: invalid_fiat_account
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PostTrade"
        required: true
    get:
      summary: Get trades list
      tags:
      - Trades
      operationId: listTrades
      description: |-
        Retrieves a listing of trades. Records are sorted by creation date in descending order.

        Required scope: **trades:read**
      security:
      - BearerAuth: []
        oauth2:
        - trades:read
      parameters:
      - name: page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPage"
        description: The page index to retrieve.
      - name: per_page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPerPage"
        description: The number of entities per page to return.
      - name: guid
        in: query
        required: false
        description: Comma separated trade_guids to list trades for.
        schema:
          type: string
      - name: bank_guid
        in: query
        required: false
        description: Comma separated bank_guids to list trades for.
        schema:
          type: string
      - name: customer_guid
        in: query
        required: false
        description: Comma separated customer_guids to list trades for.
        schema:
          type: string
      - name: account_guid
        in: query
        required: false
        description: Comma separated account_guids to list trades for.
        schema:
          type: string
      - name: state
        in: query
        required: false
        description: Comma separated states to list trades for.
        schema:
          type: string
      - name: side
        in: query
        required: false
        description: Comma separated sides to list trades for.
        schema:
          type: string
      - name: label
        in: query
        required: false
        description: Comma separated labels to list trades for.
        schema:
          type: string
      - name: created_at_gte
        in: query
        required: false
        description: Created at start date-time inclusive lower bound, ISO8601.
        schema:
          type: string
      - name: created_at_lt
        in: query
        required: false
        description: Created at end date-time exclusive upper bound, ISO8601.
        schema:
          type: string
      - name: updated_at_gte
        in: query
        required: false
        description: Updated at start date-time inclusive lower bound, ISO8601.
        schema:
          type: string
      - name: updated_at_lt
        in: query
        required: false
        description: Updated at end date-time exclusive upper bound, ISO8601.
        schema:
          type: string
      responses:
        '200':
          description: get list of trades
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/TradeList"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                invalid_value:
                  value:
                    status: 400
                    error_message: Invalid value. comma separated account guids must
                      be at the most 4096 characters long
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: trades:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/trades/{trade_guid}":
    get:
      summary: Get Trade
      tags:
      - Trades
      operationId: getTrade
      description: |-
        Retrieves a trade.

        Required scope: **trades:read**
      security:
      - BearerAuth: []
        oauth2:
        - trades:read
      parameters:
      - name: trade_guid
        in: path
        required: true
        description: Identifier for the trade.
        schema:
          type: string
      responses:
        '200':
          description: trade found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Trade"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: bank or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: trades:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: trade not found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: trade not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/transfers":
    post:
      summary: Create Transfer
      tags:
      - Transfers
      operationId: createTransfer
      description: |-
        Creates a transfer.

        ## State

        | State | Description |
        |-------|-------------|
        | storing | The Platform is storing the transfer details in our private store |
        | reviewing | The Platform is reviewing the transfer for compliance |
        | pending | The Platform is executing the transfer |
        | completed | The Platform has successfully completed the transfer |
        | failed | The Platform was not able to successfully complete the transfer |

        ## Failure codes

        | Code | Description |
        |------|-------------|
        | amount_too_low | The transfer was rejected due to the amount being too low |
        | cancelled | The transfer was manually cancelled |
        | compliance_rejection | The transfer was rejected for compliance reasons |
        | internal_error | An internal error occurred while processing the transfer, please try again |
        | invalid_address | The destination address is invalid for transfer |
        | invalid_balance | There was insufficient balance for all required currencies to complete the transfer |
        | return_risk_exceeded | The risk of return is too high for this activity to be completed |
        | limit_exceeded | The customer is over the limits that have been set for them for this activity |
        | daily_limit_exceeded | The customer is over their daily limits for this activity |
        | weekly_limit_exceeded | The customer is over their weekly limits for this activity |
        | monthly_limit_exceeded | The customer is over their monthly limits for this activity |
        | network_fee_too_low | The transfer was rejected due to the network fee being too low |
        | non_sufficient_funds | The customer does not have enough funds to complete the transfer |
        | party_name_invalid | The transfer's associated external bank account has an invalid party name |
        | payment_rail_invalid | The payment rail specified for the transfer is not supported by the external bank account |
        | payment_request_expired | The payment request expired before it could be completed |
        | plaid_access_not_granted | See the description from Plaid [here](https://plaid.com/docs/errors/item/#access_not_granted) |
        | plaid_institution_not_responding | See the description from Plaid [here](https://plaid.com/docs/errors/institution/#institution_not_responding) |
        | plaid_internal_server_error | See the description from Plaid [here](https://plaid.com/docs/errors/api/#internal_server_error-or-plaid-internal-error) |
        | plaid_item_not_found | See the description from Plaid [here](https://plaid.com/docs/errors/item/#item_not_found) |
        | plaid_item_not_supported | See the description from Plaid [here](https://plaid.com/docs/errors/item/#item_not_supported) |
        | plaid_multiple_accounts | Multiple accounts were selected through Plaid Link. |
        | plaid_no_accounts | See the description from Plaid [here](https://plaid.com/docs/errors/item/#no_accounts) |
        | plaid_none_balances_error | The transfer was rejected due to an error with the balances retrieved by Plaid |
        | plaid_unknown_error | See the description from Plaid [here](https://plaid.com/docs/errors/api/#unknown_error) |
        | refresh_required | The transfer's associated external_bank_account needs to be reconnected via Plaid |
        | invalid_destination | Issues with the destination details (invalid, closed, blocked) |
        | customer_action_required | Authorization declined or customer action required |
        | external_vendor_error | Unexpected error occurred with an external vendor or partner service during transfer processing  |
        | reversed | The transfer was reversed |

        ## Failure codes that will result in a state change for the associated external bank account

        | Code | Description |
        |------|-------------|
        | refresh_required | The transfer was rejected due to the external bank account needing to be refreshed. The external bank account will be put in the state `refresh_required` |
        | plaid_access_not_granted | The transfer was rejected due to the external bank account needing to be reconnected via Plaid. The external bank account will be put in the state `deleted` |
        | plaid_item_not_found | The transfer was rejected due to the external bank account needing to be reconnected via Plaid. The external bank account will be put in the state `deleted` |
        | plaid_item_not_supported | The transfer was rejected because the account is not supported. A different account should be connected via Plaid. The external bank account will be put in the state `deleted` |
        | plaid_multiple_accounts | The transfer was rejected because multiple accounts were selected through Plaid Link. Only one account must be selected. The external bank account will be put in the state `deleted` |
        | plaid_no_accounts | The transfer was rejected because no compatible accounts could be found. The external bank account will be put in the state `deleted` |



        Required scope: **transfers:execute**
      security:
      - BearerAuth: []
        oauth2:
        - transfers:execute
      parameters: []
      responses:
        '201':
          description: Transfer created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Transfer"
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: organization or
                      bank or customer'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Forbidden
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: transfers:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '409':
          description: Conflict
          content:
            application/json:
              examples:
                quote_already_exists:
                  value:
                    status: 409
                    error_message: Transfer already exists for this quote
                    message_code: quote_already_exists
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                invalid_transfer:
                  value:
                    status: 422
                    error_message: Transfer invalid
                    message_code: invalid_transfer
                invalid_parameter_1:
                  value:
                    status: 422
                    error_message: Expected behaviour invalid
                    message_code: invalid_parameter
                invalid_parameter_2:
                  value:
                    status: 422
                    error_message: Quote invalid
                    message_code: invalid_parameter
                invalid_value_1:
                  value:
                    status: 422
                    error_message: Asset not supported
                    message_code: invalid_value
                invalid_value_2:
                  value:
                    status: 422
                    error_message: Amount is above the configured threshold
                    message_code: invalid_value
                invalid_value_3:
                  value:
                    status: 422
                    error_message: Send as account not found
                    message_code: invalid_value
                invalid_value_4:
                  value:
                    status: 422
                    error_message: Send as account not valid for transfer
                    message_code: invalid_value
                invalid_value_5:
                  value:
                    status: 422
                    error_message: Send as account cannot be defined for this transfer
                    message_code: invalid_value
                invalid_value_6:
                  value:
                    status: 422
                    error_message: Receive as account not valid for transfer
                    message_code: invalid_value
                invalid_value_7:
                  value:
                    status: 422
                    error_message: Transfer association is not valid
                    message_code: invalid_value
                invalid_value_8:
                  value:
                    status: 422
                    error_message: Amount not valid
                    message_code: invalid_value
                invalid_value_9:
                  value:
                    status: 422
                    error_message: Participants must be specified
                    message_code: invalid_value
                invalid_value_10:
                  value:
                    status: 422
                    error_message: Participant types not supported
                    message_code: invalid_value
                invalid_value_11:
                  value:
                    status: 422
                    error_message: Participants not found
                    message_code: invalid_value
                invalid_value_12:
                  value:
                    status: 422
                    error_message: Participants have been frozen
                    message_code: invalid_value
                invalid_value_13:
                  value:
                    status: 422
                    error_message: Participants have been rejected
                    message_code: invalid_value
                invalid_value_14:
                  value:
                    status: 422
                    error_message: Participants have not been verified
                    message_code: invalid_value
                no_quote:
                  value:
                    status: 422
                    error_message: Quote not found
                    message_code: no_quote
                quote_expired:
                  value:
                    status: 422
                    error_message: Quote expired
                    message_code: quote_expired
                frozen_customer:
                  value:
                    status: 422
                    error_message: Customer has been frozen
                    message_code: frozen_customer
                rejected_customer:
                  value:
                    status: 422
                    error_message: Customer has been rejected
                    message_code: rejected_customer
                unverified_customer:
                  value:
                    status: 422
                    error_message: Customer has not been verified
                    message_code: unverified_customer
                no_account_1:
                  value:
                    status: 422
                    error_message: Account not found
                    message_code: no_account
                no_account_2:
                  value:
                    status: 422
                    error_message: Deposit address account not found
                    message_code: no_account
                no_account_3:
                  value:
                    status: 422
                    error_message: Deposit bank account account not found
                    message_code: no_account
                no_account_4:
                  value:
                    status: 422
                    error_message: Parent deposit bank account account not found
                    message_code: no_account
                invalid_account:
                  value:
                    status: 422
                    error_message: Account invalid
                    message_code: invalid_account
                invalid_fiat_account_1:
                  value:
                    status: 422
                    error_message: Multiple accounts found
                    message_code: invalid_fiat_account
                invalid_fiat_account_2:
                  value:
                    status: 422
                    error_message: Bank fiat account state invalid
                    message_code: invalid_fiat_account
                no_source_account:
                  value:
                    status: 422
                    error_message: Source account not found
                    message_code: no_source_account
                invalid_source_account:
                  value:
                    status: 422
                    error_message: Source account invalid
                    message_code: invalid_source_account
                no_destination_account:
                  value:
                    status: 422
                    error_message: Destination account not found
                    message_code: no_destination_account
                invalid_destination_account:
                  value:
                    status: 422
                    error_message: Destination account invalid
                    message_code: invalid_destination_account
                no_invoice_operations_account:
                  value:
                    status: 422
                    error_message: Invoice operations account not found
                    message_code: no_invoice_operations_account
                invalid_invoice_operations_account:
                  value:
                    status: 422
                    error_message: Invoice operations account invalid
                    message_code: invalid_invoice_operations_account
                invalid_external_bank_account_1:
                  value:
                    status: 422
                    error_message: External bank account not found
                    message_code: invalid_external_bank_account
                invalid_external_bank_account_2:
                  value:
                    status: 422
                    error_message: External bank account invalid
                    message_code: invalid_external_bank_account
                invalid_external_wallet_1:
                  value:
                    status: 422
                    error_message: External wallet not found
                    message_code: invalid_external_wallet
                invalid_external_wallet_2:
                  value:
                    status: 422
                    error_message: External wallet invalid
                    message_code: invalid_external_wallet
                invalid_external_wallet_3:
                  value:
                    status: 422
                    error_message: external_wallet_guid is required
                    message_code: invalid_external_wallet
                no_fee_account:
                  value:
                    status: 422
                    error_message: Bank fee account not found
                    message_code: no_fee_account
                invalid_fee_account:
                  value:
                    status: 422
                    error_message: Bank fee account invalid
                    message_code: invalid_fee_account
                invalid_payment_rail_for_country:
                  value:
                    status: 422
                    error_message: Invalid country for payment rail
                    message_code: invalid_payment_rail_for_country
                invalid_payment_rail_for_direction:
                  value:
                    status: 422
                    error_message: Invalid direction for payment rail
                    message_code: invalid_payment_rail_for_direction
                not_implemented:
                  value:
                    status: 422
                    error_message: Invalid call method
                    message_code: not_implemented
                external_id_already_exists:
                  value:
                    status: 422
                    error_message: Transfer with this external_id already exists
                    message_code: external_id_already_exists
                no_fiat_account:
                  value:
                    status: 422
                    error_message: Bank fiat account not found
                    message_code: no_fiat_account
                no_network_fee_account:
                  value:
                    status: 422
                    error_message: Network fee account not found
                    message_code: no_network_fee_account
                no_transfer:
                  value:
                    status: 422
                    error_message: Transfer not found
                    message_code: no_transfer
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PostTransfer"
        required: true
    get:
      summary: Get transfers list
      tags:
      - Transfers
      operationId: listTransfers
      description: |-
        Retrieves a listing of transfers. Records are sorted by creation date in descending order.

        Required scope: **transfers:read**
      security:
      - BearerAuth: []
        oauth2:
        - transfers:read
      parameters:
      - name: page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPage"
        description: The page index to retrieve.
      - name: per_page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPerPage"
        description: The number of entities per page to return.
      - name: guid
        in: query
        required: false
        description: Comma separated transfer_guids to list transfers for.
        schema:
          type: string
      - name: transfer_type
        in: query
        required: false
        description: Comma separated transfer_types to list accounts for.
        schema:
          type: string
      - name: bank_guid
        in: query
        required: false
        description: Comma separated bank_guids to list transfers for.
        schema:
          type: string
      - name: customer_guid
        in: query
        required: false
        description: Comma separated customer_guids to list transfers for.
        schema:
          type: string
      - name: account_guid
        in: query
        required: false
        description: Comma separated account_guids to list transfers for.
        schema:
          type: string
      - name: state
        in: query
        required: false
        description: Comma separated states to list transfers for.
        schema:
          type: string
      - name: side
        in: query
        required: false
        description: Comma separated sides to list transfers for.
        schema:
          type: string
      - name: label
        in: query
        required: false
        description: Comma separated labels to list transfers for.
        schema:
          type: string
      - name: txn_hash
        in: query
        required: false
        description: Comma separated transaction hashes to list transfers for.
        schema:
          type: string
      - name: created_at_gte
        in: query
        required: false
        description: Created at start date-time inclusive lower bound, ISO8601
        schema:
          type: string
      - name: created_at_lt
        in: query
        required: false
        description: Created at end date-time exclusive upper bound, ISO8601.
        schema:
          type: string
      - name: updated_at_gte
        in: query
        required: false
        description: Created at start date-time inclusive lower bound, ISO8601
        schema:
          type: string
      - name: updated_at_lt
        in: query
        required: false
        description: Created at end date-time exclusive upper bound, ISO8601.
        schema:
          type: string
      responses:
        '200':
          description: get list of transfers
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/TransferList"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                invalid_value:
                  value:
                    status: 400
                    error_message: Invalid value. comma separated account guids must
                      be at the most 4096 characters long
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank
                      or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: transfers:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/transfers/{transfer_guid}":
    get:
      summary: Get Transfer
      tags:
      - Transfers
      operationId: getTransfer
      description: |-
        Retrieves a transfer.

        Required scope: **transfers:read**
      security:
      - BearerAuth: []
        oauth2:
        - transfers:read
      parameters:
      - name: transfer_guid
        in: path
        required: true
        description: Identifier for the transfer.
        schema:
          type: string
      responses:
        '200':
          description: transfer found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Transfer"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank
                      or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: transfers:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: transfer not found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: transfer not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
    patch:
      summary: Patch Transfer
      tags:
      - Transfers
      operationId: updateTransfer
      description: |-
        Update a transfer.

        Required scope: **transfers:write**
      security:
      - BearerAuth: []
        oauth2:
        - transfers:write
      parameters:
      - name: transfer_guid
        in: path
        required: true
        description: Identifier for the transfer.
        schema:
          type: string
      responses:
        '200':
          description: Transfer updated
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Transfer"
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: organization or
                      bank or customer'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Forbidden
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: transfers:write'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: Not Found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: Transfer not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                invalid_value_1:
                  value:
                    status: 422
                    error_message: Participants must be specified
                    message_code: invalid_value
                invalid_value_2:
                  value:
                    status: 422
                    error_message: Participant types not supported
                    message_code: invalid_value
                invalid_value_3:
                  value:
                    status: 422
                    error_message: Participants not found
                    message_code: invalid_value
                invalid_value_4:
                  value:
                    status: 422
                    error_message: Participants have been frozen
                    message_code: invalid_value
                invalid_value_5:
                  value:
                    status: 422
                    error_message: Participants have been rejected
                    message_code: invalid_value
                invalid_value_6:
                  value:
                    status: 422
                    error_message: Participants have not been verified
                    message_code: invalid_value
                invalid_value_7:
                  value:
                    status: 422
                    error_message: Participants already set
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PatchTransfer"
        required: true
  "/api/workflows":
    post:
      summary: Create Workflow
      tags:
      - Workflows
      operationId: createWorkflow
      description: |-
        Creates a workflow.

        ## State

        | State | Description |
        |-------|-------------|
        | storing | The Platform is storing the workflow details in our private store |
        | completed | The Platform has created the workflow |
        | failed | The workflow was not completed successfully |

        ## Plaid

        | Param | Description |
        |-------|-------------|
        | redirect_uri | All URIs must be registered with Cybrid. For local testing use `http://localhost:4200/bank-account-connect` |



        Required scope: **workflows:execute**
      security:
      - BearerAuth: []
        oauth2:
        - workflows:execute
      parameters: []
      responses:
        '201':
          description: Workflow created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Workflow"
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                missing_parameter:
                  value:
                    status: 400
                    error_message: 'Missing parameter. Required: type'
                    message_code: missing_parameter
                invalid_parameter:
                  value:
                    status: 400
                    error_message: Invalid state
                    message_code: invalid_parameter
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: workflows:execute'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                unprocessable_request:
                  value:
                    status: 422
                    error_message: 'Unable to process request: InvalidBankCountryCodeConfiguration
                      - Invalid bank configuration: country codes'
                    message_code: invalid_parameter
                invalid_parameter_1:
                  value:
                    status: 422
                    error_message: Invalid state transition
                    message_code: invalid_parameter
                invalid_parameter_2:
                  value:
                    status: 422
                    error_message: 'Invalid bank configuration: country codes'
                    message_code: invalid_parameter
                invalid_parameter_3:
                  value:
                    status: 422
                    error_message: Invalid redirect URI
                    message_code: invalid_parameter
                no_customer:
                  value:
                    status: 422
                    error_message: Customer not found
                    message_code: no_customer
                invalid_external_bank_account:
                  value:
                    status: 422
                    error_message: External bank account not found
                    message_code: invalid_external_bank_account
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PostWorkflow"
        required: true
    get:
      summary: Get workflows list
      tags:
      - Workflows
      operationId: listWorkflows
      description: |-
        Retrieves a listing of workflows. Records are sorted by creation date in descending order.

        Required scope: **workflows:read**
      security:
      - BearerAuth: []
        oauth2:
        - workflows:read
      parameters:
      - name: page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPage"
        description: The page index to retrieve.
      - name: per_page
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/ListRequestPerPage"
        description: The number of entities per page to return.
      - name: guid
        in: query
        required: false
        description: Comma separated workflow_guids to list workflows for.
        schema:
          type: string
      - name: bank_guid
        in: query
        required: false
        description: Comma separated bank_guids to list workflows for.
        schema:
          type: string
      - name: customer_guid
        in: query
        required: false
        description: Comma separated customer_guids to list workflows for.
        schema:
          type: string
      responses:
        '200':
          description: get list of workflows
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/WorkflowsList"
        '400':
          description: Invalid requests
          content:
            application/json:
              examples:
                invalid_value:
                  value:
                    status: 400
                    error_message: Invalid value. comma separated bank guids must
                      be at the most 4096 characters long
                    message_code: invalid_value
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank
                      or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: workflows:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
  "/api/workflows/{workflow_guid}":
    get:
      summary: Get Workflow
      tags:
      - Workflows
      operationId: getWorkflow
      description: |-
        Retrieves a workflow.

        Required scope: **workflows:read**
      security:
      - BearerAuth: []
        oauth2:
        - workflows:read
      parameters:
      - name: workflow_guid
        in: path
        required: true
        description: Identifier for the workflow.
        schema:
          type: string
      responses:
        '200':
          description: trade found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/WorkflowWithDetails"
        '401':
          description: 'Unauthorized - Authentication failed, '
          content:
            application/json:
              examples:
                invalid_subject:
                  value:
                    status: 401
                    error_message: 'Invalid Subject type. Required: customer or bank
                      or organization'
                    message_code: invalid_subject
                invalid_signature:
                  value:
                    status: 401
                    error_message: Signature verification raised
                    message_code: authentication_failed
                invalid_audience:
                  value:
                    status: 401
                    error_message: Invalid audience
                    message_code: authentication_failed
                invalid_issuer:
                  value:
                    status: 401
                    error_message: Invalid issuer
                    message_code: authentication_failed
                expired_signature:
                  value:
                    status: 401
                    error_message: Signature has expired
                    message_code: authentication_failed
                malformed_auth_header:
                  value:
                    status: 401
                    error_message: Authorization header is malformed.
                    message_code: authentication_malformed
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '403':
          description: Invalid scope
          content:
            application/json:
              examples:
                invalid_scope:
                  value:
                    status: 403
                    error_message: 'Invalid scopes. Required: workflows:read'
                    message_code: invalid_scopes
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '404':
          description: workflow not found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    status: 404
                    error_message: workflow not found
                    message_code: not_found
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
components:
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://id.production.cybrid.app/oauth/token
          scopes:
            banks:read: banks read
            banks:write: banks write
            bank_applications:read: bank_applications read
            bank_applications:write: bank_applications write
            bank_applications:execute: bank_applications execute
            accounts:read: accounts read
            accounts:execute: accounts execute
            counterparties:read: counterparties read
            counterparties:pii:read: counterparties pii read
            counterparties:write: counterparties write
            counterparties:execute: counterparties execute
            customers:read: customers read
            customers:pii:read: customers pii read
            customers:write: customers write
            customers:execute: customers execute
            prices:read: prices read
            quotes:execute: quotes execute
            quotes:read: quotes read
            trades:execute: trades execute
            trades:read: trades read
            transfers:execute: transfers execute
            transfers:read: transfers read
            transfers:write: transfers write
            external_bank_accounts:read: external_bank_accounts read
            external_bank_accounts:pii:read: external_bank_accounts pii read
            external_bank_accounts:write: external_bank_accounts write
            external_bank_accounts:execute: external_bank_accounts execute
            external_wallets:read: external_wallets read
            external_wallets:execute: external_wallets execute
            workflows:read: workflows read
            workflows:execute: workflows execute
            deposit_addresses:read: deposit_addresses read
            deposit_addresses:execute: deposit_addresses execute
            deposit_bank_accounts:read: deposit_bank_accounts read
            deposit_bank_accounts:execute: deposit_bank_accounts execute
            invoices:read: invoices read
            invoices:write: invoices write
            invoices:execute: invoices execute
            identity_verifications:read: identity_verifications read
            identity_verifications:pii:read: identity_verifications pii read
            identity_verifications:write: identity_verifications write
            identity_verifications:execute: identity_verifications execute
            persona_sessions:execute: persona_sessions execute
            plans:execute: plans execute
            plans:read: plans read
            executions:execute: executions execute
            executions:read: executions read
            files:read: files read
            files:pii:read: files pii read
            files:execute: files execute
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
  schemas:
    Asset:
      type: object
      properties:
        type:
          description: The asset type; one of fiat or crypto.
          type: string
        code:
          description: The unique code for the asset.
          type: string
          minLength: 1
          maxLength: 16
        name:
          description: The name of the asset.
          type: string
          minLength: 1
          maxLength: 128
        symbol:
          description: The currency symbol for the asset.
          type: string
          minLength: 1
          maxLength: 16
        decimals:
          description: The number of decimals for the default unit of the asset.
          type: integer
          minimum: 0
      required:
      - type
      - code
      - name
      - symbol
      - decimals
    AssetTypes:
      type: string
      enum:
      - fiat
      - crypto
    ActivityType:
      type: string
      description: The activity type
      enum:
      - trading
      - funding
      - book_transfer
      - crypto_transfer
    ActivitySide:
      type: string
      description: The activity side
      enum:
      - deposit
      - withdrawal
    ActivityLimit:
      type: object
      properties:
        type:
          type: string
          description: The type of the limit; one of rolling, daily, weekly, or monthly.
        name:
          type: string
          description: The name of the limit.
        asset:
          type: string
          description: The asset code for the limit.
        amount:
          type: integer
          description: The limit amount for the asset.
        interval:
          type: integer
          description: The limit interval in seconds for the asset.
          nullable: true
        activities:
          type: array
          items:
            type: string
          description: The activities associated with the limit.
        sides:
          type: array
          items:
            type: string
          description: The sides associated with the limit.
    AssetList:
      type: object
      properties:
        total:
          description: The total number of records available.
          type: integer
          minimum: 0
        page:
          description: The page index to retrieve.
          type: integer
          minimum: 0
        per_page:
          description: The number of entities per page to return.
          type: integer
          minimum: 1
        objects:
          type: array
          items:
            "$ref": "#/components/schemas/Asset"
      required:
      - total
      - page
      - per_page
      - objects
    Bank:
      type: object
      properties:
        guid:
          description: Auto-generated unique identifier for the bank.
          type: string
          minLength: 32
          maxLength: 32
        organization_guid:
          description: The organization's identifier.
          type: string
          minLength: 32
          maxLength: 32
        name:
          description: The bank's name.
          type: string
          minLength: 1
          maxLength: 128
        type:
          description: The bank type; one of sandbox or production.
          type: string
        supported_trading_symbols:
          description: The bank's list of supported trading symbols.
          type: array
          items:
            type: string
        supported_payout_symbols:
          description: The bank's list of supported payout symbols.
          type: array
          items:
            type: object
            properties:
              symbol:
                description: The payout symbol code.
                type: string
              country_code:
                description: The ISO 3166 country 2-Alpha country code of the payout
                  symbol.
                type: string
              participants_type:
                description: The participants type; one of C2C, C2B, B2C, or B2B.
                type: string
              route:
                description: The payout symbol route; one of bank_account or mobile_wallet.
                type: string
        supported_fiat_account_assets:
          description: The bank's list of supported fiat symbols.
          type: array
          items:
            type: string
        supported_country_codes:
          description: The bank's list of supported country codes.
          type: array
          items:
            type: string
        features:
          description: The bank's enabled features.
          type: array
          items:
            description: 'A combination of: kyc_identity_verifications, attestation_identity_records,
              attestation_identity_records_v2, attestation_identity_records_v3, raw_routing_details,
              individual_customers, business_customers, counterparty_external_accounts,
              business_customer_raw_routing_details, and individual_customer_raw_routing_details.'
            type: string
        cors_allowed_origins:
          description: The bank's list of CORS allowed origins.
          type: array
          items:
            type: string
        created_at:
          type: string
          description: ISO8601 datetime the record was created at.
          format: date-time
        updated_at:
          type: string
          description: ISO8601 datetime the record was last updated at.
          format: date-time
      required:
      - guid
      - organization_guid
      - name
      - type
      - features
      - created_at
    BankType:
      type: string
      enum:
      - sandbox
      - production
    BankFeature:
      type: string
      enum:
      - kyc_identity_verifications
      - attestation_identity_records
      - attestation_identity_records_v2
      - attestation_identity_records_v3
      - raw_routing_details
      - individual_customers
      - business_customers
      - counterparty_external_accounts
      - business_customer_raw_routing_details
      - individual_customer_raw_routing_details
    BankList:
      type: object
      properties:
        total:
          description: The total number of records available.
          type: integer
          minimum: 0
        page:
          description: The page index to retrieve.
          type: integer
          minimum: 0
        per_page:
          description: The number of entities per page to return.
          type: integer
          minimum: 1
        objects:
          type: array
          items:
            "$ref": "#/components/schemas/Bank"
      required:
      - total
      - page
      - per_page
      - objects
    Counterparty:
      type: object
      properties:
        guid:
          description: Auto-generated unique identifier for the counterparty.
          type: string
          minLength: 32
          maxLength: 32
        type:
          description: The counterparty type; one of business or individual.
          type: string
        bank_guid:
          description: Auto-generated unique identifier for the counterparty's bank.
          type: string
          minLength: 32
          maxLength: 32
        customer_guid:
          description: Auto-generated unique identifier for the counterparty's customer.
          type: string
          minLength: 32
          maxLength: 32
          nullable: true
        created_at:
          type: string
          description: ISO8601 datetime the record was created at.
          format: date-time
        updated_at:
          type: string
          description: ISO8601 datetime the record was last updated at.
          format: date-time
        state:
          description: The counterparty state; one of storing, unverified, verified,
            or rejected.
          type: string
        name:
          description: The counterparty's name. Only available for GET operations
            when 'include_pii' is set.
          type: object
          properties:
            first:
              description: The counterparty's first name.
              type: string
              nullable: true
            middle:
              description: The counterparty's middle name.
              type: string
              nullable: true
            last:
              description: The counterparty's last name.
              type: string
              nullable: true
            full:
              description: The counterparty's full name.
              type: string
              nullable: true
          nullable: true
        address:
          description: The counterparty's address. Only available for GET operations
            when 'include_pii' is set.
          type: object
          properties:
            street:
              description: The first line of the address.
              type: string
              nullable: true
            street2:
              description: The optional second line of the address.
              type: string
              nullable: true
            city:
              description: The city of the address.
              type: string
              nullable: true
            subdivision:
              description: The ISO 3166-2 subdivision code of the address; not used
                by all countries.
              type: string
              nullable: true
            postal_code:
              description: The postal/post/zip code of the address; not used by all
                countries.
              type: string
              nullable: true
            country_code:
              description: The ISO 3166 country 2-Alpha country code of the address.
              type: string
              nullable: true
          nullable: true
        aliases:
          description: The counterparty's aliases. Only available for GET operations
            when 'include_pii' is set.
          type: array
          items:
            type: object
            properties:
              first:
                description: The counterparty's first name.
                type: string
                nullable: true
              middle:
                description: The counterparty's middle name.
                type: string
                nullable: true
              last:
                description: The counterparty's last name.
                type: string
                nullable: true
              full:
                description: The counterparty's full name.
                type: string
                nullable: true
          nullable: true
        date_of_birth:
          description: The counterparty's DOB. Only available for GET operations when
            'include_pii' is set.
          type: string
          format: date
          nullable: true
        labels:
          type: array
          description: The labels associated with the counterparty.
          items:
            type: string
          nullable: true
        compliance_decisions:
          type: array
          description: The compliance decisions associated with the counterparty.
          items:
            "$ref": "#/components/schemas/ComplianceDecision"
    CounterpartyType:
      type: string
      enum:
      - business
      - individual
    CounterpartyState:
      type: string
      enum:
      - storing
      - unverified
      - verified
      - rejected
    CounterpartyList:
      type: object
      properties:
        total:
          description: The total number of records available.
          type: integer
          minimum: 0
        page:
          description: The page index to retrieve.
          type: integer
          minimum: 0
        per_page:
          description: The number of entities per page to return.
          type: integer
          minimum: 1
        objects:
          type: array
          items:
            "$ref": "#/components/schemas/Counterparty"
      required:
      - total
      - page
      - per_page
      - objects
    Customer:
      type: object
      properties:
        guid:
          description: Auto-generated unique identifier for the customer.
          type: string
          minLength: 32
          maxLength: 32
        bank_guid:
          description: Auto-generated unique identifier for the customer's bank.
          type: string
          minLength: 32
          maxLength: 32
        type:
          description: The customer type; one of business or individual.
          type: string
        created_at:
          type: string
          description: ISO8601 datetime the record was created at.
          format: date-time
        updated_at:
          type: string
          description: ISO8601 datetime the record was last updated at.
          format: date-time
        state:
          description: The customer state; one of storing, unverified, verified, rejected,
            or frozen.
          type: string
        name:
          description: The customer's name. Only available for GET operations when
            'include_pii' is set.
          type: object
          properties:
            first:
              description: The customer's first name.
              type: string
              nullable: true
            middle:
              description: The customer's middle name.
              type: string
              nullable: true
            last:
              description: The customer's last name.
              type: string
              nullable: true
            full:
              description: The customer's full name.
              type: string
              nullable: true
          nullable: true
        address:
          description: The customer's address. Only available for GET operations when
            'include_pii' is set.
          type: object
          properties:
            street:
              description: The first line of the address.
              type: string
              nullable: true
            street2:
              description: The optional second line of the address.
              type: string
              nullable: true
            city:
              description: The city of the address.
              type: string
              nullable: true
            subdivision:
              description: The ISO 3166-2 subdivision code of the address; not used
                by all countries.
              type: string
              nullable: true
            postal_code:
              description: The postal/post/zip code of the address; not used by all
                countries.
              type: string
              nullable: true
            country_code:
              description: The ISO 3166 country 2-Alpha country code of the address.
              type: string
              nullable: true
          nullable: true
        aliases:
          description: The customer's aliases. Only available for GET operations when
            'include_pii' is set.
          type: array
          items:
            type: object
            properties:
              first:
                description: The customer's first name.
                type: string
                nullable: true
              middle:
                description: The customer's middle name.
                type: string
                nullable: true
              last:
                description: The customer's last name.
                type: string
                nullable: true
              full:
                description: The customer's full name.
                type: string
                nullable: true
          nullable: true
        website:
          description: The customer's website. Only available for GET operations when
            'include_pii' is set.
          type: string
          nullable: true
        date_of_birth:
          description: The customer's DOB. Only available for GET operations when
            'include_pii' is set.
          type: string
          format: date
          nullable: true
        phone_number:
          description: The customer's phone number. Only available for GET operations
            when 'include_pii' is set.
          type: string
          nullable: true
        email_address:
          description: The customer's email address. Only available for GET operations
            when 'include_pii' is set.
          type: string
          nullable: true
        labels:
          type: array
          description: The labels associated with the customer.
          items:
            type: string
          nullable: true
        compliance_decisions:
          type: array
          description: The compliance decisions associated with the customer.
          items:
            "$ref": "#/components/schemas/ComplianceDecision"
        identification_numbers:
          description: The customer's identification numbers. Only available for GET
            operations when 'include_pii' is set and bank has access.
          type: array
          nullable: true
          items:
            "$ref": "#/components/schemas/IdentificationNumber"
        activity_limits:
          type: array
          description: The asset limits associated with the customer.
          items:
            "$ref": "#/components/schemas/ActivityLimit"
    CustomerType:
      type: string
      enum:
      - business
      - individual
    CustomerState:
      type: string
      enum:
      - storing
      - unverified
      - verified
      - rejected
      - frozen
    CustomerList:
      type: object
      properties:
        total:
          description: The total number of records available.
          type: integer
          minimum: 0
        page:
          description: The page index to retrieve.
          type: integer
          minimum: 0
        per_page:
          description: The number of entities per page to return.
          type: integer
          minimum: 1
        objects:
          type: array
          items:
            "$ref": "#/components/schemas/Customer"
      required:
      - total
      - page
      - per_page
      - objects
    IdentityVerification:
      type: object
      properties:
        guid:
          description: Auto-generated unique identifier for the identity verification.
          type: string
          minLength: 32
          maxLength: 32
        type:
          description: The identity verification type; one of kyc, bank_account, or
            counterparty.
          type: string
        method:
          description: The identity verification method; one of attested, document_submission,
            enhanced_due_diligence, id_and_selfie, tax_id_and_selfie, business_registration,
            attested_id_and_selfie, attested_business_registration, attested_business_associate,
            attested_id_and_database, watchlists, attested_ownership, or account_ownership.
          type: string
        created_at:
          type: string
          description: ISO8601 datetime the record was created at.
          format: date-time
        updated_at:
          type: string
          description: ISO8601 datetime the record was last updated at.
          format: date-time
        customer_guid:
          description: The customer's identifier.
          type: string
          minLength: 32
          maxLength: 32
          nullable: true
        counterparty_guid:
          description: The counterparty's identifier.
          type: string
          minLength: 32
          maxLength: 32
          nullable: true
        external_bank_account_guid:
          description: The external bank account's identifier.
          type: string
          minLength: 32
          maxLength: 32
          nullable: true
        state:
          description: The identity verification state; one of storing, waiting, pending,
            reviewing, expired, or completed.
          type: string
        outcome:
          description: The identity verification outcome; one of passed or failed.
          type: string
          nullable: true
        failure_codes:
          type: array
          description: The reason codes explaining the outcome.
          items:
            type: string
          nullable: true
        compliance_decisions:
          type: array
          description: The compliance decisions associated with the identity verification.
          items:
            "$ref": "#/components/schemas/ComplianceDecision"
        options:
          type: object
          description: Options for the identity verification.
          properties:
            require_tax_id:
              description: Whether the tax ID was enforced during identity verification.
              type: boolean
              nullable: true
          nullable: true
    IdentityVerificationType:
      type: string
      enum:
      - kyc
      - bank_account
      - counterparty
    IdentityVerificationMethod:
      type: string
      enum:
      - attested
      - document_submission
      - enhanced_due_diligence
      - id_and_selfie
      - tax_id_and_selfie
      - business_registration
      - attested_id_and_selfie
      - attested_business_registration
      - attested_business_associate
      - attested_id_and_database
      - watchlists
      - attested_ownership
      - account_ownership
    IdentityVerificationState:
      type: string
      enum:
      - storing
      - waiting
      - pending
      - reviewing
      - expired
      - completed
    IdentityVerificationPersonaState:
      type: string
      enum:
      - waiting
      - pending
      - reviewing
      - processing
      - expired
      - completed
      - unknown
    IdentityVerificationOutcome:
      type: string
      enum:
      - passed
      - failed
    IdentityVerificationWithDetails:
      type: object
      properties:
        guid:
          description: Auto-generated unique identifier for the identity verification.
          type: string
          minLength: 32
          maxLength: 32
        type:
          description: The identity verification type; one of kyc, bank_account, or
            counterparty.
          type: string
        method:
          description: The identity verification method; one of attested, document_submission,
            enhanced_due_diligence, id_and_selfie, tax_id_and_selfie, business_registration,
            attested_id_and_selfie, attested_business_registration, attested_business_associate,
            attested_id_and_database, watchlists, attested_ownership, or account_ownership.
          type: string
        created_at:
          type: string
          description: ISO8601 datetime the record was created at.
          format: date-time
        updated_at:
          type: string
          description: ISO8601 datetime the record was last updated at.
          format: date-time
        customer_guid:
          description: The identity verification's identifier.
          type: string
          minLength: 32
          maxLength: 32
          nullable: true
        counterparty_guid:
          description: The identity verification's identifier.
          type: string
          minLength: 32
          maxLength: 32
          nullable: true
        external_bank_account_guid:
          description: The identity verification's identifier.
          type: string
          minLength: 32
          maxLength: 32
          nullable: true
        state:
          description: The identity verification state; one of storing, waiting, pending,
            reviewing, expired, or completed.
          type: string
        outcome:
          description: The identity verification outcome; one of passed or failed.
          type: string
          nullable: true
        failure_codes:
          type: array
          description: The reason codes explaining the outcome.
          items:
            type: string
          nullable: true
        compliance_checks:
          type: array
          description: The compliance checks associated with the identity verification.
          items:
            "$ref": "#/components/schemas/ComplianceCheck"
        compliance_decisions:
          type: array
          description: The compliance decisions associated with the identity verification.
          items:
            "$ref": "#/components/schemas/ComplianceDecision"
        persona_inquiry_id:
          description: The Persona identifier of the backing inquiry.
          type: string
          nullable: true
        persona_state:
          description: The Persona state of the backing inquiry; one of waiting, pending,
            reviewing, processing, expired, completed, or unknown.
          type: string
          nullable: true
        business_associates:
          type: array
          description: List of associates declared for the business customer.
          items:
            "$ref": "#/components/schemas/IdentityVerificationBusinessAssociate"
          nullable: true
        pii:
          type: object
          description: The personally identifiable information associated with the
            identity verification.
          properties:
            name:
              type: object
              description: The attested name
              properties:
                first:
                  description: The attested first name.
                  type: string
                  nullable: true
                middle:
                  description: The attested middle name.
                  type: string
                  nullable: true
                last:
                  description: The attested last name.
                  type: string
                  nullable: true
                full:
                  description: The attested full name.
                  type: string
                  nullable: true
              nullable: true
            aliases:
              description: The business attested aliases.
              type: array
              items:
                type: object
                properties:
                  full:
                    description: The full name.
                    type: string
                    nullable: true
              nullable: true
            address:
              type: object
              description: The attested address.
              properties:
                street:
                  description: The first line of the address.
                  type: string
                  nullable: true
                street2:
                  description: The optional second line of the address.
                  type: string
                  nullable: true
                city:
                  description: The city of the address.
                  type: string
                  nullable: true
                subdivision:
                  description: The ISO 3166-2 subdivision code of the address; not
                    used by all countries.
                  type: string
                  nullable: true
                postal_code:
                  description: The postal/post/zip code of the address; not used by
                    all countries.
                  type: string
                  nullable: true
                country_code:
                  description: The ISO 3166 country 2-Alpha country code of the address.
                  type: string
                  minLength: 2
                  maxLength: 2
                  nullable: true
              required:
              - street
              - city
              - country_code
              nullable: true
            date_of_birth:
              type: string
              description: The attested date of birth.
              format: date
              nullable: true
            phone_number:
              type: string
              description: The attested phone number.
              nullable: true
            email_address:
              type: string
              description: The attested email address.
              nullable: true
            occupation:
              type: string
              description: The attested occupation.
              nullable: true
            website:
              type: string
              description: The attested website.
              nullable: true
            nature_of_business:
              type: string
              description: The attested nature of business.
              nullable: true
              maxLength: 256
            registered_address:
              type: object
              description: The attested registered address.
              properties:
                street:
                  description: The first line of the address.
                  type: string
                  nullable: true
                street2:
                  description: The optional second line of the address.
                  type: string
                  nullable: true
                city:
                  description: The city of the address.
                  type: string
                  nullable: true
                subdivision:
                  description: The ISO 3166-2 subdivision code of the address; not
                    used by all countries.
                  type: string
                  nullable: true
                postal_code:
                  description: The postal/post/zip code of the address; not used by
                    all countries.
                  type: string
                  nullable: true
                country_code:
                  description: The ISO 3166 country 2-Alpha country code of the address.
                  type: string
                  minLength: 2
                  maxLength: 2
                  nullable: true
              required:
              - street
              - city
              - country_code
              nullable: true
            business_industry:
              type: string
              description: The attested business industry.
              nullable: true
            business_funds_source:
              type: string
              description: The attested business funds source.
              nullable: true
            business_funds_destination:
              type: string
              description: The attested business funds destination.
              nullable: true
            identification_numbers:
              description: The attested identification numbers.
              type: array
              nullable: true
              items:
                "$ref": "#/components/schemas/IdentificationNumber"
          nullable: true
        documents:
          type: array
          description: The documents associated with the identity verification.
          items:
            "$ref": "#/components/schemas/IdentityVerificationDocument"
          nullable: true
        supporting_files:
          type: array
          description: The supporting documents associated with the attested identity
            verification.
          items:
            "$ref": "#/components/schemas/IdentityVerificationDocument"
          nullable: true
        options:
          type: object
          description: Options for the identity verification.
          properties:
            require_tax_id:
              description: Whether the tax ID was enforced during identity verification.
              type: boolean
              nullable: true
          nullable: true
    IdentityVerificationDocument:
      type: object
      properties:
        guid:
          description: Auto-generated unique identifier for the document.
          type: string
          minLength: 32
          maxLength: 32
        type:
          description: The document type; one of drivers_license, passport, passport_card,
            residence_card, visa, social_security_number, tax_identification_number,
            selfie, proof_of_address, formation_document, employer_identification_number,
            indigenous_document_number, or work_permit.
          type: string
        validated:
          description: Whether the document has been validated.
          type: boolean
        expiration_date:
          description: The document expiration date.
          type: string
          format: date
          nullable: true
        files:
          type: array
          description: The files associated with the document.
          items:
            "$ref": "#/components/schemas/IdentityVerificationDocumentFile"
    IdentityVerificationDocumentFile:
      type: object
      properties:
        guid:
          type: string
          description: The unique identifier for the file.
          minLength: 32
          maxLength: 32
        type:
          type: string
          description: The file type; one of drivers_license_front, drivers_license_back,
            drivers_license, passport, passport_card, identification_card, residence_card,
            work_permit, indigenous_id_document, selfie, selfie_video, selfie_left,
            selfie_right, proof_of_address, or incorporation_certificate.
        content_type:
          type: string
          description: The media type; one of image/jpeg, image/png, application/pdf,
            application/json, or video/mp4.
        filename:
          type: string
          description: The name of the file.
        metadata:
          type: object
          title: IdentityVerificationDocumentFileMetadata
          description: 'File metadata (e.g., {"part": "front"})'
          properties:
            part:
              type: string
              description: The part of the file (e.g., "front", "back")
              nullable: true
              enum:
              - front
              - back
          nullable: true
    IdentityVerificationBusinessAssociate:
      type: object
      properties:
        persona_inquiry_id:
          description: The Persona identifier of the business associate backing inquiry.
            Available only for attested_business_registration verification method
          type: string
          nullable: true
        persona_state:
          description: The Persona state of the backing inquiry; one of waiting, pending,
            reviewing, processing, expired, completed, or unknown. Available only
            for attested_business_registration verification method
          type: string
          nullable: true
        customer_guid:
          description: The business associate's customer identifier. Available only
            for attested_business_registration verification method
          type: string
          minLength: 32
          maxLength: 32
          nullable: true
        role:
          description: The business associate role; one of director or owner.
          type: string
        email_address:
          description: The business associate email address. Available only for business_registration
            verification method
          type: string
        state:
          description: The business associate state; one of completed, waiting, or
            pending.
          type: string
    IdentityVerificationList:
      type: object
      properties:
        total:
          description: The total number of records available.
          type: integer
          minimum: 0
        page:
          description: The page index to retrieve.
          type: integer
          minimum: 0
        per_page:
          description: The number of entities per page to return.
          type: integer
          minimum: 1
        objects:
          type: array
          items:
            "$ref": "#/components/schemas/IdentityVerification"
      required:
      - total
      - page
      - per_page
      - objects
    ComplianceCheck:
      type: object
      properties:
        type:
          type: string
          description: The type of compliance check; one of business_watchlists, business_verification,
            business_tax_id_verification, business_attested, business_tax_id_attested,
            business_watchlists_attested, person_attested, person_tax_id_attested,
            person_gov_id_attested, person_authentication_attested, person_watchlists_attested,
            person_watchlists, person_verification, person_authentication, person_gov_id_verification,
            person_tax_id_verification, business_associate_gov_id_attested, business_associate_authentication_attested,
            business_associate_attested, business_associate_tax_id_attested, business_associate_watchlists_attested,
            external_bank_account_verification, or external_bank_account_attested.
        outcome:
          type: string
          description: The outcome of the compliance check; one of passed, failed,
            insufficient, or inconclusive.
        failure_codes:
          type: array
          items:
            type: string
          description: The reason codes explaining the outcome.
          nullable: true
      required:
      - type
      - outcome
    ComplianceCheckType:
      type: string
      enum:
      - business_watchlists
      - business_verification
      - business_tax_id_verification
      - business_attested
      - business_tax_id_attested
      - business_watchlists_attested
      - person_attested
      - person_tax_id_attested
      - person_gov_id_attested
      - person_authentication_attested
      - person_watchlists_attested
      - person_watchlists
      - person_verification
      - person_authentication
      - person_gov_id_verification
      - person_tax_id_verification
      - business_associate_gov_id_attested
      - business_associate_authentication_attested
      - business_associate_attested
      - business_associate_tax_id_attested
      - business_associate_watchlists_attested
      - external_bank_account_verification
      - external_bank_account_attested
    ComplianceCheckOutcome:
      type: string
      enum:
      - passed
      - failed
      - insufficient
      - inconclusive
    ComplianceDecision:
      type: object
      properties:
        type:
          type: string
          description: The type of verification check; one of business_watchlists,
            business_verification, business_tax_id_verification, business_attested,
            business_tax_id_attested, business_watchlists_attested, person_attested,
            person_tax_id_attested, person_gov_id_attested, person_authentication_attested,
            person_watchlists_attested, person_watchlists, person_verification, person_authentication,
            person_gov_id_verification, person_tax_id_verification, business_associate_gov_id_attested,
            business_associate_authentication_attested, business_associate_attested,
            business_associate_tax_id_attested, business_associate_watchlists_attested,
            external_bank_account_verification, or external_bank_account_attested.
        state:
          type: string
          description: The state of the verification check; one of passed, failed,
            expired, or invalidated.
        failure_codes:
          type: array
          items:
            type: string
          description: The reason codes explaining the outcome.
          nullable: true
        expired_at:
          type: string
          format: date-time
          description: ISO8601 datetime the compliance decision is expired.
          nullable: true
      required:
      - type
      - state
    ComplianceDecisionType:
      type: string
      enum:
      - business_watchlists
      - business_verification
      - business_tax_id_verification
      - business_attested
      - business_tax_id_attested
      - business_watchlists_attested
      - person_attested
      - person_tax_id_attested
      - person_gov_id_attested
      - person_authentication_attested
      - person_watchlists_attested
      - person_watchlists
      - person_verification
      - person_authentication
      - person_gov_id_verification
      - person_tax_id_verification
      - business_associate_gov_id_attested
      - business_associate_authentication_attested
      - business_associate_attested
      - business_associate_tax_id_attested
      - business_associate_watchlists_attested
      - external_bank_account_verification
      - external_bank_account_attested
    ComplianceDecisionState:
      type: string
      enum:
      - passed
      - failed
      - expired
      - invalidated
    PostDepositBankAccount:
      type: object
      description: Request body for deposit bank account creation.
      properties:
        type:
          type: string
          description: The account type. To generate deposit bank accounts with their
            own unique account number set this to "main". To generate deposit bank
            accounts with the same account number as the parent deposit bank account
            set this to "sub_account". This setting will only generate a unique identifier
            for the deposit bank and will not result in a unique account number being
            generated. "sub_account" is only  available for customer-level deposit
            bank accounts.
          enum:
          - main
          - sub_account
        account_guid:
          type: string
          description: The fiat or reserve account guid.
          minLength: 32
          maxLength: 32
        customer_guid:
          type: string
          description: The unique identifier for the customer.
          nullable: true
          minLength: 32
          maxLength: 32
        parent_deposit_bank_account_guid:
          type: string
          description: The unique identifier for the bank-level deposit bank account.
            This is only required for sub-accounts. Required when type is sub_account.
          nullable: true
          minLength: 32
          maxLength: 32
        labels:
          type: array
          description: The labels associated with the bank account.
          items:
            type: string
            minLength: 1
            maxLength: 64
          nullable: true
          maxItems: 8
      required:
      - type
      - account_guid
    PostInvoice:
      type: object
      description: Request body for invoice creation.
      properties:
        asset:
          type: string
          description: The asset code the customer will receive the funds in.
          minLength: 1
          maxLength: 16
        customer_guid:
          type: string
          description: The unique identifier for the customer.
          nullable: true
          minLength: 32
          maxLength: 32
        receive_amount:
          type: integer
          description: The amount to be received in base units of the asset, i.e.,
            the amount the customer will receive after fees. ONLY one of receive_amount
            or deliver_amount is required.
        deliver_amount:
          type: integer
          description: The amount to be delivered in base units of the asset, i.e.,
            the amount the customer will receive before fees. ONLY one of receive_amount
            or deliver_amount is required.
        account_guid:
          type: string
          description: The identifier for the account to use for the transfer. Required
            if the customer has multiple fiat accounts. Currently only valid for invoices
            paid to a fiat account.
          nullable: true
          minLength: 32
          maxLength: 32
        labels:
          type: array
          description: The labels associated with the invoice.
          items:
            type: string
            minLength: 1
            maxLength: 64
          nullable: true
          maxItems: 8
      required:
      - asset
    PostPaymentInstruction:
      type: object
      description: Request body for payment instruction creation.
      properties:
        invoice_guid:
          type: string
          description: The invoice guid.
          maxLength: 32
        expected_behaviour:
          type: string
          description: The optional expected behaviour to simulate.
          nullable: true
          enum:
          - invoice_paid_immediately
      required:
      - invoice_guid
    Invoice:
      type: object
      properties:
        guid:
          description: Auto-generated unique identifier for the payment instruction.
          type: string
          minLength: 32
          maxLength: 32
        customer_guid:
          description: The customer identifier.
          type: string
          minLength: 32
          maxLength: 32
          nullable: true
        account_guid:
          description: The account payment will ultimately be received into.
          type: string
          minLength: 32
          maxLength: 32
        created_at:
          type: string
          description: ISO8601 datetime the record was created at.
          format: date-time
        updated_at:
          type: string
          description: ISO8601 datetime the record was last updated at.
          format: date-time
        type:
          type: string
          description: The type of invoice; one of lightning.
        asset:
          type: string
          minLength: 1
          maxLength: 16
          description: The asset code the customer will receive the funds in.
        receive_amount:
          type: integer
          description: The amount to be received in base units of the asset, i.e.,
            the amount the customer will receive after fees. ONLY one of receive_amount
            or deliver_amount is required.
          nullable: true
        deliver_amount:
          type: integer
          description: The amount to be delivered in base units of the asset, i.e.,
            the amount the customer will receive before fees. ONLY one of receive_amount
            or deliver_amount is required.
          nullable: true
        fee:
          type: integer
          description: The fee associated with this invoice in base units of the asset.
          nullable: true
        state:
          type: string
          description: The state of the invoice; one of storing, unpaid, cancelling,
            cancelled, settling, or paid.
        labels:
          type: array
          description: The labels associated with the invoice.
          items:
            type: string
          nullable: true
    InvoiceList:
      type: object
      properties:
        total:
          description: The total number of records available.
          type: integer
          minimum: 0
        page:
          description: The page index to retrieve.
          type: integer
          minimum: 0
        per_page:
          description: The number of entities per page to return.
          type: integer
          minimum: 1
        objects:
          type: array
          items:
            "$ref": "#/components/schemas/Invoice"
      required:
      - total
      - page
      - per_page
      - objects
    PaymentInstruction:
      type: object
      properties:
        guid:
          description: Auto-generated unique identifier for the payment instruction.
          type: string
          minLength: 32
          maxLength: 32
        customer_guid:
          description: The customer identifier.
          type: string
          minLength: 32
          maxLength: 32
          nullable: true
        invoice_guid:
          description: The invoice identifier.
          type: string
          minLength: 32
          maxLength: 32
        created_at:
          type: string
          description: ISO8601 datetime the record was created at.
          format: date-time
        updated_at:
          type: string
          description: ISO8601 datetime the record was last updated at.
          format: date-time
        expired_at:
          type: string
          description: ISO8601 datetime the instructions expired at.
          format: date-time
          nullable: true
        failed_at:
          type: string
          description: ISO8601 datetime the instructions failed to be created at.
          format: date-time
          nullable: true
        network_address:
          type: string
          description: The network address to pay the invoice to.
          nullable: true
        expected_payment_asset:
          type: string
          description: The asset the payor must pay the invoice in, e.g., BTC.
          nullable: true
        expected_payment_amount:
          type: integer
          description: The amount to be paid in base units of expected_payment_asset.
          nullable: true
        failure_code:
          description: The reason code explaining the failure; ond of invoice_paid,
            invoice_cancelled, or invalid_amount.
          type: string
          nullable: true
        state:
          description: The state of the payment instruction; one of storing, created,
            expired, or failed.
          type: string
    PaymentInstructionList:
      type: object
      properties:
        total:
          description: The total number of records available.
          type: integer
          minimum: 0
        page:
          description: The page index to retrieve.
          type: integer
          minimum: 0
        per_page:
          description: The number of entities per page to return.
          type: integer
          minimum: 1
        objects:
          type: array
          items:
            "$ref": "#/components/schemas/PaymentInstruction"
      required:
      - total
      - page
      - per_page
      - objects
    DepositBankAccount:
      type: object
      properties:
        guid:
          description: Auto-generated unique identifier for the identity verification.
          type: string
          minLength: 32
          maxLength: 32
        type:
          description: The account type; one of main or sub_account.
          type: string
        bank_guid:
          description: The address' bank identifier.
          type: string
          minLength: 32
          maxLength: 32
        customer_guid:
          description: The address' customer identifier.
          type: string
          minLength: 32
          maxLength: 32
          nullable: true
        account_guid:
          description: The address' account identifier.
          type: string
          minLength: 32
          maxLength: 32
        created_at:
          type: string
          description: ISO8601 datetime the record was created at.
          format: date-time
        updated_at:
          type: string
          description: ISO8601 datetime the record was last updated at.
          format: date-time
        deleted_at:
          type: string
          description: ISO8601 datetime the record was last deleted at.
          format: date-time
          nullable: true
        asset:
          type: string
          description: The asset the transfer is related to, e.g., USD.
        state:
          description: The state of the address; one of storing or created.
          type: string
        unique_memo_id:
          description: The unique memo identifier for the address. This is used to
            identify the recipient when sending funds to the account. This value MUST
            be included in all wire transfers to this account.
          type: string
        counterparty_name:
          description: The name of the account holder.
          type: string
          nullable: true
        counterparty_address:
          description: The counterparty's address on the account.
          type: object
          properties:
            street:
              description: The first line of the address.
              type: string
            street2:
              description: The optional second line of the address.
              type: string
              nullable: true
            city:
              description: The city of the address.
              type: string
            subdivision:
              description: The ISO 3166-2 subdivision code of the address; not used
                by all countries.
              type: string
              nullable: true
            postal_code:
              description: The postal/post/zip code of the address; not used by all
                countries.
              type: string
              nullable: true
            country_code:
              description: The ISO 3166 country 2-Alpha country code of the address.
              type: string
              minLength: 2
              maxLength: 2
          required:
          - street
          - city
          - country_code
          nullable: true
        account_details:
          description: The account details for the bank account.
          type: array
          items:
            type: object
            properties:
              account_number:
                description: The account number.
                type: string
            required:
            - account_number
          nullable: true
        routing_details:
          description: The account details for the bank account.
          type: array
          items:
            type: object
            properties:
              routing_number_type:
                description: The type of routing number; one of CPA, ABA, or SWIFT.
                type: string
              routing_number:
                description: The routing number.
                type: string
            required:
            - routing_number_type
            - routing_number
          nullable: true
        parent_deposit_bank_account_guid:
          description: The unique identifier for the bank-level deposit bank account.
            This is only set for sub-accounts.
          type: string
          minLength: 32
          maxLength: 32
          nullable: true
        labels:
          type: array
          description: The labels associated with the address.
          items:
            type: string
          nullable: true
    DepositBankAccountState:
      type: string
      enum:
      - storing
      - created
    DepositBankAccountRoutingNumberType:
      type: string
      enum:
      - CPA
      - ABA
      - SWIFT
    DepositBankAccountList:
      type: object
      properties:
        total:
          description: The total number of records available.
          type: integer
          minimum: 0
        page:
          description: The page index to retrieve.
          type: integer
          minimum: 0
        per_page:
          description: The number of entities per page to return.
          type: integer
          minimum: 1
        objects:
          type: array
          items:
            "$ref": "#/components/schemas/DepositBankAccount"
      required:
      - total
      - page
      - per_page
      - objects
    DepositAddress:
      type: object
      properties:
        guid:
          description: Auto-generated unique identifier for the identity verification.
          type: string
          minLength: 32
          maxLength: 32
        bank_guid:
          description: The address' bank identifier.
          type: string
          minLength: 32
          maxLength: 32
        customer_guid:
          description: The address' customer identifier.
          type: string
          minLength: 32
          maxLength: 32
          nullable: true
        account_guid:
          description: The address' account identifier.
          type: string
          minLength: 32
          maxLength: 32
        created_at:
          type: string
          description: ISO8601 datetime the record was created at.
          format: date-time
        updated_at:
          type: string
          description: ISO8601 datetime the record was last updated at.
          format: date-time
        asset:
          type: string
          description: The asset the transfer is related to, e.g., USD.
        state:
          description: The state of the address; one of storing or created.
          type: string
        address:
          description: The blockchain address.
          type: string
        format:
          description: The blockchain address format; one of standard or legacy.
          type: string
        tag:
          description: The blockchain address tag.
          type: string
        labels:
          type: array
          description: The labels associated with the address.
          items:
            type: string
          nullable: true
    DepositAddressState:
      type: string
      enum:
      - storing
      - created
    DepositAddressFormat:
      type: string
      enum:
      - standard
      - legacy
    DepositAddressList:
      type: object
      properties:
        total:
          description: The total number of records available.
          type: integer
          minimum: 0
        page:
          description: The page index to retrieve.
          type: integer
          minimum: 0
        per_page:
          description: The number of entities per page to return.
          type: integer
          minimum: 1
        objects:
          type: array
          items:
            "$ref": "#/components/schemas/DepositAddress"
      required:
      - total
      - page
      - per_page
      - objects
    SymbolPrice:
      type: object
      properties:
        symbol:
          type: string
          description: The trade symbol the pricing is related to. Format is asset-counter_asset,
            e.g., BTC-USD.
          minLength: 1
          maxLength: 24
        type:
          type: string
          description: The type of price; one of trading or payout.
          nullable: true
        buy_price:
          type: integer
          description: The purchase price (in base units) for the asset denominated
            in the counter asset currency.
          nullable: true
        sell_price:
          type: integer
          description: The sale price (in base units) for the asset denominated in
            the counter asset currency.
          nullable: true
        buy_price_last_updated_at:
          type: string
          format: date-time
          description: ISO8601 datetime the purchase price was generated at.
          nullable: true
        sell_price_last_updated_at:
          type: string
          format: date-time
          description: ISO8601 datetime the sale price was generated at.
          nullable: true
        country_code:
          type: string
          description: The ISO 3166 country 2-Alpha country code of the price.
          nullable: true
          minLength: 2
          maxLength: 2
        participants_type:
          type: string
          description: The type of participants the price is for; one of C2C, C2B,
            B2C, or B2B.
          nullable: true
        route:
          type: string
          description: The route the price is for; one of bank_account or mobile_wallet.
          nullable: true
    SymbolPriceResponse:
      type: array
      description: Array of SymbolPrice entities
      items:
        "$ref": "#/components/schemas/SymbolPrice"
    PostQuote:
      type: object
      description: Request body for quote creation.
      properties:
        product_type:
          type: string
          description: The type of product the quote is for.
          nullable: true
          default: trading
          enum:
          - trading
          - funding
          - crypto_transfer
          - inter_account
          - lightning_transfer
          - book_transfer
        bank_guid:
          type: string
          description: The unique identifier for the bank.
          nullable: true
          minLength: 32
          maxLength: 32
        customer_guid:
          type: string
          description: The unique identifier for the customer.
          nullable: true
          minLength: 32
          maxLength: 32
        receive_amount:
          type: integer
          description: 'The amount to be received in base units of the currency: currency
            is "asset" for buy and "counter_asset" for sell for trade quotes.'
        deliver_amount:
          type: integer
          description: 'The amount to be delivered in base units of the currency:
            currency is "counter_asset" for buy and "asset" for sell for trade quotes.'
        asset:
          type: string
          description: The asset code the quote was requested for. Required when product_type
            is lightning_transfer, product_type is book_transfer, product_type is
            funding, product_type is crypto_transfer, or product_type is inter_account.
          nullable: true
          minLength: 1
          maxLength: 16
        network_address:
          type: string
          description: The network address to pay the invoice to. Required when product_type
            is lightning_transfer.
          nullable: true
          maxLength: 1024
        fees:
          type: array
          description: The custom fees associated with the quote Optional when product_type
            is lightning_transfer, product_type is funding, product_type is trading,
            product_type is crypto_transfer, or product_type is trading_exit.
          items:
            "$ref": "#/components/schemas/PostFee"
          nullable: true
          minItems: 0
          maxItems: 2
        side:
          type: string
          description: 'The direction for trade quotes: either ''buy'' or ''sell''.
            The direction for funding quotes: either ''deposit'' or ''withdrawal''.
            The direction for crypto transfer quotes: ''withdrawal''. Book transfers
            do not require a side. They are all ''deposit''s.  Required when product_type
            is funding, product_type is trading, or product_type is crypto_transfer.'
          nullable: true
          enum:
          - deposit
          - withdrawal
          - buy
          - sell
        destination_account_guid:
          type: string
          description: The unique identifier for the destination account. Used to
            determine routing-specific fees for EFT withdrawals. Required when product_type
            is inter_account. Optional when product_type is funding.
          nullable: true
          minLength: 32
          maxLength: 32
        symbol:
          type: string
          description: Symbol the quote is being requested for. Format is "asset-counter_asset"
            in uppercase. See the Symbols API for a complete list of cryptocurrencies
            supported.  Required when product_type is trading.
          nullable: true
          minLength: 1
          maxLength: 24
        destination_accounts:
          type: array
          description: Destination accounts for batch transactions on UTXO-based blockchains.
            A single destination account is required for Base blockchain assets. Optional
            when product_type is crypto_transfer.
          items:
            "$ref": "#/components/schemas/PostQuoteEntry"
          minItems: 1
          maxItems: 100
        reference_trade_guid:
          type: string
          description: The guid of the related trade. Only present on `exit` trades.
            Required when product_type is trading_exit.
          nullable: true
          minLength: 32
          maxLength: 32
        source_account_guid:
          type: string
          description: The source account's identifier. Required when product_type
            is inter_account.
          nullable: true
          minLength: 32
          maxLength: 32
    PostQuoteEntry:
      type: object
      description: Request body for quote account creation.
      properties:
        type:
          type: string
          description: The type of account
          enum:
          - external_wallet
        guid:
          type: string
          description: The guid of the account
        receive_amount:
          type: integer
          description: 'The amount to be received in base units of the currency: currency
            is "asset" for buy and "counter_asset" for sell for trade quotes.'
        deliver_amount:
          type: integer
          description: 'The amount to be delivered in base units of the currency:
            currency is "counter_asset" for buy and "asset" for sell for trade quotes.'
      required:
      - type
      - guid
    PostFee:
      type: object
      description: Request body for fee creation.
      properties:
        type:
          type: string
          description: The fee's type
          enum:
          - spread
          - fixed
        spread_fee:
          type: integer
          description: The percentage amount, in basis points, to apply when charging
            a fee. Required when type is spread.
          nullable: true
        fixed_fee:
          type: integer
          description: The fixed amount to apply when charging a fee; for trades,
            the fiat asset is used. Required when type is fixed.
          nullable: true
      required:
      - type
    Quote:
      type: object
      properties:
        guid:
          type: string
          description: Auto-generated unique identifier for the quote.
          minLength: 32
          maxLength: 32
        product_type:
          description: The type of product the quote is for; one of trading, trading_exit,
            funding, crypto_transfer, inter_account, lightning_transfer, or book_transfer.
          type: string
        bank_guid:
          type: string
          description: The unique identifier for the bank.
          minLength: 32
          maxLength: 32
        customer_guid:
          type: string
          description: The unique identifier for the customer.
          minLength: 32
          maxLength: 32
        symbol:
          type: string
          description: Symbol the quote was requested for. Format is "asset-counter_asset"
            in uppercase. Populated for trade quotes.
          minLength: 1
          maxLength: 24
          nullable: true
        side:
          description: The direction of the quote; one of buy, sell, deposit, or withdrawal.
          type: string
        receive_amount:
          type: integer
          description: 'The amount to be received in base units of the currency: currency
            is "asset" for buy and "counter_asset" for sell for trade quotes.'
        deliver_amount:
          type: integer
          description: 'The amount to be delivered in base units of the currency:
            currency is "counter_asset" for buy and "asset" for sell for trade quotes.'
        fee:
          type: integer
          description: The fee associated with the trade. Denominated in "counter_asset"
            base units for trade quotes.
        fee_details:
          type: array
          description: The fees associated with the quote.
          items:
            "$ref": "#/components/schemas/FeeDetail"
        created_at:
          type: string
          description: ISO8601 datetime the record was created at.
          format: date-time
        updated_at:
          type: string
          description: ISO8601 datetime the record was last updated at.
          format: date-time
        issued_at:
          type: string
          description: ISO8601 datetime the quote was created at.
          format: date-time
        expires_at:
          type: string
          description: ISO8601 datetime the quote is expiring at. Populated for trading
            quotes.
          format: date-time
          nullable: true
        asset:
          type: string
          minLength: 1
          maxLength: 16
          description: The asset code the quote was requested for. Populated for book
            transfer and funding quotes.
          nullable: true
        network_fee:
          type: integer
          description: The network fee in base units of network_fee_asset. Only present
            on `crypto_transfer` quotes.
          nullable: true
        network_fee_asset:
          type: string
          minLength: 1
          maxLength: 16
          description: The asset code of the network fee.
          nullable: true
        network_address:
          type: string
          description: The network address to pay the invoice to. Populated for lightning_transfer
            quotes.
          nullable: true
        entries:
          description: The quote entries for a batch transfer quote
          type: array
          items:
            "$ref": "#/components/schemas/QuoteEntry"
          nullable: true
        trade_guid:
          type: string
          description: The unique identifier for the trade.
          minLength: 32
          maxLength: 32
          nullable: true
        transfer_guid:
          type: string
          description: The unique identifier for the transfer.
          minLength: 32
          maxLength: 32
          nullable: true
    PostPlan:
      type: object
      description: Request body for plan creation.
      properties:
        type:
          type: string
          description: The type of product the plan is for.
          enum:
          - remittance
        bank_guid:
          type: string
          description: The unique identifier for the bank.
          nullable: true
          minLength: 32
          maxLength: 32
        customer_guid:
          type: string
          description: The unique identifier for the customer.
          nullable: true
          minLength: 32
          maxLength: 32
        source_account:
          type: object
          description: Source account
          properties:
            guid:
              type: string
              description: The source account's identifier.
              minLength: 32
              maxLength: 32
            amount:
              type: integer
              description: The amount to be delivered in base units of the source
                account currency
              nullable: true
          required:
          - guid
        destination_account:
          type: object
          description: Destination account
          properties:
            guid:
              type: string
              description: The destination account's identifier.
              minLength: 32
              maxLength: 32
            amount:
              type: integer
              description: The amount to be delivered in base units of the source
                account currency
              nullable: true
          required:
          - guid
        travel_rule_info:
          type: object
          description: Travel rule information
          properties:
            ultimate_originating_party_guid:
              type: string
              description: The unique identifier for the ultimate originating party.
              nullable: true
              minLength: 32
              maxLength: 32
            ultimate_receiving_party_guid:
              type: string
              description: The unique identifier for the ultimate receiving party.
              nullable: true
              minLength: 32
              maxLength: 32
          nullable: true
        purpose_of_transaction:
          type: string
          description: The purpose of transaction for the plan.
          nullable: true
          enum:
          - computer_services
          - family_support
          - education
          - gift
          - charitable_donation
          - medical_treatment
          - maintenance_expenses
          - travel
          - hotel_accommodation
          - small_value_remittance
          - liberalized_remittance
          - personal_transfer
          - loan_payment
          - tax_payment
          - construction_expenses
          - advertising_expenses
          - advisory_fees
          - business_insurance
          - insurance_claims
          - delivery_fees
          - service_charges
          - office_expenses
          - property_purchase
          - property_rental
          - royalty_fees
          - shares_investment
          - fund_investment
          - bill_payment
          - transportation_fees
          - salary_payment
          - reward_payment
          - influencer_payment
          - other_fees
          - other
      required:
      - type
      - source_account
      - destination_account
    Plan:
      type: object
      properties:
        guid:
          type: string
          description: Auto-generated unique identifier for the entity.
          minLength: 32
          maxLength: 32
        type:
          type: string
          description: The type of product the plan is for; one of remittance.
        bank_guid:
          type: string
          description: The unique identifier for the bank.
          nullable: true
          minLength: 32
          maxLength: 32
        customer_guid:
          type: string
          description: The unique identifier for the customer.
          nullable: true
          minLength: 32
          maxLength: 32
        created_at:
          type: string
          format: date-time
          description: ISO8601 datetime the record was created at.
        updated_at:
          type: string
          format: date-time
          description: ISO8601 datetime the record was last updated at.
        expires_at:
          type: string
          format: date-time
          description: ISO8601 datetime the plan will expire at.
        state:
          type: string
          description: The state of the plan; one of storing, planning, completed,
            or failed.
        failure_code:
          type: string
          description: The failure code for failed plans.
          nullable: true
        source_account:
          "$ref": "#/components/schemas/AccountAssociation"
        destination_account:
          "$ref": "#/components/schemas/AccountAssociation"
        stages:
          type: array
          items:
            "$ref": "#/components/schemas/Stage"
          description: The stages of the plan.
        fees:
          type: array
          items:
            "$ref": "#/components/schemas/FeeAssociation"
          description: The fees associated with the plan.
        travel_rule_info:
          type: object
          properties:
            originating_party:
              "$ref": "#/components/schemas/TravelRuleInfoParty"
            receiving_party:
              "$ref": "#/components/schemas/TravelRuleInfoParty"
            ultimate_originating_party:
              "$ref": "#/components/schemas/TravelRuleInfoParty"
              nullable: true
            ultimate_receiving_party:
              "$ref": "#/components/schemas/TravelRuleInfoParty"
              nullable: true
          description: The travel rule information associated with the plan.
          required:
          - originating_party
          - receiving_party
        purpose_of_transaction:
          type: string
          description: The purpose of transaction for the plan.
          nullable: true
          enum:
          - computer_services
          - family_support
          - education
          - gift
          - charitable_donation
          - medical_treatment
          - maintenance_expenses
          - travel
          - hotel_accommodation
          - small_value_remittance
          - liberalized_remittance
          - personal_transfer
          - loan_payment
          - tax_payment
          - construction_expenses
          - advertising_expenses
          - advisory_fees
          - business_insurance
          - insurance_claims
          - delivery_fees
          - service_charges
          - office_expenses
          - property_purchase
          - property_rental
          - royalty_fees
          - shares_investment
          - fund_investment
          - bill_payment
          - transportation_fees
          - salary_payment
          - reward_payment
          - influencer_payment
          - other_fees
          - other
      required:
      - guid
      - type
      - created_at
      - updated_at
      - expires_at
      - state
      - source_account
      - destination_account
      - stages
      - fees
      - travel_rule_info
    PlanList:
      type: object
      properties:
        total:
          description: The total number of records available.
          type: integer
          minimum: 0
        page:
          description: The page index to retrieve.
          type: integer
          minimum: 0
        per_page:
          description: The number of entities per page to return.
          type: integer
          minimum: 1
        objects:
          type: array
          items:
            "$ref": "#/components/schemas/Plan"
      required:
      - total
      - page
      - per_page
      - objects
    PostExecution:
      type: object
      description: Request body for plan creation.
      properties:
        plan_guid:
          type: string
          description: The unique identifier for the plan.
          minLength: 32
          maxLength: 32
      required:
      - plan_guid
    ExecutionList:
      type: object
      properties:
        total:
          description: The total number of records available.
          type: integer
          minimum: 0
        page:
          description: The page index to retrieve.
          type: integer
          minimum: 0
        per_page:
          description: The number of entities per page to return.
          type: integer
          minimum: 1
        objects:
          type: array
          items:
            "$ref": "#/components/schemas/Execution"
      required:
      - total
      - page
      - per_page
      - objects
    Execution:
      type: object
      properties:
        guid:
          type: string
          description: Auto-generated unique identifier for the quote.
          minLength: 32
          maxLength: 32
        type:
          type: string
          description: The type of product the plan is for; one of remittance.
        plan_guid:
          type: string
          description: The unique identifier for the plan.
          minLength: 32
          maxLength: 32
        bank_guid:
          type: string
          description: The unique identifier for the bank.
          nullable: true
          minLength: 32
          maxLength: 32
        customer_guid:
          type: string
          description: The unique identifier for the customer.
          nullable: true
          minLength: 32
          maxLength: 32
        created_at:
          type: string
          format: date-time
          description: ISO8601 datetime the record was created at.
        updated_at:
          type: string
          format: date-time
          description: ISO8601 datetime the record was last updated at.
        state:
          type: string
          description: The state of the execution; one of storing, executing, completed,
            or failed.
        failure_code:
          type: string
          description: The failure code for failed executions.
          nullable: true
        source_account:
          "$ref": "#/components/schemas/AccountAssociation"
        destination_account:
          "$ref": "#/components/schemas/AccountAssociation"
        stages:
          type: array
          items:
            "$ref": "#/components/schemas/Stage"
          description: The stages of the execution.
        fees:
          type: array
          items:
            "$ref": "#/components/schemas/FeeAssociation"
          description: The fees associated with the execution.
        travel_rule_info:
          type: object
          properties:
            originating_party:
              "$ref": "#/components/schemas/TravelRuleInfoParty"
            receiving_party:
              "$ref": "#/components/schemas/TravelRuleInfoParty"
            ultimate_originating_party:
              "$ref": "#/components/schemas/TravelRuleInfoParty"
              nullable: true
            ultimate_receiving_party:
              "$ref": "#/components/schemas/TravelRuleInfoParty"
              nullable: true
          description: The travel rule information associated with the execution.
          required:
          - originating_party
          - receiving_party
        purpose_of_transaction:
          type: string
          description: The purpose of transaction for the execution.
          nullable: true
          enum:
          - computer_services
          - family_support
          - education
          - gift
          - charitable_donation
          - medical_treatment
          - maintenance_expenses
          - travel
          - hotel_accommodation
          - small_value_remittance
          - liberalized_remittance
          - personal_transfer
          - loan_payment
          - tax_payment
          - construction_expenses
          - advertising_expenses
          - advisory_fees
          - business_insurance
          - insurance_claims
          - delivery_fees
          - service_charges
          - office_expenses
          - property_purchase
          - property_rental
          - royalty_fees
          - shares_investment
          - fund_investment
          - bill_payment
          - transportation_fees
          - salary_payment
          - reward_payment
          - influencer_payment
          - other_fees
          - other
      required:
      - guid
      - type
      - plan_guid
      - created_at
      - updated_at
      - state
      - source_account
      - destination_account
      - stages
      - fees
      - travel_rule_info
    Stage:
      type: object
      properties:
        guid:
          type: string
          description: The unique identifier for the stage.
          minLength: 32
          maxLength: 32
        type:
          type: string
          description: The type of stage; one of payout.
        state:
          type: string
          description: The state of the stage; one of storing, planning, planned,
            executing, completed, or failed.
        failure_code:
          type: string
          description: The failure code for failed stages.
          nullable: true
        created_at:
          type: string
          format: date-time
          description: The ISO8601 datetime the stage was created at.
        updated_at:
          type: string
          format: date-time
          description: The ISO8601 datetime the stage was last updated at.
        source_account:
          "$ref": "#/components/schemas/AccountAssociation"
        destination_account:
          "$ref": "#/components/schemas/AccountAssociation"
        fees:
          type: array
          items:
            "$ref": "#/components/schemas/FeeAssociation"
          description: The fees associated with the stage.
      required:
      - guid
      - type
      - state
      - created_at
      - updated_at
      - source_account
      - destination_account
      - fees
    FeeAssociation:
      type: object
      properties:
        type:
          type: string
          description: The type of fee; one of platform, network, or bank.
        asset:
          type: string
          description: The asset the fee is denominated in, e.g., USD.
        quoted_amount:
          type: integer
          description: The quoted amount in base units for the fee.
        executed_amount:
          type: integer
          description: The executed amount in base units for the fee.
          nullable: true
      required:
      - type
      - asset
      - quoted_amount
    FeeDetail:
      type: object
      properties:
        type:
          type: string
          description: The type of fee; one of bank, platform, or network.
          enum:
          - bank
          - platform
          - network
        asset:
          type: string
          description: The asset the fee is denominated in, e.g., USD.
        amount:
          type: integer
          description: The fee amount in base units of the asset.
      required:
      - type
      - asset
      - amount
    AccountAssociation:
      type: object
      properties:
        guid:
          type: string
          description: Auto-generated unique identifier for the transfer account.
          minLength: 32
          maxLength: 32
        type:
          type: string
          description: The type of transfer account; one of trading, fiat, external_bank_account,
            or external_wallet.
        organization_guid:
          type: string
          description: The account's organization identifier.
          nullable: true
          minLength: 32
          maxLength: 32
        bank_guid:
          type: string
          description: The account's bank identifier.
          nullable: true
          minLength: 32
          maxLength: 32
        customer_guid:
          type: string
          description: The account's customer identifier.
          nullable: true
          minLength: 32
          maxLength: 32
        counterparty_guid:
          type: string
          description: The account's counterparty identifier.
          nullable: true
          minLength: 32
          maxLength: 32
        asset:
          type: string
          description: The account asset, e.g., USD.
        requested_amount:
          type: integer
          description: The requested amount in base units intended to transfer from
            or to the account.
          nullable: true
        quoted_amount:
          type: integer
          description: The quoted amount in base units to transfer from or to the
            account.
          nullable: true
        executed_amount:
          type: integer
          description: The executed amount in base units transferred from or to the
            account.
          nullable: true
      required:
      - guid
      - type
      - asset
    TravelRuleInfoParty:
      type: object
      properties:
        type:
          type: string
          description: The type of entity; one of bank, customer, or counterparty.
        participant_guid:
          type: string
          description: The unique identifier for the participant.
          minLength: 32
          maxLength: 32
      required:
      - type
      - participant_guid
    QuoteEntry:
      type: object
      properties:
        source_account:
          type: object
          properties:
            guid:
              type: string
              description: Auto-generated unique identifier for the transfer account.
              minLength: 32
              maxLength: 32
            type:
              type: string
              description: The type of transfer account; one of external_wallet.
            bank_guid:
              type: string
              description: The account's identifier.
              nullable: true
              minLength: 32
              maxLength: 32
            customer_guid:
              type: string
              description: The account's identifier.
              nullable: true
              minLength: 32
              maxLength: 32
          description: The source account in the batch transfer entry.
          nullable: true
        destination_account:
          type: object
          properties:
            guid:
              type: string
              description: Auto-generated unique identifier for the transfer account.
              minLength: 32
              maxLength: 32
            type:
              type: string
              description: The type of transfer account; one of trading, fiat, external_bank_account,
                external_wallet, one_time_address, reserve, invoice_operations, fee,
                gas, or storage.
            bank_guid:
              type: string
              description: The account's identifier.
              nullable: true
              minLength: 32
              maxLength: 32
            customer_guid:
              type: string
              description: The account's identifier.
              nullable: true
              minLength: 32
              maxLength: 32
          description: The destination account entry in the batch transfer.
        receive_amount:
          type: integer
          description: The amount to be received in base units of the currency
        deliver_amount:
          type: integer
          description: The amount to be delivered in base units of the currency
        fee:
          type: integer
          description: The fee associated with the account entry.
    QuoteType:
      type: string
      enum:
      - trading
      - trading_exit
      - funding
      - crypto_transfer
      - inter_account
      - lightning_transfer
      - book_transfer
    QuoteSide:
      type: string
      enum:
      - buy
      - sell
      - deposit
      - withdrawal
    QuoteList:
      type: object
      properties:
        total:
          description: The total number of records available.
          type: integer
          minimum: 0
        page:
          description: The page index to retrieve.
          type: integer
          minimum: 0
        per_page:
          description: The number of entities per page to return.
          type: integer
          minimum: 1
        objects:
          type: array
          items:
            "$ref": "#/components/schemas/Quote"
      required:
      - total
      - page
      - per_page
      - objects
    Symbols:
      type: array
      description: The list of symbols supported for trading.
      items:
        type: string
    Workflow:
      type: object
      properties:
        guid:
          type: string
          description: Auto-generated unique identifier for the workflow.
          minLength: 32
          maxLength: 32
        bank_guid:
          type: string
          description: The associated banks's identifier.
          minLength: 32
          maxLength: 32
          nullable: true
        customer_guid:
          type: string
          description: The associated customer's identifier.
          minLength: 32
          maxLength: 32
          nullable: true
        type:
          description: The type of workflow; one of plaid.
          type: string
        state:
          description: The state of the workflow; one of storing, completed, or failed.
          type: string
        failure_code:
          description: The failure code for failed workflows.
          type: string
          nullable: true
        created_at:
          type: string
          description: ISO8601 datetime the record was created at.
          format: date-time
        updated_at:
          type: string
          description: ISO8601 datetime the record was last updated at.
          format: date-time
    WorkflowType:
      type: string
      enum:
      - plaid
    WorkflowState:
      type: string
      enum:
      - storing
      - completed
      - failed
    WorkflowWithDetails:
      allOf:
      - "$ref": "#/components/schemas/Workflow"
      - type: object
        properties:
          plaid_link_token:
            type: string
            description: The Plaid link token generated by the workflow.
            nullable: true
    PersonaSession:
      type: object
      properties:
        identity_verification_guid:
          type: string
          description: The unique identifier for the identity verification.
        persona_inquiry_id:
          type: string
          description: The unique identifier for the Persona inquiry.
        persona_session_token:
          type: string
          description: The token to be used in the Persona session.
      required:
      - identity_verification_guid
      - persona_inquiry_id
      - persona_session_token
    PostPersonaSession:
      type: object
      description: Request body for persona session creation.
      properties:
        persona_inquiry_id:
          type: string
          description: The ID of the Persona inquiry to create a session for
        identity_verification_guid:
          type: string
          description: The GUID of the identity verification associated with the session
      required:
      - persona_inquiry_id
      - identity_verification_guid
    Transfer:
      type: object
      properties:
        guid:
          type: string
          description: Auto-generated unique identifier for the transfer.
          minLength: 32
          maxLength: 32
        transfer_type:
          description: The type of transfer; one of funding, book, crypto, instant_funding,
            funding_return, crypto_return, loss_recovery, inter_account, lightning,
            or instant_funding_return.
          type: string
        bank_guid:
          type: string
          description: The associated bank's identifier.
          minLength: 32
          maxLength: 32
          nullable: true
        customer_guid:
          type: string
          description: The associated customer's identifier.
          minLength: 32
          maxLength: 32
          nullable: true
        quote_guid:
          type: string
          description: The associated quote's identifier.
          minLength: 32
          maxLength: 32
        external_bank_account_guid:
          type: string
          description: The associated external bank account's identifier.
          minLength: 32
          maxLength: 32
          nullable: true
        asset:
          type: string
          description: The asset the transfer is related to, e.g., USD.
        side:
          type: string
          description: The direction of the quote; one of deposit or withdrawal.
        state:
          description: The state of the transfer; one of storing, pending, reviewing,
            completed, or failed.
          type: string
        failure_code:
          description: The failure code for failed transfers; one of non_sufficient_funds,
            refresh_required, party_name_invalid, payment_rail_invalid, compliance_rejection,
            cancelled, reversed, limit_exceeded, network_fee_too_low, amount_too_low,
            internal_error, invalid_address, invalid_destination, customer_action_required,
            external_vendor_error, or payment_request_expired.
          type: string
          nullable: true
        return_code:
          description: The return code for reversed transfers
          type: string
          nullable: true
        amount:
          type: integer
          description: The actual amount in base units of the asset.
          nullable: true
        estimated_amount:
          type: integer
          description: The estimated amount in base units of the asset.
        fee:
          type: integer
          description: The fee associated with the transfer. Represents the sum of
            the bank and platform fees.
        fee_details:
          type: array
          description: The fees associated with the transfer.
          items:
            "$ref": "#/components/schemas/FeeDetail"
        estimated_network_fee:
          type: integer
          description: The estimated network fee in base units of network_fee_asset.
            Only present on `crypto` transfers.
          nullable: true
        network_fee:
          type: integer
          description: The actual network fee in base units of network_fee_asset.
            Only present on `crypto` transfers that have successfully completed.
          nullable: true
        network_fee_asset:
          type: string
          minLength: 1
          maxLength: 16
          description: The asset code of the network fee. Only present on `crypto`
            transfers that have successfully completed.
          nullable: true
        network_fee_liability_amount:
          type: integer
          description: The equivalent fiat network fee in base units of network_fee_liability_amount_asset.
            Only present on `crypto` transfers that have successfully completed.
          nullable: true
        network_fee_liability_amount_asset:
          type: string
          description: The fiat asset the network_fee_liability_amount is denominated
            in. Only present on `crypto` transfers that have successfully completed.
          nullable: true
        txn_hash:
          type: string
          description: 'The hash of the blockchain transaction (deprecated: use identifiers
            array)'
          nullable: true
        identifiers:
          type: array
          description: Array of identifiers associated with this transfer (transaction
            hash, wire reference numbers)
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                - txn_hash
                - imad
                - omad
                - gateway_url
                description: Type of identifier (txn_hash, imad, omad, gateway_url)
              value:
                type: string
                description: The identifier value
        reference_transfer_guid:
          type: string
          description: The guid of the related transfer. Only present on return type
            transfers.
          minLength: 32
          maxLength: 32
          nullable: true
        source_account:
          description: The source account in the transfer. Can be omitted for crypto
            deposits.
          type: object
          properties:
            guid:
              type: string
              description: Auto-generated unique identifier for the transfer account.
              minLength: 32
              maxLength: 32
            type:
              type: string
              description: The type of transfer account; one of trading, fiat, external_bank_account,
                external_wallet, one_time_address, reserve, invoice_operations, fee,
                gas, or storage.
            bank_guid:
              type: string
              description: The account's identifier.
              minLength: 32
              maxLength: 32
              nullable: true
            customer_guid:
              type: string
              description: The account's identifier.
              minLength: 32
              maxLength: 32
              nullable: true
          nullable: true
        source_participants:
          type: array
          description: The participants in the source account.
          items:
            "$ref": "#/components/schemas/TransferParticipant"
          nullable: true
        destination_account:
          description: The destination account in the transfer.
          type: object
          properties:
            guid:
              type: string
              description: Auto-generated unique identifier for the transfer account.
              minLength: 32
              maxLength: 32
            type:
              type: string
              description: The type of transfer account; one of trading, fiat, external_bank_account,
                external_wallet, one_time_address, reserve, invoice_operations, fee,
                gas, or storage.
            bank_guid:
              type: string
              description: The account's identifier.
              minLength: 32
              maxLength: 32
              nullable: true
            customer_guid:
              type: string
              description: The account's identifier.
              minLength: 32
              maxLength: 32
              nullable: true
          nullable: true
        destination_participants:
          type: array
          description: The participants in the source account.
          items:
            "$ref": "#/components/schemas/TransferParticipant"
          nullable: true
        deposit_address_guid:
          type: string
          description: The guid of the deposit address. Only present on crypto deposits.
          minLength: 32
          maxLength: 32
          nullable: true
        created_at:
          type: string
          description: ISO8601 datetime the record was created at.
          format: date-time
        updated_at:
          type: string
          description: ISO8601 datetime the record was last updated at.
          format: date-time
        hold_details:
          description: The hold details if a transfer is or will be placed on a hold.
          type: object
          properties:
            applicable_types:
              description: The list of hold types that are applicable for the transfer;
                one of administrative or non_administrative.
              type: array
              items:
                type: string
              nullable: true
            duration:
              type: integer
              description: The approximate time (in seconds) that the transfer will
                be held for.
              nullable: true
            started_at:
              type: string
              description: ISO8601 datetime the transfer hold was started at.
              format: date-time
              nullable: true
          nullable: true
        transfer_details:
          type: object
          description: The raw details on the transfer from the bank.
          nullable: true
        payment_rail:
          type: string
          description: 'The rail the payment was done on. One of: ach, eft, wire,
            rtp, etransfer'
          nullable: true
        external_id:
          type: string
          description: The external identifier for the transfer.
          nullable: true
          minLength: 1
          maxLength: 64
        labels:
          type: array
          description: The labels associated with the transfer.
          items:
            type: string
          nullable: true
        entries:
          type: array
          description: Transfer entries associated with the batch transfer
          items:
            "$ref": "#/components/schemas/TransferEntry"
          nullable: true
    TransferEntry:
      type: object
      properties:
        amount:
          type: integer
          description: The actual amount in base units of the asset.
          nullable: true
        fee:
          type: integer
          description: The fee associated with the transfer entry.
        source_account:
          description: The source account in the batch transfer entry.
          type: object
          properties:
            guid:
              type: string
              description: Auto-generated unique identifier for the transfer account.
              minLength: 32
              maxLength: 32
            type:
              type: string
              description: The type of transfer account; one of external_wallet.
            bank_guid:
              type: string
              description: The account's identifier.
              minLength: 32
              maxLength: 32
              nullable: true
            customer_guid:
              type: string
              description: The account's identifier.
              minLength: 32
              maxLength: 32
              nullable: true
          nullable: true
        destination_account:
          description: The destination account entry in the batch transfer.
          type: object
          properties:
            guid:
              type: string
              description: Auto-generated unique identifier for the transfer account.
              minLength: 32
              maxLength: 32
            type:
              type: string
              description: The type of transfer account; one of trading, fiat, external_bank_account,
                external_wallet, one_time_address, reserve, invoice_operations, fee,
                gas, or storage.
            bank_guid:
              type: string
              description: The account's identifier.
              minLength: 32
              maxLength: 32
              nullable: true
            customer_guid:
              type: string
              description: The account's identifier.
              minLength: 32
              maxLength: 32
              nullable: true
          nullable: true
      required:
      - amount
      - fee
      - source_account
      - destination_account
    TransferParticipant:
      type: object
      properties:
        type:
          type: string
          description: The type of participant; one of unknown, bank, customer, or
            counterparty.
        amount:
          type: integer
          description: The amount in base units of the asset.
        guid:
          type: string
          description: The participant's identifier.
          minLength: 32
          maxLength: 32
      required:
      - type
      - amount
    TransferType:
      type: string
      enum:
      - funding
      - book
      - crypto
      - instant_funding
      - funding_return
      - crypto_return
      - loss_recovery
      - inter_account
      - lightning
      - instant_funding_return
    TransferSide:
      type: string
      enum:
      - deposit
      - withdrawal
    TransferState:
      type: string
      enum:
      - storing
      - pending
      - reviewing
      - completed
      - failed
    TransferAccountType:
      type: string
      enum:
      - trading
      - fiat
      - external_bank_account
      - external_wallet
      - one_time_address
      - reserve
      - invoice_operations
      - fee
      - gas
      - storage
    TransferFailureCode:
      type: string
      enum:
      - non_sufficient_funds
      - refresh_required
      - party_name_invalid
      - payment_rail_invalid
      - compliance_rejection
      - cancelled
      - reversed
      - limit_exceeded
      - network_fee_too_low
      - amount_too_low
      - internal_error
      - invalid_address
      - invalid_destination
      - customer_action_required
      - external_vendor_error
      - payment_request_expired
    Trade:
      type: object
      properties:
        guid:
          type: string
          description: Auto-generated unique identifier for the trade.
          minLength: 32
          maxLength: 32
        trade_type:
          description: The type of trade; one of platform, liquidation, or exit.
          type: string
        customer_guid:
          type: string
          description: The associated customer's identifier.
          nullable: true
        quote_guid:
          type: string
          description: The associated quote's identifier.
          minLength: 32
          maxLength: 32
        symbol:
          type: string
          description: The trade symbol the pricing is related to. Format is asset-counter_asset,
            e.g., BTC-USD.
        side:
          type: string
          description: The direction of the trade; one of buy or sell.
        state:
          description: The state of the trade; one of storing, pending, cancelled,
            completed, settling, or failed.
          type: string
        failure_code:
          description: The failure code for failed trades; one of non_sufficient_funds,
            unsupported, limit_exceeded, expired_quote, market_volatility, or not_filled.
          type: string
          nullable: true
        receive_amount:
          type: integer
          description: 'The amount to be received in base units of the currency: currency
            is "asset" for buy and "counter_asset" for sell.'
        deliver_amount:
          type: integer
          description: 'The amount to be delivered in base units of the currency:
            currency is "counter_asset" for buy and "asset" for sell.'
        fee:
          type: integer
          description: The fee associated with the trade. Denominated in "counter_asset"
            base units. Represents the sum of the bank and platform fees.
        fee_details:
          type: array
          description: The fees associated with the trade.
          items:
            "$ref": "#/components/schemas/FeeDetail"
        reference_trade_guid:
          type: string
          description: The guid of the related trade. Only present on `exit` trades.
          minLength: 32
          maxLength: 32
          nullable: true
        created_at:
          type: string
          description: ISO8601 datetime the record was created at.
          format: date-time
        updated_at:
          type: string
          description: ISO8601 datetime the record was last updated at.
          format: date-time
        labels:
          type: array
          description: The labels associated with the trade.
          items:
            type: string
          nullable: true
    TradeType:
      type: string
      enum:
      - platform
      - liquidation
      - exit
    TradeSide:
      type: string
      enum:
      - buy
      - sell
    TradeState:
      type: string
      enum:
      - storing
      - pending
      - cancelled
      - completed
      - settling
      - failed
    TradeFailureCode:
      type: string
      enum:
      - non_sufficient_funds
      - unsupported
      - limit_exceeded
      - expired_quote
      - market_volatility
      - not_filled
    ExternalWalletList:
      type: object
      properties:
        total:
          description: The total number of records available.
          type: integer
          minimum: 0
        page:
          description: The page index to retrieve.
          type: integer
          minimum: 0
        per_page:
          description: The number of entities per page to return.
          type: integer
          minimum: 1
        objects:
          type: array
          items:
            "$ref": "#/components/schemas/ExternalWallet"
      required:
      - total
      - page
      - per_page
      - objects
    ExternalBankAccountList:
      type: object
      properties:
        total:
          description: The total number of records available.
          type: integer
          minimum: 0
        page:
          description: The page index to retrieve.
          type: integer
          minimum: 0
        per_page:
          description: The number of entities per page to return.
          type: integer
          minimum: 1
        objects:
          type: array
          items:
            "$ref": "#/components/schemas/ExternalBankAccount"
      required:
      - total
      - page
      - per_page
      - objects
    TransferList:
      type: object
      properties:
        total:
          description: The total number of records available.
          type: integer
          minimum: 0
        page:
          description: The page index to retrieve.
          type: integer
          minimum: 0
        per_page:
          description: The number of entities per page to return.
          type: integer
          minimum: 1
        objects:
          type: array
          items:
            "$ref": "#/components/schemas/Transfer"
      required:
      - total
      - page
      - per_page
      - objects
    TradeList:
      type: object
      properties:
        total:
          description: The total number of records available.
          type: integer
          minimum: 0
        page:
          description: The page index to retrieve.
          type: integer
          minimum: 0
        per_page:
          description: The number of entities per page to return.
          type: integer
          minimum: 1
        objects:
          type: array
          items:
            "$ref": "#/components/schemas/Trade"
      required:
      - total
      - page
      - per_page
      - objects
    WorkflowsList:
      type: object
      properties:
        total:
          description: The total number of records available.
          type: integer
          minimum: 0
        page:
          description: The page index to retrieve.
          type: integer
          minimum: 0
        per_page:
          description: The number of entities per page to return.
          type: integer
          minimum: 1
        objects:
          type: array
          items:
            "$ref": "#/components/schemas/Workflow"
      required:
      - total
      - page
      - per_page
      - objects
    Account:
      type: object
      properties:
        type:
          description: The account type; one of trading, fee, fiat, gas, reserve,
            invoice_operations, or storage.
          type: string
        guid:
          description: Auto-generated unique identifier for the account.
          type: string
          minLength: 32
          maxLength: 32
        created_at:
          type: string
          description: ISO8601 datetime the record was created at.
          format: date-time
        updated_at:
          type: string
          description: ISO8601 datetime the record was last updated at.
          format: date-time
        asset:
          type: string
          description: The asset code.
          minLength: 1
          maxLength: 16
        name:
          description: The name of the account.
          type: string
          minLength: 1
          maxLength: 128
        bank_guid:
          type: string
          description: The bank identifier associated with the account.
          minLength: 32
          maxLength: 32
        customer_guid:
          type: string
          description: The customer identifier associated with the account.
          minLength: 32
          maxLength: 32
        platform_balance:
          type: integer
          description: The amount of funds that are in the account, in base units
            of the asset.
        platform_available:
          type: integer
          description: The amount of funds that are in the account, in base units
            of the asset, that are available for use on the platform.
        state:
          description: The state of the account; one of storing or created.
          type: string
        labels:
          type: array
          description: The labels associated with the account.
          items:
            type: string
          nullable: true
    AccountType:
      type: string
      enum:
      - trading
      - fee
      - fiat
      - gas
      - reserve
      - invoice_operations
      - storage
    AccountState:
      type: string
      enum:
      - storing
      - created
    AccountList:
      type: object
      properties:
        total:
          description: The total number of records available.
          type: integer
          minimum: 0
        page:
          description: The page index to retrieve.
          type: integer
          minimum: 0
        per_page:
          description: The number of entities per page to return.
          type: integer
          minimum: 1
        objects:
          type: array
          items:
            "$ref": "#/components/schemas/Account"
      required:
      - total
      - page
      - per_page
      - objects
    ListRequestCursor:
      description: The cursor used to retrieve the page.
      type: string
      nullable: true
    ListRequestPage:
      description: The page index to retrieve.
      type: integer
      minimum: 0
    ListRequestPerPage:
      description: The number of entities per page to return.
      type: integer
      minimum: 1
      maximum: 100
    ListRequestOwner:
      description: The owner of the entity; one of bank or customer.
      type: string
    ExternalBankAccount:
      type: object
      properties:
        guid:
          type: string
          description: Auto-generated unique identifier for the account.
          minLength: 32
          maxLength: 32
        name:
          description: The name of the account.
          type: string
          minLength: 1
          maxLength: 128
        asset:
          type: string
          description: The asset code.
          minLength: 1
          maxLength: 16
        account_kind:
          description: The type of account; one of plaid, plaid_processor_token, or
            raw_routing_details.
          type: string
        environment:
          description: The environment that the external bank account is operating
            in; one of sandbox or production.
          type: string
        bank_guid:
          type: string
          description: The bank identifier.
          minLength: 32
          maxLength: 32
        customer_guid:
          type: string
          description: The customer identifier.
          minLength: 32
          maxLength: 32
          nullable: true
        counterparty_guid:
          type: string
          description: The counterparty identifier.
          minLength: 32
          maxLength: 32
          nullable: true
        created_at:
          type: string
          description: ISO8601 datetime the record was created at.
          format: date-time
        updated_at:
          type: string
          description: ISO8601 datetime the record was last updated at.
          format: date-time
        plaid_institution_id:
          type: string
          description: The Plaid institution ID for the account.
          minLength: 1
          maxLength: 128
          nullable: true
        plaid_account_mask:
          type: string
          description: The account number mask for the account.
          minLength: 1
          maxLength: 128
          nullable: true
        plaid_account_name:
          type: string
          description: The name for the account.
          minLength: 1
          maxLength: 128
          nullable: true
        state:
          description: The state of the external bank account; one of storing, completed,
            failed, refresh_required, unverified, deleting, or deleted.
          type: string
        failure_code:
          description: The failure code for failed transfers.
          type: string
          nullable: true
        balance_updated_at:
          description: The timestamp that the balance information was last updated
            at.
          type: string
          format: date-time
          nullable: true
        balances:
          description: Balance information for the account.
          type: object
          properties:
            available:
              description: The available balance in the account.
              type: integer
              minimum: 0
              nullable: true
            current:
              description: The current balance in the account including pending transactions.
              type: integer
              minimum: 0
              nullable: true
          nullable: true
        pii:
          description: The account holder information.
          type: array
          items:
            type: object
            properties:
              names:
                type: array
                description: Array of names on the account
                items:
                  type: string
                nullable: true
              addresses:
                type: array
                description: Array of addresses associated to the account
                items:
                  type: object
                  properties:
                    street:
                      description: The first line of the address.
                      type: string
                      nullable: true
                    street2:
                      description: The optional second line of the address.
                      type: string
                      nullable: true
                    city:
                      description: The city of the address.
                      type: string
                      nullable: true
                    subdivision:
                      description: The ISO 3166-2 subdivision code of the address;
                        not used by all countries.
                      type: string
                      nullable: true
                    postal_code:
                      description: The postal/post/zip code of the address; not used
                        by all countries.
                      type: string
                      nullable: true
                    country_code:
                      description: The ISO 3166 country 2-Alpha country code of the
                        address.
                      type: string
                      nullable: true
                nullable: true
              email_addresses:
                type: array
                description: Array of email addresses associated to the account
                items:
                  type: string
                nullable: true
              phone_numbers:
                type: array
                description: Array of phone numbers associated to the account
                items:
                  type: string
                nullable: true
              account_details:
                description: The account details for the bank account.
                type: array
                items:
                  type: object
                  properties:
                    account_number:
                      description: The account number.
                      type: string
                  required:
                  - account_number
                nullable: true
              routing_details:
                description: The routing details for the bank account.
                type: array
                items:
                  type: object
                  properties:
                    routing_number_type:
                      description: The type of routing number; one of CPA, ABA, or
                        IFSC.
                      type: string
                    routing_number:
                      description: The routing number.
                      type: string
                  required:
                  - routing_number_type
                  - routing_number
                nullable: true
          nullable: true
    ExternalBankAccountKind:
      type: string
      enum:
      - plaid
      - plaid_processor_token
      - raw_routing_details
    ExternalBankAccountState:
      type: string
      enum:
      - storing
      - completed
      - failed
      - refresh_required
      - unverified
      - deleting
      - deleted
    IdentificationNumber:
      type: object
      properties:
        type:
          type: string
          description: The source of the identification number; one of drivers_license,
            passport, passport_card, visa, residence_card, social_security_number,
            tax_identification_number, identification_card, work_permit, indigenous_document_number,
            national_identification_number, employer_identification_number, or business_registration_number.
        issuing_country_code:
          type: string
          description: The ISO 3166 country 2-Alpha country code of the identification
            number issuer.
          nullable: true
        identification_number:
          type: string
          description: The identification number.
      required:
      - type
      - issuing_country_code
      - identification_number
    ExternalWallet:
      type: object
      properties:
        guid:
          type: string
          description: Auto-generated unique identifier for the wallet.
          minLength: 32
          maxLength: 32
        name:
          description: The name of the wallet.
          type: string
          minLength: 1
          maxLength: 128
        asset:
          type: string
          description: The asset code.
          minLength: 1
          maxLength: 16
        environment:
          description: The environment that the wallet is configured for; one of sandbox
            or production.
          type: string
        bank_guid:
          type: string
          description: The bank identifier.
          minLength: 32
          maxLength: 32
        customer_guid:
          type: string
          description: The customer identifier.
          minLength: 32
          maxLength: 32
          nullable: true
        counterparty_guid:
          type: string
          description: The counterparty identifier.
          minLength: 32
          maxLength: 32
          nullable: true
        address:
          description: The blockchain wallet address for the wallet.
          maxLength: 1024
          type: string
        tag:
          description: The blockchain tag to use when transferring crypto to the wallet.
          maxLength: 512
          type: string
          nullable: true
        created_at:
          type: string
          description: ISO8601 datetime the record was created at.
          format: date-time
        updated_at:
          type: string
          description: ISO8601 datetime the record was last updated at.
          format: date-time
        state:
          description: The state of the external wallet; one of storing, pending,
            failed, completed, deleting, or deleted.
          type: string
        failure_code:
          type: string
          description: The failure code of an external wallet (if any)
          nullable: true
    ExternalWalletEnvironment:
      type: string
      enum:
      - sandbox
      - production
    ExternalWalletState:
      type: string
      enum:
      - storing
      - pending
      - failed
      - completed
      - deleting
      - deleted
    PostBank:
      type: object
      description: Request body for bank creation.
      properties:
        type:
          type: string
          description: The type of bank.
          enum:
          - sandbox
        name:
          type: string
          description: The name of the bank.
          minLength: 1
          maxLength: 128
        supported_trading_symbols:
          type: array
          description: The trading symbols supported by the bank.
          items:
            type: string
          maxItems: 50
        supported_payout_symbols:
          type: array
          description: The payout symbols supported by the bank. This is not yet supported
            and should be nil or empty.
          items:
            "$ref": "#/components/schemas/PostSupportedPayoutSymbols"
          nullable: true
          maxItems: 50
        supported_fiat_account_assets:
          type: array
          description: The fiat account assets supported by the bank.
          items:
            type: string
          minItems: 1
          maxItems: 1
        supported_country_codes:
          type: array
          description: The country codes supported by the bank.
          items:
            type: string
          minItems: 1
          maxItems: 1
        features:
          type: array
          description: The features supported by the bank.
          items:
            type: string
            enum:
            - attestation_identity_records
            - attestation_identity_records_v2
            - attestation_identity_records_v3
            - kyc_identity_verifications
            - business_customers
            - individual_customers
          maxItems: 50
        cors_allowed_origins:
          type: array
          description: The list of allowed CORS origin URIs.
          items:
            type: string
          nullable: true
          maxItems: 50
      required:
      - type
      - name
      - supported_trading_symbols
      - supported_fiat_account_assets
      - supported_country_codes
      - features
    PatchBank:
      type: object
      description: Request body for bank modification.
      properties:
        name:
          type: string
          description: The name of the bank.
          nullable: true
          minLength: 1
          maxLength: 128
        supported_trading_symbols:
          type: array
          description: The trading symbols supported by the bank.
          items:
            type: string
          nullable: true
          maxItems: 50
        supported_payout_symbols:
          type: array
          description: The payout symbols supported by the bank. This is not yet supported
            and should be nil or empty.
          items:
            "$ref": "#/components/schemas/PostSupportedPayoutSymbols"
          nullable: true
          maxItems: 50
        cors_allowed_origins:
          type: array
          description: The list of allowed CORS origin URIs.
          items:
            type: string
          nullable: true
          maxItems: 50
    PostCustomer:
      type: object
      description: Request body for customer creation.
      properties:
        type:
          type: string
          description: The type of customer.
          enum:
          - business
          - individual
        address:
          type: object
          description: The customer's address.
          properties:
            street:
              type: string
              description: The first line of the address.
            street2:
              type: string
              description: The optional second line of the address.
              nullable: true
            city:
              type: string
              description: The city of the address.
            subdivision:
              type: string
              description: The ISO 3166-2 subdivision code of the address. Applicable
                only for countries that use subnational states, provinces, lands,
                oblasts or regions.
              nullable: true
              minLength: 1
              maxLength: 3
            postal_code:
              type: string
              description: The postal, zip or post code of the address. Applicable
                only for countries that use postal, zip or post codes.
              nullable: true
            country_code:
              type: string
              description: The ISO 3166 country 2-Alpha country code of the address.
              minLength: 2
              maxLength: 2
          nullable: true
          required:
          - street
          - city
          - country_code
        phone_number:
          type: string
          description: The customer's phone number.
          nullable: true
        email_address:
          type: string
          description: The customer's email address.
          nullable: true
        identification_numbers:
          type: array
          description: The customer's identification numbers.
          items:
            "$ref": "#/components/schemas/PostIdentificationNumber"
          nullable: true
          minItems: 1
          maxItems: 10
        name:
          type: object
          description: The customer's name. Optional when type is individual or type
            is business.
          properties:
            first:
              type: string
              description: The customer's first name. Required when type is individual.
              nullable: true
            middle:
              type: string
              description: The customer's middle name. Optional when type is individual.
              nullable: true
            last:
              type: string
              description: The customer's last name. Required when type is individual.
              nullable: true
            full:
              type: string
              description: The customer's full name. Required when type is business.
              nullable: true
          nullable: true
        date_of_birth:
          type: string
          description: The customer's date of birth. Optional when type is individual.
          format: date
          nullable: true
        aliases:
          type: array
          description: The aliases of the customer. Optional when type is business.
          items:
            type: object
            properties:
              full:
                type: string
                description: The customer's full name. Required when type is business.
                nullable: true
          nullable: true
          minItems: 0
          maxItems: 1
        website:
          type: string
          description: The customer's website. Optional when type is business.
          nullable: true
        labels:
          type: array
          description: The labels associated with the customer.
          items:
            type: string
            minLength: 1
            maxLength: 64
          nullable: true
          maxItems: 8
      required:
      - type
    PatchCustomer:
      type: object
      description: Request body for customer modification.
      properties:
        state:
          type: string
          description: The customer's state.
          nullable: true
          enum:
          - unverified
    PostCounterparty:
      type: object
      description: Request body for counterparty creation.
      properties:
        type:
          type: string
          description: The counterparty's type.
          enum:
          - business
          - individual
        customer_guid:
          type: string
          description: The owning customer's identifier.
          nullable: true
          minLength: 32
          maxLength: 32
        address:
          type: object
          description: The address of the counterparty.
          properties:
            street:
              type: string
              description: The first line of the address.
              nullable: true
            street2:
              type: string
              description: The optional second line of the address.
              nullable: true
            city:
              type: string
              description: The city of the address.
              nullable: true
            subdivision:
              type: string
              description: The ISO 3166-2 subdivision code of the address. Applicable
                only for countries that use subnational states, provinces, lands,
                oblasts or regions.
              nullable: true
              minLength: 1
              maxLength: 3
            postal_code:
              type: string
              description: The postal, zip or post code of the address. Applicable
                only for countries that use postal, zip or post codes.
              nullable: true
            country_code:
              type: string
              description: The ISO 3166 country 2-Alpha country code of the address.
              minLength: 2
              maxLength: 2
          required:
          - country_code
        name:
          type: object
          description: The name of the counterparty. Required when type is business
            or type is individual.
          properties:
            full:
              type: string
              description: The counterparty's full name. Required when type is business.
              nullable: true
            first:
              type: string
              description: The counterparty's first name. Required when type is individual.
              nullable: true
            middle:
              type: string
              description: The counterparty's middle name. Optional when type is individual.
              nullable: true
            last:
              type: string
              description: The counterparty's last name. Required when type is individual.
              nullable: true
          nullable: true
        aliases:
          type: array
          description: The aliases of the counterparty. Optional when type is business.
          items:
            type: object
            properties:
              full:
                type: string
                description: The counterparty's full name. Required when type is business.
                nullable: true
          nullable: true
          minItems: 0
          maxItems: 1
        date_of_birth:
          type: string
          description: The counterparty's date of birth. Optional when type is individual.
          format: date
          nullable: true
        email_address:
          type: string
          description: The counterparty's email address.
          nullable: true
        identification_numbers:
          type: array
          description: The counterparty's identification numbers.
          items:
            "$ref": "#/components/schemas/PostIdentificationNumber"
          nullable: true
          minItems: 1
          maxItems: 10
        labels:
          type: array
          description: The labels associated with the counterparty.
          items:
            type: string
            minLength: 1
            maxLength: 64
          nullable: true
          maxItems: 8
      required:
      - type
      - address
    PostIdentityVerification:
      type: object
      description: Request body for identity verification creation.
      properties:
        type:
          type: string
          description: The type of identity verification.
          enum:
          - kyc
          - bank_account
          - counterparty
        customer_guid:
          type: string
          description: The customer's identifier. Required when type is kyc and method
            is attested_business_registration, type is kyc and method is attested_id_and_selfie,
            type is kyc and method is attested_business_associate, or type is kyc
            and method is attested_id_and_database.
          nullable: true
          maxLength: 32
        expected_behaviours:
          type: array
          description: The optional expected behaviour to simulate.
          items:
            type: string
            enum:
            - passed_immediately
            - failed_immediately
            - tax_id_not_checked
          nullable: true
          maxItems: 50
        method:
          type: string
          description: The identity verification method. Required when type is counterparty,
            type is kyc, or type is bank_account.
          nullable: true
          enum:
          - watchlists
          - attested
          - document_submission
          - enhanced_due_diligence
          - id_and_selfie
          - tax_id_and_selfie
          - business_registration
          - attested_id_and_selfie
          - attested_business_registration
          - attested_business_associate
          - attested_id_and_database
          - attested_ownership
          - account_ownership
        counterparty_guid:
          type: string
          description: The counterparty's identifier. Required when type is counterparty.
          nullable: true
        country_code:
          type: string
          description: The ISO 3166 country 2-Alpha country the customer is being
            verified in. If not present, will default to the Bank's configured country
            code. Optional when type is kyc and method is id_and_selfie, type is kyc
            and method is tax_id_and_selfie, or type is kyc and method is business_registration.
          nullable: true
        require_tax_id:
          type: boolean
          description: Whether the collection of the tax id is required during identity
            verification. This will default to SSN in USA and SIN in Canada. It's
            not used elsewhere. Optional when type is kyc and method is id_and_selfie.
          nullable: true
          default: false
        name:
          type: object
          description: The customer's name. Required when type is kyc and method is
            attested, type is kyc and method is attested_business_registration, type
            is kyc and method is attested_id_and_selfie, type is kyc and method is
            attested_business_associate, type is kyc and method is attested_id_and_database,
            or type is bank_account and method is attested_ownership. Optional when
            type is kyc and method is watchlists.
          properties:
            first:
              type: string
              description: The customer's first name. Required when type is kyc and
                method is attested, type is kyc and method is attested_id_and_selfie,
                type is kyc and method is attested_business_associate, or type is
                kyc and method is attested_id_and_database. Optional when type is
                kyc and method is watchlists or type is bank_account and method is
                attested_ownership.
              nullable: true
            middle:
              type: string
              description: The customer's middle name. Optional when type is kyc and
                method is attested, type is kyc and method is attested_id_and_selfie,
                type is kyc and method is attested_business_associate, type is kyc
                and method is attested_id_and_database, type is kyc and method is
                watchlists, or type is bank_account and method is attested_ownership.
              nullable: true
            last:
              type: string
              description: The customer's last name. Required when type is kyc and
                method is attested, type is kyc and method is attested_id_and_selfie,
                type is kyc and method is attested_business_associate, or type is
                kyc and method is attested_id_and_database. Optional when type is
                kyc and method is watchlists or type is bank_account and method is
                attested_ownership.
              nullable: true
            full:
              type: string
              description: The customer's full name. Required when type is kyc and
                method is attested_business_registration or type is bank_account and
                method is attested_ownership. Optional when type is kyc and method
                is attested, type is kyc and method is attested_id_and_selfie, type
                is kyc and method is attested_business_associate, type is kyc and
                method is attested_id_and_database, or type is kyc and method is watchlists.
              nullable: true
          nullable: true
        address:
          type: object
          description: The customer's address. Required when type is kyc and method
            is attested, type is kyc and method is attested_business_registration,
            type is kyc and method is attested_id_and_selfie, type is kyc and method
            is attested_business_associate, or type is kyc and method is attested_id_and_database.
            Optional when type is kyc and method is watchlists or type is bank_account
            and method is attested_ownership.
          properties:
            street:
              type: string
              description: The first line of the address. Required when type is kyc
                and method is attested, type is kyc and method is attested_business_registration,
                type is kyc and method is attested_id_and_selfie, type is kyc and
                method is attested_business_associate, type is kyc and method is attested_id_and_database,
                type is kyc and method is watchlists, or type is bank_account and
                method is attested_ownership.
              nullable: true
            street2:
              type: string
              description: The optional second line of the address. Optional when
                type is kyc and method is attested, type is kyc and method is attested_business_registration,
                type is kyc and method is attested_id_and_selfie, type is kyc and
                method is attested_business_associate, type is kyc and method is attested_id_and_database,
                type is kyc and method is watchlists, or type is bank_account and
                method is attested_ownership.
              nullable: true
            city:
              type: string
              description: The city of the address. Required when type is kyc and
                method is attested, type is kyc and method is attested_business_registration,
                type is kyc and method is attested_id_and_selfie, type is kyc and
                method is attested_business_associate, type is kyc and method is attested_id_and_database,
                type is kyc and method is watchlists, or type is bank_account and
                method is attested_ownership.
              nullable: true
            subdivision:
              type: string
              description: The ISO 3166-2 subdivision code of the address. Applicable
                only for countries that use subnational states, provinces, lands,
                oblasts or regions. Optional when type is kyc and method is attested,
                type is kyc and method is attested_business_registration, type is
                kyc and method is attested_id_and_selfie, type is kyc and method is
                attested_business_associate, type is kyc and method is attested_id_and_database,
                type is kyc and method is watchlists, or type is bank_account and
                method is attested_ownership.
              nullable: true
              minLength: 1
              maxLength: 3
            postal_code:
              type: string
              description: The postal, zip or post code of the address. Applicable
                only for countries that use postal, zip or post codes. Optional when
                type is kyc and method is attested, type is kyc and method is attested_business_registration,
                type is kyc and method is attested_id_and_selfie, type is kyc and
                method is attested_business_associate, type is kyc and method is attested_id_and_database,
                type is kyc and method is watchlists, or type is bank_account and
                method is attested_ownership.
              nullable: true
            country_code:
              type: string
              description: The ISO 3166 country 2-Alpha country code of the address.
                Required when type is kyc and method is attested, type is kyc and
                method is attested_business_registration, type is kyc and method is
                attested_id_and_selfie, type is kyc and method is attested_business_associate,
                type is kyc and method is attested_id_and_database, type is kyc and
                method is watchlists, or type is bank_account and method is attested_ownership.
              nullable: true
              minLength: 2
              maxLength: 2
          nullable: true
        date_of_birth:
          type: string
          description: The customer's date of birth. Required when type is kyc and
            method is attested, type is kyc and method is attested_id_and_selfie,
            type is kyc and method is attested_business_associate, or type is kyc
            and method is attested_id_and_database.
          format: date
          nullable: true
        identification_numbers:
          type: array
          description: The customer's identification numbers. Required when type is
            kyc and method is attested, type is kyc and method is attested_business_registration,
            type is kyc and method is attested_id_and_selfie, type is kyc and method
            is attested_business_associate, or type is kyc and method is attested_id_and_database.
          items:
            "$ref": "#/components/schemas/PostIdentificationNumber"
          nullable: true
          minItems: 1
          maxItems: 10
        aliases:
          type: array
          description: The aliases of the customer. Optional when type is kyc and
            method is attested_business_registration or type is kyc and method is
            watchlists.
          items:
            type: object
            properties:
              full:
                type: string
                description: The customer's full name. Required when type is kyc and
                  method is attested_business_registration or type is kyc and method
                  is watchlists.
                nullable: true
          nullable: true
          minItems: 0
        phone_number:
          type: string
          description: The customer's phone number. Required when type is kyc and
            method is attested_business_registration, type is kyc and method is attested_id_and_selfie,
            type is kyc and method is attested_business_associate, or type is kyc
            and method is attested_id_and_database. Optional when type is bank_account
            and method is attested_ownership.
          nullable: true
        email_address:
          type: string
          description: The customer's email address. Required when type is kyc and
            method is attested_business_registration, type is kyc and method is attested_id_and_selfie,
            type is kyc and method is attested_business_associate, or type is kyc
            and method is attested_id_and_database. Optional when type is bank_account
            and method is attested_ownership.
          nullable: true
        website:
          type: string
          description: The customer's website. Required when type is kyc and method
            is attested_business_registration.
          nullable: true
        nature_of_business:
          type: string
          description: The customer's nature of business. Required when type is kyc
            and method is attested_business_registration.
          nullable: true
          maxLength: 256
        director_customer_guids:
          type: array
          description: The customer guids of the directors of the business Required
            when type is kyc and method is attested_business_registration.
          items:
            type: string
          nullable: true
          minItems: 1
          maxItems: 50
        ultimate_beneficial_owners:
          type: array
          description: The ultimate beneficial owners of the business with 10% or
            more ownership Required when type is kyc and method is attested_business_registration.
          items:
            "$ref": "#/components/schemas/PostUltimateBeneficialOwner"
          nullable: true
          minItems: 1
          maxItems: 50
        supporting_file_guids:
          type: array
          description: File guids supporting the verification Required when type is
            kyc and method is attested_business_registration, type is kyc and method
            is attested_id_and_selfie, type is kyc and method is attested_business_associate,
            or type is kyc and method is attested_id_and_database.
          items:
            type: string
          nullable: true
          minItems: 1
          maxItems: 10
        registered_address:
          type: object
          description: The customer's registered address. Required for attested business
            registration V3. Optional when type is kyc and method is attested_business_registration.
          properties:
            street:
              type: string
              description: The first line of the address. Required when type is kyc
                and method is attested_business_registration.
              nullable: true
            street2:
              type: string
              description: The optional second line of the address. Optional when
                type is kyc and method is attested_business_registration.
              nullable: true
            city:
              type: string
              description: The city of the address. Required when type is kyc and
                method is attested_business_registration.
              nullable: true
            subdivision:
              type: string
              description: The ISO 3166-2 subdivision code of the address. Applicable
                only for countries that use subnational states, provinces, lands,
                oblasts or regions. Optional when type is kyc and method is attested_business_registration.
              nullable: true
              minLength: 1
              maxLength: 3
            postal_code:
              type: string
              description: The postal, zip or post code of the address. Applicable
                only for countries that use postal, zip or post codes. Optional when
                type is kyc and method is attested_business_registration.
              nullable: true
            country_code:
              type: string
              description: The ISO 3166 country 2-Alpha country code of the address.
                Required when type is kyc and method is attested_business_registration.
              nullable: true
              minLength: 2
              maxLength: 2
          nullable: true
        business_industry:
          type: string
          description: The industry the business operates in. Required for attested
            business registration V3. e.g. 'Crypto / Digital Assets / Blockchain',
            'Education', 'Gaming', 'Healthcare / Hospitality', 'Lending / Investments',
            'Retail / E-Commerce', etc. Optional when type is kyc and method is attested_business_registration.
          nullable: true
        business_funds_source:
          type: string
          description: The source of business funds. Required for attested business
            registration V3. e.g. 'Funds from individual customers', 'Funds from business
            customers', 'Funds from both individual and business customers', etc.
            Optional when type is kyc and method is attested_business_registration.
          nullable: true
        business_funds_destination:
          type: string
          description: The destination of business funds. Required for attested business
            registration V3. e.g. 'To your business account (bank or wallet)', 'To
            vendors or suppliers', 'To employees or contractors', 'To sellers or merchants',
            'Bulk payments or payouts', etc. Optional when type is kyc and method
            is attested_business_registration.
          nullable: true
        occupation:
          type: string
          description: The customer's occupation. Required when type is kyc and method
            is attested_business_associate. Optional when type is kyc and method is
            attested_id_and_selfie.
          nullable: true
        biometrics_verified:
          type: boolean
          description: Whether biometrics have been verified Required when type is
            kyc and method is attested_business_associate or type is kyc and method
            is attested_id_and_database.
          nullable: true
        external_bank_account_guid:
          type: string
          description: The external bank account's identifier. Required when type
            is bank_account.
          nullable: true
      required:
      - type
    PostIdentificationNumber:
      type: object
      description: Identification number details.
      properties:
        type:
          type: string
          description: The source of the identification number.
          enum:
          - drivers_license
          - passport
          - passport_card
          - visa
          - residence_card
          - social_security_number
          - tax_identification_number
          - identification_card
          - work_permit
          - indigenous_document_number
          - national_identification_number
          - employer_identification_number
          - business_registration_number
        issuing_country_code:
          type: string
          description: The ISO 3166 country 2-Alpha country code of the identification
            number issuer.
        identification_number:
          type: string
          description: The identification number.
      required:
      - type
      - issuing_country_code
      - identification_number
    PostUltimateBeneficialOwner:
      type: object
      description: Identification number details.
      properties:
        customer_guid:
          type: string
          description: The customer identifier.
          minLength: 32
          maxLength: 32
        ownership_percentage:
          type: number
          description: The ownership percentage.
      required:
      - customer_guid
      - ownership_percentage
    PostFile:
      type: object
      description: Request body for a new file.
      properties:
        type:
          type: string
          description: The type of file.
          enum:
          - drivers_license_front
          - drivers_license_back
          - drivers_license
          - passport
          - passport_card
          - visa
          - identification_card
          - residence_card
          - work_permit
          - indigenous_id_document
          - selfie
          - selfie_video
          - selfie_left
          - selfie_right
          - utility_bill
          - proof_of_address
          - bank_statement
          - property_tax
          - tax_document
          - ein_letter
          - incorporation_certificate
          - persona_inquiry_report
          - persona_inquiry_export
        customer_guid:
          type: string
          description: The customer identifier.
          minLength: 32
          maxLength: 32
        filename:
          type: string
          description: The name of the file.
          minLength: 1
          maxLength: 128
        content_type:
          type: string
          description: The content type of the file.
          enum:
          - image/jpeg
          - image/png
          - application/pdf
          - application/json
          - video/mp4
        data:
          type: string
          description: Base64 encoded file content
          nullable: true
          maxLength: 10485760
        metadata:
          type: object
          description: 'File metadata (e.g., {"part": "front"})'
          properties:
            part:
              type: string
              description: The part of the file (e.g., "front", "back")
              nullable: true
              enum:
              - front
              - back
          nullable: true
      required:
      - type
      - customer_guid
      - filename
      - content_type
    PostDepositAddress:
      type: object
      description: Request body for deposit address creation.
      properties:
        account_guid:
          type: string
          description: The trading account guid.
          minLength: 32
          maxLength: 32
        labels:
          type: array
          description: The labels associated with the address.
          items:
            type: string
            minLength: 1
            maxLength: 64
          nullable: true
          maxItems: 8
      required:
      - account_guid
    PostSupportedPayoutSymbols:
      type: object
      description: Supported payout symbols details.
      properties:
        primary_asset:
          type: string
          description: The primary asset of the payout symbol, e.g., MXN.
        counter_asset:
          type: string
          description: The counter asset of the payout symbol, e.g., USD.
        country_code:
          type: string
          description: The ISO 3166 country 2-Alpha country code is permitted in,
            e.g., MX.
          minLength: 2
          maxLength: 2
        participants_type:
          type: string
          description: The participants the symbol is permitted for.
          enum:
          - C2C
          - C2B
          - B2C
          - B2B
        route:
          type: string
          description: The route the symbol is permitted for.
          enum:
          - bank_account
          - mobile_wallet
      required:
      - primary_asset
      - counter_asset
      - country_code
      - participants_type
      - route
    PostAccount:
      type: object
      description: Request body for account creation.
      properties:
        type:
          type: string
          description: The account type.
          enum:
          - trading
          - fiat
          - invoice_operations
          - storage
        customer_guid:
          type: string
          description: The customer identifier associated with the account.
          nullable: true
          minLength: 32
          maxLength: 32
        asset:
          type: string
          description: The asset code.
          minLength: 1
          maxLength: 16
        name:
          type: string
          description: The name of the account.
          minLength: 1
          maxLength: 128
        labels:
          type: array
          description: The labels associated with the account.
          items:
            type: string
            minLength: 1
            maxLength: 64
          nullable: true
          maxItems: 8
      required:
      - type
      - asset
      - name
    PostWorkflow:
      type: object
      description: Request body for workflow creation.
      properties:
        type:
          type: string
          description: The workflow type.
          enum:
          - plaid
        kind:
          type: string
          description: The Plaid workflow kind. Required when type is plaid.
          nullable: true
          enum:
          - link_token_create
          - link_token_update
        customer_guid:
          type: string
          description: The customer identifier associated with the workflow. Optional
            when type is plaid and kind is link_token_create.
          nullable: true
          maxLength: 32
        external_bank_account_guid:
          type: string
          description: The external bank account identifier associated with the workflow.
            Required when type is plaid and kind is link_token_update.
          nullable: true
          maxLength: 32
        language:
          type: string
          description: The language to initialize Plaid link. Required when type is
            plaid.
          nullable: true
          enum:
          - en
          - fr
          - es
          - nl
          - de
        link_customization_name:
          type: string
          description: The customization name for Plaid link. For English, use "default".
            For Spanish, use "spanish_customization". Required when type is plaid.
          nullable: true
          maxLength: 128
        redirect_uri:
          type: string
          description: The redirect URI for Plaid link. Optional when type is plaid.
          maxLength: 128
        android_package_name:
          type: string
          description: The Android package name for Plaid link. Optional when type
            is plaid.
          maxLength: 128
      required:
      - type
    PatchTransfer:
      type: object
      description: Request body for transfer modification.
      properties:
        source_participants:
          type: array
          description: The source participants for the transfer.
          items:
            "$ref": "#/components/schemas/PatchTransferParticipant"
          nullable: true
          minItems: 0
          maxItems: 100
        destination_participants:
          type: array
          description: The destination participants for the transfer.
          items:
            "$ref": "#/components/schemas/PatchTransferParticipant"
          nullable: true
          minItems: 0
          maxItems: 100
    PatchTransferParticipant:
      type: object
      description: Request body for a transfer participant.
      properties:
        type:
          type: string
          description: The type of participant.
          enum:
          - bank
          - customer
          - counterparty
        amount:
          type: integer
          description: The amount in base units of the asset.
        guid:
          type: string
          description: The participant's identifier.
          minLength: 32
          maxLength: 32
      required:
      - type
      - amount
      - guid
    PostTransfer:
      type: object
      description: Request body for transfer creation.
      properties:
        quote_guid:
          type: string
          description: The associated quote's identifier.
          minLength: 32
          maxLength: 32
        transfer_type:
          type: string
          description: The type of transfer.
          enum:
          - funding
          - crypto
          - instant_funding
          - inter_account
          - lightning
          - book
        external_bank_account_guid:
          type: string
          description: The customer's 'plaid', 'plaid_processor_token', or 'raw_routing_details'
            external bank account's identifier. Required for ACH, EFT, WIRE, and RTP
            payment rails. Not used for e-transfer rail. Required when transfer_type
            is instant_funding. Optional when transfer_type is funding.
          nullable: true
          maxLength: 32
        fiat_account_guid:
          type: string
          description: The identifier for the fiat account to use for the transfer.
            Required if the customer or bank has multiple fiat accounts. Optional
            when transfer_type is funding.
          nullable: true
          maxLength: 32
        send_as_deposit_bank_account_guid:
          type: string
          description: The deposit bank account's identifier. Only valid for withdrawals.
            The deposit bank account must be owned by the customer or bank initiating
            the transfer. Optional when transfer_type is funding.
          nullable: true
          maxLength: 32
        payment_rail:
          type: string
          description: The desired payment rail to initiate the transfer for. Optional
            when transfer_type is funding.
          nullable: true
          enum:
          - ach
          - eft
          - wire
          - rtp
          - etransfer
        beneficiary_memo:
          type: string
          description: The memo to send to the counterparty. Optional when transfer_type
            is funding.
          nullable: true
        source_participants:
          type: array
          description: The source participants for the transfer. Required when transfer_type
            is funding, transfer_type is instant_funding, transfer_type is book, transfer_type
            is crypto, or transfer_type is lightning.
          items:
            "$ref": "#/components/schemas/PostTransferParticipant"
          nullable: true
          minItems: 0
          maxItems: 100
        destination_participants:
          type: array
          description: The destination participants for the transfer. Required when
            transfer_type is funding, transfer_type is instant_funding, transfer_type
            is book, transfer_type is crypto, or transfer_type is lightning.
          items:
            "$ref": "#/components/schemas/PostTransferParticipant"
          nullable: true
          minItems: 0
          maxItems: 100
        bank_fiat_account_guid:
          type: string
          description: The identifier for the fiat account to use for the transfer.
            Required if the bank has multiple fiat accounts. Optional when transfer_type
            is instant_funding or transfer_type is lightning.
          nullable: true
          maxLength: 32
        customer_fiat_account_guid:
          type: string
          description: The identifier for the fiat account to use for the transfer.
            Required if the customer has multiple fiat accounts. Optional when transfer_type
            is instant_funding or transfer_type is lightning.
          nullable: true
          maxLength: 32
        source_account_guid:
          type: string
          description: The source account's identifier. Required when transfer_type
            is book or transfer_type is inter_account.
          nullable: true
          maxLength: 32
        destination_account_guid:
          type: string
          description: The destination account's identifier. Required when transfer_type
            is book or transfer_type is inter_account.
          nullable: true
          maxLength: 32
        external_wallet_guid:
          type: string
          description: The customer's external wallet's identifier. Optional when
            transfer_type is crypto.
          nullable: true
          maxLength: 32
        customer_guid:
          type: string
          description: The customer's identifier. Required when transfer_type is lightning.
          nullable: true
          maxLength: 32
        network_fee_account_guid:
          type: string
          description: The network fee account's identifier. Required for network
            fee transfers. Must be the identifier for the customer's or bank's fiat
            or trading account. For customer's to pay the network fees, include the
            customer's fiat or trading account guid. For bank's to pay the network
            fees, include the bank's fiat or trading account guid. Required when transfer_type
            is lightning.
          nullable: true
          maxLength: 32
        expected_behaviours:
          type: array
          description: The optional expected behaviour to simulate. Only applicable
            for transfers under sandbox banks. The force_review behaviour will force
            the transfer to be reviewed for funding and instant_funding transfers.
          items:
            type: string
            enum:
            - force_review
          nullable: true
          maxItems: 50
        labels:
          type: array
          description: The labels associated with the transfer.
          items:
            type: string
            minLength: 1
            maxLength: 64
          nullable: true
          maxItems: 8
      required:
      - quote_guid
      - transfer_type
    PostTransferParticipant:
      type: object
      description: Request body for a transfer participant.
      properties:
        type:
          type: string
          description: The type of participant.
          enum:
          - bank
          - customer
          - counterparty
        amount:
          type: integer
          description: The amount in base units of the asset.
        guid:
          type: string
          description: The participant's identifier.
          minLength: 32
          maxLength: 32
      required:
      - type
      - amount
      - guid
    PostTrade:
      type: object
      description: Request body for trade creation.
      properties:
        trade_type:
          type: string
          description: The type of trade.
          nullable: true
          default: platform
          enum:
          - platform
        quote_guid:
          type: string
          description: The associated quote's identifier.
          minLength: 32
          maxLength: 32
        fiat_account_guid:
          type: string
          description: The identifier for the fiat account to use for the trade. Required
            if the customer or bank has multiple fiat accounts.
          nullable: true
          minLength: 32
          maxLength: 32
        expected_error:
          type: string
          description: The optional expected error to simulate trade failure.
          nullable: true
          enum:
          - expired_quote
          - non_sufficient_funds
        labels:
          type: array
          description: The labels associated with the trade.
          items:
            type: string
            minLength: 1
            maxLength: 64
          nullable: true
          maxItems: 8
      required:
      - quote_guid
    PatchExternalBankAccount:
      type: object
      description: Request body for external bank account modification.
      properties:
        state:
          type: string
          description: The state of the external bank account. If set to "completed,"
            the returned state of the external bank account will be either "completed",
            if the bank account has been verified, or "unverified" if the bank account
            has not been verified.
          enum:
          - completed
          - refresh_required
      required:
      - state
    PostExternalBankAccount:
      type: object
      description: Request body for external bank account creation.
      properties:
        name:
          type: string
          description: The name of the account.
          minLength: 1
          maxLength: 128
        account_kind:
          type: string
          description: The account type
          enum:
          - plaid
          - plaid_processor_token
          - raw_routing_details
        customer_guid:
          type: string
          description: The customer identifier.
          nullable: true
          minLength: 32
          maxLength: 32
        asset:
          type: string
          description: The asset code. If not set will try and default to the Bank's
            configured fiat asset.
          nullable: true
        plaid_public_token:
          type: string
          description: The public token for the account. Required for 'plaid' accounts.
            Required when account_kind is plaid.
          nullable: true
          minLength: 1
          maxLength: 128
        plaid_account_id:
          type: string
          description: The account identifier in plaid. Required for 'plaid' accounts.
            Required when account_kind is plaid.
          nullable: true
          minLength: 1
          maxLength: 128
        plaid_processor_token:
          type: string
          description: The Plaid processor token used to access the account. Required
            when account_kind is plaid_processor_token.
          nullable: true
          minLength: 1
          maxLength: 128
        plaid_institution_id:
          type: string
          description: Plaid's institution ID for the account's institution. Required
            when account_kind is plaid_processor_token.
          nullable: true
          minLength: 1
          maxLength: 128
        plaid_account_mask:
          type: string
          description: The account mask for the account. Required when account_kind
            is plaid_processor_token.
          nullable: true
          minLength: 1
          maxLength: 128
        plaid_account_name:
          type: string
          description: The name of the account. Required when account_kind is plaid_processor_token.
          nullable: true
          minLength: 1
          maxLength: 128
        counterparty_guid:
          type: string
          description: The counterparty identifier. Optional when account_kind is
            raw_routing_details.
          nullable: true
          minLength: 32
          maxLength: 32
        counterparty_bank_account:
          type: object
          description: The counterparty's checking bank account information. Required
            when account_kind is raw_routing_details.
          properties:
            routing_number_type:
              type: string
              description: The type of routing number. Required when account_kind
                is raw_routing_details.
              nullable: true
              enum:
              - CPA
              - ABA
              - IFSC
            routing_number:
              type: string
              description: The routing number. Required when account_kind is raw_routing_details.
              nullable: true
            account_number:
              type: string
              description: The account number. Required when account_kind is raw_routing_details.
              nullable: true
          nullable: true
        counterparty_name:
          type: object
          description: The counterparty's name on their checking account. Required
            when account_kind is raw_routing_details and counterparty_guid is not
            present.
          properties:
            first:
              type: string
              description: The counterparty's first name; used for individuals. Optional
                when account_kind is raw_routing_details and counterparty_guid is
                not present.
              nullable: true
            middle:
              type: string
              description: The counterparty's middle name; used for individuals. Optional
                when account_kind is raw_routing_details and counterparty_guid is
                not present.
              nullable: true
            last:
              type: string
              description: The counterparty's last name; used for individuals. Optional
                when account_kind is raw_routing_details and counterparty_guid is
                not present.
              nullable: true
            full:
              type: string
              description: The counterparty's full name; used for businesses. Optional
                when account_kind is raw_routing_details and counterparty_guid is
                not present.
              nullable: true
          nullable: true
        counterparty_address:
          type: object
          description: The counterparty's address on their checking account. Required
            when account_kind is raw_routing_details and counterparty_guid is not
            present.
          properties:
            street:
              type: string
              description: The first line of the address. Required when account_kind
                is raw_routing_details and counterparty_guid is not present.
              nullable: true
            street2:
              type: string
              description: The optional second line of the address. Optional when
                account_kind is raw_routing_details and counterparty_guid is not present.
              nullable: true
            city:
              type: string
              description: The city of the address. Required when account_kind is
                raw_routing_details and counterparty_guid is not present.
              nullable: true
            subdivision:
              type: string
              description: The ISO 3166-2 subdivision code of the address. Applicable
                only for countries that use subnational states, provinces, lands,
                oblasts or regions. Optional when account_kind is raw_routing_details
                and counterparty_guid is not present.
              nullable: true
              minLength: 1
              maxLength: 3
            postal_code:
              type: string
              description: The postal, zip or post code of the address. Applicable
                only for countries that use postal, zip or post codes. Optional when
                account_kind is raw_routing_details and counterparty_guid is not present.
              nullable: true
            country_code:
              type: string
              description: The ISO 3166 country 2-Alpha country code of the address.
                Required when account_kind is raw_routing_details and counterparty_guid
                is not present.
              nullable: true
              minLength: 2
              maxLength: 2
          nullable: true
        counterparty_email_address:
          type: string
          description: The counterparty's email address on their checking account.
            Optional when account_kind is raw_routing_details and counterparty_guid
            is not present.
          nullable: true
      required:
      - name
      - account_kind
    PostBankAccountDetails:
      type: object
      description: Bank account details.
      properties:
        bank_code:
          type: string
          description: The bank code.
          nullable: true
        account_identifier:
          type: string
          description: The account number or unique identifier for the account.
        account_identifier_type:
          type: string
          description: The type of account identifier. Must be PHONE_NUMBER for mobile
            wallet rails. Required when payment_rail is EASY_PAISA, payment_rail is
            FINJA, payment_rail is JAZZ_CASH, payment_rail is NAYA_PAY, or payment_rail
            is SADA_PAY.
          nullable: true
          enum:
          - CLABE
          - PHONE_NUMBER
          - EMAIL
          - DEBIT_CARD
          - CBU
          - CVU
          - RANDOM
          - CPF
          - CNPJ
        payment_rail:
          type: string
          description: The payment rail used for the account.
          enum:
          - EFT
          - ACH
          - RTP
          - WIRE
          - SPEI
          - PIX
          - COELSA
          - PSE
          - ETRANSFER
          - IFSC
          - SBP
          - BEFTN
          - NGBANK
          - LBTR
          - EASY_PAISA
          - FINJA
          - JAZZ_CASH
          - NAYA_PAY
          - SADA_PAY
          - UNSPECIFIED
        bank_code_type:
          type: string
          description: The type of bank code. Required when payment_rail is EFT, payment_rail
            is ACH, payment_rail is RTP, payment_rail is WIRE, payment_rail is SPEI,
            payment_rail is PIX, payment_rail is COELSA, payment_rail is PSE, payment_rail
            is ETRANSFER, payment_rail is IFSC, payment_rail is SBP, payment_rail
            is BEFTN, payment_rail is NGBANK, payment_rail is LBTR, or payment_rail
            is UNSPECIFIED.
          nullable: true
          enum:
          - CPA
          - ABA
          - CLABE
          - PIX
          - CBU_CVU
          - PSE
          - IFSC
          - IBAN
          - SBP
          - BEFTN
          - SWIFT_BIC
          - CBN
        account_type:
          type: string
          description: The type of account. Required when payment_rail is PSE or payment_rail
            is LBTR.
          nullable: true
          enum:
          - checking
          - savings
      required:
      - account_identifier
      - payment_rail
    PostExternalWallet:
      type: object
      description: Request body for external wallet creation.
      properties:
        name:
          type: string
          description: Name of the external wallet.
          minLength: 1
          maxLength: 128
        customer_guid:
          type: string
          description: The customer identifier.
          nullable: true
          minLength: 32
          maxLength: 32
        counterparty_guid:
          type: string
          description: The counterparty identifier.
          nullable: true
          minLength: 32
          maxLength: 32
        asset:
          type: string
          description: The asset code.
          minLength: 1
          maxLength: 16
        address:
          type: string
          description: The blockchain wallet address for the wallet.
          maxLength: 1024
        tag:
          type: string
          description: The blockchain tag to use when transferring crypto to the wallet.
          nullable: true
          maxLength: 512
        expected_behaviours:
          type: array
          description: The optional expected behaviour to simulate. Only applicable
            wallets under sandbox banks.
          items:
            type: string
            enum:
            - force_review
          nullable: true
          maxItems: 50
      required:
      - name
      - asset
      - address
    PlatformFile:
      type: object
      properties:
        guid:
          type: string
          description: The unique identifier for the file.
          minLength: 32
          maxLength: 32
        organization_guid:
          type: string
          description: The organization identifier.
          minLength: 32
          maxLength: 32
        bank_guid:
          type: string
          description: The bank identifier.
          minLength: 32
          maxLength: 32
          nullable: true
        customer_guid:
          type: string
          description: The customer identifier.
          minLength: 32
          maxLength: 32
          nullable: true
        type:
          type: string
          description: The file type; one of drivers_license_front, drivers_license_back,
            drivers_license, passport, passport_card, visa, identification_card, residence_card,
            work_permit, indigenous_id_document, selfie, selfie_video, selfie_left,
            selfie_right, utility_bill, proof_of_address, bank_statement, property_tax,
            tax_document, ein_letter, incorporation_certificate, persona_inquiry_report,
            or persona_inquiry_export.
        content_type:
          type: string
          description: The media type; one of image/jpeg, image/png, application/pdf,
            application/json, or video/mp4.
        filename:
          type: string
          description: The name of the file.
        completed_at:
          type: string
          description: The ISO8601 datetime the file was completed at.
          format: date-time
        failed_at:
          type: string
          description: The ISO8601 datetime the file failed at.
          format: date-time
        state:
          type: string
          description: The state of the file. One of storing, completed, or failed.
          enum:
          - storing
          - completed
          - failed
        failure_code:
          type: string
          description: The failure code for failed files.
          nullable: true
        upload_url:
          type: string
          description: The URL to upload the file to.
          format: uri
          nullable: true
        upload_expires_at:
          type: string
          description: The ISO8601 datetime the upload URL expires at.
          format: date-time
          nullable: true
        download_url:
          type: string
          description: The URL to download the file from.
          format: uri
          nullable: true
        download_expires_at:
          type: string
          description: The ISO8601 datetime the download URL expires at.
          format: date-time
          nullable: true
    PlatformFileList:
      type: object
      properties:
        total:
          description: The total number of records available.
          type: integer
          minimum: 0
        page:
          description: The page index to retrieve.
          type: integer
          minimum: 0
        per_page:
          description: The number of entities per page to return.
          type: integer
          minimum: 1
        objects:
          type: array
          items:
            "$ref": "#/components/schemas/PlatformFile"
      required:
      - total
      - page
      - per_page
      - objects
    ErrorResponse:
      type: object
      properties:
        status:
          description: Status code for Http Request
          type: integer
        error_message:
          description: Error message
          type: string
        message_code:
          description: Message code for Error
          type: string
      required:
      - status
      - error_message
      - message_code
servers:
- url: https://bank.sandbox.cybrid.app
  description: Sandbox environment is simulated money movement
- url: https://bank.production.cybrid.app
  description: Production environment is real money movement
