openapi: 3.1.0
info:
  title: Bastion APIs
  description: API documentation for Bastion APIs
  version: '2.0'
servers:
- url: https://api.prod.bastion.com
  description: Production environment
- url: https://api.sandbox.bastion.io
  description: Sandbox environment
paths:
  /v2/accounts:
    get:
      tags:
      - Accounts
      summary: List Accounts
      description: List Accounts belonging to your organization
      operationId: bastion.api.v2.API.ListAccounts
      parameters:
      - name: limit
        in: query
        description: The maximum number of accounts to return in a single page.
        required: false
        schema:
          type: integer
          title: limit
          maximum: 100
          minimum: 1
          format: int64
          default: '50'
      - name: cursor
        in: query
        description: Pagination cursor to be used in subsequent queries to retrieve next page of results.
        required: false
        schema:
          type: string
          title: cursor
      - name: identity_ids
        in: query
        description: "Optional identity IDs to filter accounts by.\n If provided, only accounts belonging to these identities will be returned. Maximum 25 identity IDs can be provided."
        required: false
        schema:
          type: array
          items:
            type: string
          title: identity_ids
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.ListAccountsResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '404':
          description: Resource not found
        '500':
          description: Internal Server Error
    post:
      tags:
      - Accounts
      summary: Create Account
      description: "Create an account for your organization.\n Note that accounts can only be created if the associated identity has been cleared to transact (i.e. has passed both compliance and jurisdiction checks)."
      operationId: bastion.api.v2.API.CreateAccount
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bastion.api.v2.CreateAccountRequest'
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.Account'
        '400':
          description: Bad request
        '409':
          description: Resource Conflicts
        '422':
          description: Unprocessable Entity - identity state does not permit this operation
        '500':
          description: Internal Server Error
  /v2/accounts/{account_id}/balances:
    get:
      tags:
      - Accounts
      summary: Get Account Balances
      description: Get base and token asset balances for a given account
      operationId: bastion.api.v2.API.GetAccountAssetBalances
      parameters:
      - name: account_id
        in: path
        description: Unique identifier of an account.
        required: true
        schema:
          type: string
          title: account_id
      - name: chain
        in: query
        description: "Optional chain to query balances for.\n If not provided, balances for all supported chains will be returned."
        required: false
        schema:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          title: chain
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.GetAccountAssetBalancesResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '403':
          description: Request Forbidden
        '404':
          description: Resource not found
        '500':
          description: Internal Server Error
  /v2/accounts/{id}:
    get:
      tags:
      - Accounts
      summary: Get Account
      description: Get an account belonging to your organization
      operationId: bastion.api.v2.API.GetAccount
      parameters:
      - name: id
        in: path
        description: Unique identifier of an account.
        required: true
        schema:
          type: string
          title: id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.Account'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '404':
          description: Resource not found
        '500':
          description: Internal Server Error
  /v2/assets:
    get:
      tags:
      - Assets
      summary: List Supported Assets
      description: "Get all the supported assets.\n If chain is specified, assets supported only on that chain will be returned."
      operationId: bastion.api.v2.API.GetAssets
      parameters:
      - name: chain
        in: query
        description: Chain on which to list the supported assets
        required: false
        schema:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          title: chain
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.GetAssetsResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '403':
          description: Request Forbidden
        '404':
          description: Resource not found
        '500':
          description: Internal Server Error
  /v2/conversions:
    post:
      tags:
      - Conversions
      summary: Submit Conversion
      description: Submit a conversion on behalf of an account
      operationId: bastion.api.v2.API.SubmitConversion
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionRequest'
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.conversions.Conversion'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '403':
          description: Request Forbidden
        '404':
          description: Resource not found
        '500':
          description: Internal Server Error
  /v2/conversions/quotes:
    get:
      tags:
      - Conversions
      summary: Get Quote
      description: Get an indicative quote for an off-ramp conversion. Quotes are not rate-locked.
      operationId: bastion.api.v2.API.GetQuote
      parameters:
      - name: source_currency
        in: query
        description: Source asset currency. Must be USDC or USDT.
        required: true
        schema:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionCurrency'
          title: source_currency
      - name: source_chain
        in: query
        description: Source blockchain network. e.g., SOLANA_MAINNET, ETHEREUM_MAINNET, BASE_MAINNET.
        required: true
        schema:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          title: source_chain
      - name: destination_currency
        in: query
        description: Destination fiat currency. e.g., MXN, INR.
        required: true
        schema:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionCurrency'
          title: destination_currency
      - name: destination_country
        in: query
        description: "Destination country (ISO 3166-1 alpha-2). Must form a supported corridor\n with destination_currency and payment_method."
        required: true
        schema:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Country'
          title: destination_country
      - name: payment_method
        in: query
        description: Payment rail. Must match an enabled corridor for the destination country.
        required: true
        schema:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.PaymentMethod'
          title: payment_method
      - name: source_amount
        in: query
        description: Amount of source currency (USDC or USDT) to convert.
        schema:
          type: string
          title: source_amount
      - name: destination_amount
        in: query
        description: Amount of destination fiat the recipient should receive.
        schema:
          type: string
          title: destination_amount
      - name: source_total_max
        in: query
        description: "Max all-in source debit (wallet budget). Bastion returns the largest\n source.amount whose source.total fits the budget. ON_TOP only."
        schema:
          type: string
          title: source_total_max
      - name: developer_fee_percent
        in: query
        description: "Developer fee percent override in [0, 100] with at most 6 fractional digits.\n The value is a decimal string. Omit to use the configured developer fee\n policy for the app."
        required: false
        schema:
          type: string
          title: developer_fee_percent
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.conversions.Quote'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '500':
          description: Internal server error
        '502':
          description: Upstream provider error
  /v2/conversions/{id}:
    get:
      tags:
      - Conversions
      summary: Get Conversion
      description: Get a previously submitted conversion using its ID
      operationId: bastion.api.v2.API.GetConversion
      parameters:
      - name: id
        in: path
        description: Conversion identifier.
        required: true
        schema:
          type: string
          title: id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.conversions.Conversion'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '403':
          description: Request Forbidden
        '404':
          description: Resource not found
        '500':
          description: Internal Server Error
  /v2/crypto/deposits:
    get:
      tags:
      - Cryptocurrency Deposits
      summary: List Cryptocurrency Deposits
      description: Get cryptocurrency deposits for an account, sorted by recency in descending order.
      operationId: bastion.api.v2.API.ListDeposits
      parameters:
      - name: account_id
        in: query
        description: Unique identifier of the account to filter deposits by
        required: true
        schema:
          type: string
          title: account_id
      - name: destination_chain
        in: query
        description: 'Deprecated: use "chain" instead'
        required: false
        deprecated: true
        schema:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          title: destination_chain
          deprecated: true
      - name: currency_symbol
        in: query
        description: Optional currency symbol filter
        required: false
        schema:
          type: string
          title: currency_symbol
      - name: start_time
        in: query
        description: Optional start time filter (ISO 8601)
        required: false
        schema:
          type: string
          examples:
          - '2023-01-15T01:30:15.01Z'
          - '2024-12-25T12:00:00Z'
          format: date-time
      - name: end_time
        in: query
        description: Optional end time filter (ISO 8601)
        required: false
        schema:
          type: string
          examples:
          - '2023-01-15T01:30:15.01Z'
          - '2024-12-25T12:00:00Z'
          format: date-time
      - name: limit
        in: query
        description: The maximum number of deposits to return. The maximum value that can be specified is 25.
        required: false
        schema:
          type: integer
          title: limit
          maximum: 25
          minimum: 1
          format: int32
          default: '10'
      - name: cursor
        in: query
        description: Pagination cursor to be used in subsequent queries to retrieve the next page of results
        required: false
        schema:
          type: string
          title: cursor
      - name: transaction_hash
        in: query
        description: Optional filter on the transaction hash (EVM) or signature (Solana) that funded the deposit
        required: false
        schema:
          type: string
          title: transaction_hash
      - name: chain
        in: query
        description: Optional filter on the chain the deposit was received on
        required: false
        schema:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          title: chain
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.deposits.ListDepositsResponse'
        '400':
          description: Bad request
        '500':
          description: Internal Server Error
  /v2/crypto/deposits/{deposit_id}:
    get:
      tags:
      - Cryptocurrency Deposits
      summary: Get Cryptocurrency Deposit
      description: Get a specific cryptocurrency deposit by its ID.
      operationId: bastion.api.v2.API.GetDeposit
      parameters:
      - name: deposit_id
        in: path
        description: Unique identifier of the cryptocurrency deposit
        required: true
        schema:
          type: string
          title: deposit_id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.deposits.GetDepositResponse'
        '400':
          description: Bad request
        '404':
          description: Resource not found
        '500':
          description: Internal Server Error
  /v2/crypto/raw-transactions:
    post:
      tags:
      - Raw Transactions
      summary: Submit Raw Transaction
      description: Sandbox only, on testnets; not available in production. Sign a customer-built EVM transaction with an account's wallet. In SIGN_ONLY mode, Bastion returns the signed transaction for you to broadcast, and assigns the nonce and estimates the gas limit and fees you leave out. In SIGN_AND_SUBMIT mode, Bastion picks the nonce, gas limit, and fees, broadcasts the transaction, and tracks it; poll Get Raw Transaction until its status is CONFIRMED, FAILED, or CANCELED.
      operationId: bastion.api.v2.API.SubmitRawTransaction
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.SubmitRawTransactionRequest'
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.RawTransaction'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '403':
          description: Request Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict - request_id already used for a different raw transaction
        '422':
          description: Unprocessable Entity - identity or account state does not permit this operation
        '500':
          description: Internal Server Error
      servers:
      - url: https://api.sandbox.bastion.io
        description: Sandbox environment
      x-mint:
        metadata:
          tag: preview
  /v2/crypto/raw-transactions/{raw_transaction_id}:
    get:
      tags:
      - Raw Transactions
      summary: Get Raw Transaction
      description: Sandbox only, on testnets; not available in production. Get a raw transaction and its current status.
      operationId: bastion.api.v2.API.GetRawTransaction
      parameters:
      - name: raw_transaction_id
        in: path
        description: Unique identifier of the raw transaction
        required: true
        schema:
          type: string
          title: raw_transaction_id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.RawTransaction'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '403':
          description: Request Forbidden
        '404':
          description: Not found
        '500':
          description: Internal Server Error
      servers:
      - url: https://api.sandbox.bastion.io
        description: Sandbox environment
      x-mint:
        metadata:
          tag: preview
  /v2/crypto/transfers:
    get:
      tags:
      - Cryptocurrency Transfers
      summary: List Cryptocurrency Transfers
      description: Get previously submitted cryptocurrency transfers, sorted by recency in descending order.
      operationId: bastion.api.v2.API.ListCryptocurrencyTransfers
      parameters:
      - name: limit
        in: query
        description: The maximum number of cryptocurrency transfers to return in a single page. The maximum value that can be specified is 25.
        required: false
        schema:
          type: integer
          title: limit
          maximum: 25
          minimum: 1
          format: int32
          default: '10'
      - name: cursor
        in: query
        description: Pagination cursor to be used in subsequent queries to retrieve next page of results
        required: false
        schema:
          type: string
          title: cursor
      - name: account_id
        in: query
        description: Unique identifier of the account to filter transfers by
        required: true
        schema:
          type: string
          title: account_id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.ListTransfersV2Response'
        '400':
          description: Bad request
        '500':
          description: Internal Server Error
    post:
      tags:
      - Cryptocurrency Transfers
      summary: Submit Cryptocurrency Transfer
      description: "Submit a cryptocurrency transfer on behalf of an account.\n Refer to the [supported assets](/v2/api-reference/assets/list-supported-assets) endpoint for a list of supported assets"
      operationId: bastion.api.v2.API.SubmitCryptocurrencyTransfer
      parameters:
      - name: preflight_checks
        in: query
        description: "Checks to run synchronously before the transfer is accepted, trading a\n little request latency for an immediate error instead of an asynchronous\n failure. Sent as a repeated query parameter; omitting it preserves\n existing behavior. A value outside the list below refuses the request."
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.PreflightCheck'
          title: preflight_checks
      requestBody:
        description: "The transfer to submit. Sent as the request body.\n Kept as its own message so persisted approval payloads keep decoding."
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.SubmitCryptocurrencyTransferV2Request'
              description: "The transfer to submit. Sent as the request body.\n Kept as its own message so persisted approval payloads keep decoding."
      responses:
        '202':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.SubmitCryptocurrencyTransferV2Response'
        '400':
          description: Bad request
        '422':
          description: Unprocessable Entity - identity or account state does not permit this operation
        '500':
          description: Internal Server Error
  /v2/crypto/transfers/{transfer_id}:
    get:
      tags:
      - Cryptocurrency Transfers
      summary: Get Cryptocurrency Transfer
      description: "Get a cryptocurrency transfer using its ID.\n\n <Info>\n **Eventual Consistency**\n\n Cryptocurrency transfers involve multiple processing stages - asset pricing checks, compliance verification, and blockchain confirmation - which can take significant time to complete. For this reason, the [submit endpoint](/v2/api-reference/cryptocurrency-transfers/submit-cryptocurrency-transfer) is designed to be asynchronous, returning immediately after accepting your request. Due to this design, there is a brief window (typically milliseconds) where a newly submitted transfer may not yet be queryable. If you call this endpoint immediately after submission and receive a `404 Not Found` response, simply retry after a short delay. Once available, you can use this endpoint to track the transfer through all its processing stages until completion.\n </Info>"
      operationId: bastion.api.v2.API.GetCryptocurrencyTransfer
      parameters:
      - name: transfer_id
        in: path
        description: Unique identifier of the cryptocurrency transfer
        required: true
        schema:
          type: string
          title: transfer_id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.Transfer'
        '400':
          description: Bad request
        '404':
          description: Transfer not found. If recently submitted, the transfer may not yet be available due to eventual consistency. Retry after a brief delay.
        '500':
          description: Internal Server Error
  /v2/identities:
    get:
      tags:
      - Identities
      summary: List Identities
      description: List Identities belonging to your application
      operationId: bastion.api.v2.API.ListIdentities
      parameters:
      - name: limit
        in: query
        description: The maximum number of identities to return in a single page
        required: false
        schema:
          type: string
          title: limit
          maximum: 100
          minimum: 1
          format: int64
          default: '50'
      - name: cursor
        in: query
        description: Pagination cursor to be used in subsequent queries to retrieve next page of results
        required: false
        schema:
          type: string
          title: cursor
      - name: identity_type
        in: query
        description: Filter identities by type
        required: false
        schema:
          allOf:
          - $ref: '#/components/schemas/bastion.common.IdentityType'
          title: identity_type
      - name: label
        in: query
        description: Filter identities by label
        required: false
        schema:
          type: string
          title: label
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.ListIdentitiesResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '404':
          description: Resource not found
        '500':
          description: Internal Server Error
    post:
      tags:
      - Identities
      summary: Create Identity
      description: Create an identity for your organization
      operationId: bastion.api.v2.API.CreateIdentity
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bastion.api.v2.CreateIdentityRequest'
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.Identity'
        '400':
          description: Bad request
        '409':
          description: Resource Conflicts
        '500':
          description: Internal Server Error
  /v2/identities/{identity_id}/compliance:
    post:
      tags:
      - Compliance
      summary: Submit Compliance Data
      description: "Submit compliance data for an identity in your organization.\n Either KYB or KYC must be included in the request body.\n\n | IdentityType  | Required Compliance Data|\n | -------------|-----------------------  |\n | `INDIVIDUAL` | kyc                     |\n | `BUSINESS`   | kyb                     |\n\n Please note that only US-based businesses are supported at this time. An international KYB submission will be rejected."
      operationId: bastion.api.v2.API.SubmitComplianceData
      parameters:
      - name: identity_id
        in: path
        description: Unique identifier of the identity to which the compliance data should be applied
        required: true
        schema:
          type: string
          title: identity_id
      requestBody:
        content:
          application/json:
            schema:
              type: object
              anyOf:
              - type: object
                properties:
                  kyb:
                    allOf:
                    - $ref: '#/components/schemas/bastion.api.v2.KYB'
                    title: kyb
                title: kyb
              - type: object
                properties:
                  kyc:
                    allOf:
                    - $ref: '#/components/schemas/bastion.api.v2.KYC'
                    title: kyc
                title: kyc
              unevaluatedProperties: false
              not:
                allOf:
                - anyOf:
                  - required:
                    - kyb
                  - required:
                    - kyc
                - not:
                    oneOf:
                    - required:
                      - kyb
                    - required:
                      - kyc
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.SubmitComplianceDataResponse'
        '400':
          description: Bad request
        '409':
          description: Resource Conflicts
        '500':
          description: Internal Server Error
    patch:
      tags:
      - Compliance
      summary: Update Compliance Data
      description: "Update an identity's compliance data. Note that only certain KYC fields for individual\n identities are updatable at this time."
      operationId: bastion.api.v2.API.UpdateComplianceData
      parameters:
      - name: identity_id
        in: path
        description: Unique identifier of the identity whose compliance data is to be updated
        required: true
        schema:
          type: string
          title: identity_id
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                update_reason:
                  allOf:
                  - $ref: '#/components/schemas/bastion.common.UpdateReason'
                  title: update_reason
                  description: Reason for the compliance data update
                update_data:
                  allOf:
                  - $ref: '#/components/schemas/bastion.api.v2.ComplianceUpdateData'
                  description: The compliance data to update
                request_id:
                  type: string
                  title: request_id
                  pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
                  format: uuid
                  description: Client-provided request identifier in UUID format. Serves as an idempotency key.
              title: UpdateComplianceDataRequest
              required:
              - update_reason
              - request_id
              additionalProperties: false
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.UpdateComplianceDataResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '403':
          description: Forbidden
        '404':
          description: Resource not found
        '409':
          description: Conflict - duplicate request_id
        '500':
          description: Internal Server Error
  /v2/identities/{identity_id}/id_verification:
    get:
      tags:
      - Identity Verification
      summary: List Identity Verification Checks
      description: List all identity verification checks for an identity.
      operationId: bastion.api.v2.API.ListIDVChecks
      parameters:
      - name: identity_id
        in: path
        description: Unique identifier of the identity associated with the checks
        required: true
        schema:
          type: string
          title: identity_id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.ListIDVChecksResponse'
        '400':
          description: Bad request
        '500':
          description: Internal Server Error
    post:
      tags:
      - Identity Verification
      summary: Create Identity Verification Check
      description: Create an identity verification check for an individual identity.
      operationId: bastion.api.v2.API.CreateIDVCheck
      parameters:
      - name: identity_id
        in: path
        description: Unique identifier of the identity to verify
        required: true
        schema:
          type: string
          title: identity_id
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                redirect_url:
                  type:
                  - string
                  - 'null'
                  title: redirect_url
                  description: URL to redirect the user to after completing identity verification
                reason:
                  allOf:
                  - $ref: '#/components/schemas/bastion.common.IDVCheckReason'
                  title: reason
                  description: Reason for the identity verification check
                request_id:
                  type: string
                  title: request_id
                  pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
                  format: uuid
                  description: Request identifier in UUID format. Serves as an idempotency key.
                labels:
                  type: array
                  items:
                    type: string
                  title: labels
                  description: Labels to associate with this identity verification check
              title: CreateIDVCheckRequest
              required:
              - request_id
              additionalProperties: false
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.CreateIDVCheckResponse'
        '400':
          description: Bad request
        '500':
          description: Internal Server Error
  /v2/identities/{identity_id}/id_verification/{id}:
    get:
      tags:
      - Identity Verification
      summary: Get Identity Verification Check
      description: Get an existing identity verification check by ID.
      operationId: bastion.api.v2.API.GetIDVCheck
      parameters:
      - name: identity_id
        in: path
        description: Unique identifier of the identity associated with the check
        required: true
        schema:
          type: string
          title: identity_id
      - name: id
        in: path
        description: Unique identifier of the identity verification check
        required: true
        schema:
          type: string
          title: id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.GetIDVCheckResponse'
        '400':
          description: Bad request
        '500':
          description: Internal Server Error
  /v2/identities/{identity_id}/id_verification/{id}/refresh_url:
    post:
      tags:
      - Identity Verification
      summary: Refresh Identity Verification Check URL
      description: Refresh the verification URL for an existing identity verification check.
      operationId: bastion.api.v2.API.RefreshIDVCheckURL
      parameters:
      - name: identity_id
        in: path
        description: Unique identifier of the identity associated with the check
        required: true
        schema:
          type: string
          title: identity_id
      - name: id
        in: path
        description: Unique identifier of the identity verification check to refresh
        required: true
        schema:
          type: string
          title: id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.RefreshIDVCheckURLResponse'
        '400':
          description: Bad request
        '500':
          description: Internal Server Error
  /v2/identities/{identity_id}/payment-instructions:
    get:
      tags:
      - Payment Instructions
      summary: List Payment Instructions
      description: List payment instructions saved for a given identity
      operationId: bastion.api.v2.API.ListPaymentInstructions
      parameters:
      - name: identity_id
        in: path
        description: Identity ID to list payment instructions for
        required: true
        schema:
          type: string
          title: identity_id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.payment_instructions.ListPaymentInstructionsResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '403':
          description: Request Forbidden
        '404':
          description: Resource not found
        '500':
          description: Internal Server Error
    post:
      tags:
      - Payment Instructions
      summary: Create Payment Instructions
      description: Create a payment instruction for a given identity
      operationId: bastion.api.v2.API.CreatePaymentInstructions
      parameters:
      - name: identity_id
        in: path
        description: Identity id to create payment instructions for
        required: true
        schema:
          type: string
          title: identity_id
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                country:
                  allOf:
                  - $ref: '#/components/schemas/bastion.common.Country'
                  title: country
                  description: Country of the bank account (ISO 3166-1 alpha-2).
                fiat_currency_symbol:
                  allOf:
                  - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.PaymentInstructions.FiatCurrencySymbol'
                  title: fiat_currency_symbol
                  description: Currency symbol of the fiat transaction
                account_name:
                  type: string
                  title: account_name
                  description: Friendly name for the payment instructions
                payment_method:
                  allOf:
                  - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.PaymentMethod'
                  title: payment_method
                  description: Payment method
                bank_account_details:
                  allOf:
                  - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.BankAccountDetails'
                  description: Bank account details
                beneficiary_type:
                  allOf:
                  - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.BeneficiaryType'
                  title: beneficiary_type
                  description: Whether these instructions pay the sender (FIRST_PARTY) or someone else (THIRD_PARTY).
                recipient:
                  allOf:
                  - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.Recipient'
                  description: Recipient information.
                request_id:
                  type: string
                  title: request_id
                  description: "Client-provided idempotency key (UUID). Must be unique per request and\n included on every call to prevent duplicate payment instructions from\n being created. Re-submitting the same request_id returns the original\n response without creating a duplicate."
              title: CreatePaymentInstructionsRequest
              required:
              - country
              - fiat_currency_symbol
              - account_name
              - payment_method
              - bank_account_details
              - beneficiary_type
              - recipient
              - request_id
              additionalProperties: false
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.payment_instructions.PaymentInstructions'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '403':
          description: Request Forbidden
        '404':
          description: Resource not found
        '500':
          description: Internal Server Error
  /v2/identities/{identity_id}/payment-instructions/{payment_instructions_id}:
    get:
      tags:
      - Payment Instructions
      summary: Get Payment Instructions
      description: Get payment instructions by id
      operationId: bastion.api.v2.API.GetPaymentInstructions
      parameters:
      - name: identity_id
        in: path
        description: Identity ID
        required: true
        schema:
          type: string
          title: identity_id
      - name: payment_instructions_id
        in: path
        description: Payment instructions ID
        required: true
        schema:
          type: string
          title: payment_instructions_id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.payment_instructions.PaymentInstructions'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '403':
          description: Request Forbidden
        '404':
          description: Resource not found
        '500':
          description: Internal Server Error
  /v2/identities/{identity_id}/signing-keys:
    get:
      tags:
      - Signing Keys
      summary: List Signing Keys
      description: List the registered device signing keys for a given identity
      operationId: bastion.api.v2.API.ListSigningKeys
      parameters:
      - name: identity_id
        in: path
        description: The identity_id path parameter.
        required: true
        schema:
          type: string
          title: identity_id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.ListSigningKeysResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '500':
          description: Internal Server Error
    post:
      tags:
      - Signing Keys
      summary: Register Signing Key
      description: Register a device signing key for a given identity
      operationId: bastion.api.v2.API.RegisterSigningKey
      parameters:
      - name: identity_id
        in: path
        description: Identity to register the signing key for.
        required: true
        schema:
          type: string
          title: identity_id
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                public_key:
                  allOf:
                  - $ref: '#/components/schemas/bastion.common.JwkEcPublicKey'
                  title: public_key
                  description: ECDSA public key to register, in JWK format.
                label:
                  type: string
                  title: label
                  description: Customer-provided label for the signing key.
              title: RegisterSigningKeyRequest
              additionalProperties: false
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.RegisterSigningKeyResponse'
        '400':
          description: Bad request
        '409':
          description: Resource Conflicts
        '500':
          description: Internal Server Error
  /v2/identities/{identity_id}/signing-keys/{key_id}:
    delete:
      tags:
      - Signing Keys
      summary: Delete Signing Key
      description: Delete a registered device signing key for a given identity
      operationId: bastion.api.v2.API.DeleteSigningKey
      parameters:
      - name: identity_id
        in: path
        description: The identity_id path parameter.
        required: true
        schema:
          type: string
          title: identity_id
      - name: key_id
        in: path
        description: The key_id path parameter.
        required: true
        schema:
          type: string
          title: key_id
      responses:
        '204':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.DeleteSigningKeyResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '404':
          description: Resource not found
        '500':
          description: Internal Server Error
  /v2/identities/{identity_id}/virtual-accounts:
    get:
      tags:
      - Virtual Accounts
      summary: List Virtual Accounts
      description: List virtual accounts for an identity
      operationId: bastion.api.v2.API.ListVirtualAccounts
      parameters:
      - name: identity_id
        in: path
        description: Identity whose virtual accounts to list.
        required: true
        schema:
          type: string
          title: identity_id
      - name: status
        in: query
        description: Only return virtual accounts with this status.
        required: false
        schema:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.virtual_accounts.VirtualAccountStatus'
          title: status
      - name: limit
        in: query
        description: The maximum number of virtual accounts to return in a single page.
        required: false
        schema:
          type: string
          title: limit
          maximum: 50
          minimum: 1
          format: int64
          default: '10'
      - name: cursor
        in: query
        description: Pagination cursor from a previous response, used to fetch the next page.
        required: false
        schema:
          type: string
          title: cursor
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.virtual_accounts.ListVirtualAccountsResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '403':
          description: Request Forbidden
        '500':
          description: Internal Server Error
    post:
      tags:
      - Virtual Accounts
      summary: Create Virtual Account
      description: Create a virtual account for an identity to receive fiat deposits and convert to crypto
      operationId: bastion.api.v2.API.CreateVirtualAccount
      parameters:
      - name: identity_id
        in: path
        description: Identity to create the virtual account for.
        required: true
        schema:
          type: string
          title: identity_id
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                request_id:
                  type: string
                  title: request_id
                  description: Request identifier in a UUID format. Serves as an idempotency key.
                source:
                  allOf:
                  - $ref: '#/components/schemas/bastion.api.v2.virtual_accounts.VirtualAccountSource'
                  title: source
                  description: Fiat deposit configuration.
                destination:
                  allOf:
                  - $ref: '#/components/schemas/bastion.api.v2.virtual_accounts.VirtualAccountDestination'
                  description: Asset delivery configuration.
              title: CreateVirtualAccountRequest
              required:
              - request_id
              - source
              - destination
              additionalProperties: false
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.virtual_accounts.VirtualAccount'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '403':
          description: Request Forbidden
        '409':
          description: Conflict - duplicate request_id
        '500':
          description: Internal Server Error
  /v2/identities/{id}:
    get:
      tags:
      - Identities
      summary: Get Identity
      description: Get an identity belonging to your organization
      operationId: bastion.api.v2.API.GetIdentity
      parameters:
      - name: id
        in: path
        description: Unique identifier of an identity
        required: true
        schema:
          type: string
          title: id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.Identity'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '404':
          description: Resource not found
        '500':
          description: Internal Server Error
  /v2/institutions:
    get:
      tags:
      - Institutions
      summary: Get Institutions
      description: "Returns the list of supported bank institutions for a given corridor.\n Required for corridors that use a bank selector."
      operationId: bastion.api.v2.API.ListInstitutions
      parameters:
      - name: country
        in: query
        description: ISO 3166-1 alpha-2 country code.
        required: true
        schema:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Country'
          title: country
      - name: currency
        in: query
        description: Fiat currency symbol (e.g. JPY, KRW).
        required: true
        schema:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.PaymentInstructions.FiatCurrencySymbol'
          title: currency
      - name: payment_method
        in: query
        description: Payment method for the corridor.
        required: true
        schema:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.PaymentMethod'
          title: payment_method
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.institutions.ListInstitutionsResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '500':
          description: Internal Server Error
  /v2/issuance/bank-account:
    post:
      tags:
      - Issuance
      summary: Create Bank Account
      description: Create a bank account for a given identity
      operationId: bastion.api.v2.API.CreateBankAccount
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bastion.api.v2.issuance.CreateBankAccountRequest'
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.issuance.BankAccount'
        '400':
          description: Bad request
  /v2/issuance/bank-account/{id}:
    get:
      tags:
      - Issuance
      summary: Get Bank Account
      description: Get a bank account by ID
      operationId: bastion.api.v2.API.GetBankAccount
      parameters:
      - name: id
        in: path
        description: Unique identifier for the bank account
        required: true
        schema:
          type: string
          title: id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.issuance.BankAccount'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
  /v2/issuance/bank-accounts:
    get:
      tags:
      - Issuance
      summary: List Bank Accounts
      description: List all bank accounts for a given identity
      operationId: bastion.api.v2.API.ListBankAccounts
      parameters:
      - name: identity_id
        in: query
        description: Filter bank accounts by identity ID
        required: false
        schema:
          type: string
          title: identity_id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.issuance.ListBankAccountsResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
  /v2/issuance/mint-addresses:
    get:
      tags:
      - Issuance
      summary: List Mint Destination Addresses
      description: List all mint destination addresses
      operationId: bastion.api.v2.API.ListMintDestinationAddresses
      parameters:
      - name: limit
        in: query
        description: The maximum number of mint destination addresses to return in a single page. The maximum value that can be specified is 25.
        required: false
        schema:
          type: integer
          title: limit
          maximum: 25
          minimum: 1
          format: int32
          default: '10'
      - name: cursor
        in: query
        description: Pagination cursor to be used in subsequent queries to retrieve next page of results
        required: false
        schema:
          type: string
          title: cursor
      - name: identity_id
        in: query
        description: Filter by identity ID
        required: false
        schema:
          type: string
          title: identity_id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.issuance.ListMintDestinationAddressesResponse'
        '404':
          description: Resource not found
        '400':
          description: Bad request
        '500':
          description: Internal Server Error
    post:
      tags:
      - Issuance
      summary: Create Mint Destination Address
      description: Create a mint destination address for a given identity
      operationId: bastion.api.v2.API.CreateMintDestinationAddress
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bastion.api.v2.issuance.CreateMintDestinationAddressRequest'
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.issuance.MintDestinationAddress'
        '400':
          description: Bad request
        '409':
          description: Resource Conflicts
        '500':
          description: Internal Server Error
  /v2/issuance/mint-addresses/{id}:
    get:
      tags:
      - Issuance
      summary: Get Mint Destination Address
      description: Get a mint destination address using its ID
      operationId: bastion.api.v2.API.GetMintDestinationAddress
      parameters:
      - name: id
        in: path
        description: Unique identifier for the mint destination address
        required: true
        schema:
          type: string
          title: id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.issuance.MintDestinationAddress'
        '400':
          description: Bad request
        '404':
          description: Resource not found
        '500':
          description: Internal Server Error
  /v2/issuance/mint-instructions:
    get:
      tags:
      - Issuance
      summary: List Mint Instructions
      description: List mint instructions
      operationId: bastion.api.v2.API.ListMintInstructions
      parameters:
      - name: identity_id
        in: query
        description: Identity ID to filter mint instructions by
        required: false
        schema:
          type: string
          title: identity_id
      - name: limit
        in: query
        description: The maximum number of mint instructions to return in a single page
        required: false
        schema:
          type: integer
          title: limit
          maximum: 100
          minimum: 1
          format: int32
          default: '10'
      - name: cursor
        in: query
        description: Cursor for pagination
        required: false
        schema:
          type: string
          title: cursor
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.issuance.ListMintInstructionsResponse'
        '401':
          description: Unauthorized Request
    post:
      tags:
      - Issuance
      summary: Create Mint Instructions
      description: Create a mint instruction for a given identity
      operationId: bastion.api.v2.API.CreateMintInstructions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bastion.api.v2.issuance.CreateMintInstructionsRequest'
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.issuance.CreateMintInstructionsResponse'
        '400':
          description: Bad request
        '422':
          description: Unprocessable Entity - identity or account state does not permit this operation
  /v2/issuance/mint-instructions/{id}:
    get:
      tags:
      - Issuance
      summary: Get Mint Instructions
      description: Get a mint instruction using its ID
      operationId: bastion.api.v2.API.GetMintInstructions
      parameters:
      - name: id
        in: path
        description: Unique identifier for the mint instruction
        required: true
        schema:
          type: string
          title: id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.issuance.MintInstructions'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '404':
          description: Not found
  /v2/issuance/mints:
    get:
      tags:
      - Issuance
      summary: List Mints
      description: List mints
      operationId: bastion.api.v2.API.ListMints
      parameters:
      - name: status
        in: query
        description: Filter by status
        required: false
        schema:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.Status'
          title: status
      - name: limit
        in: query
        description: The maximum number of mint requests to return in a single page. The maximum value that can be specified is 25.
        required: false
        schema:
          type: integer
          title: limit
          maximum: 25
          minimum: 1
          format: int32
          default: '10'
      - name: cursor
        in: query
        description: Pagination cursor to be used in subsequent queries to retrieve next page of results
        required: false
        schema:
          type: string
          title: cursor
      - name: identity_id
        in: query
        description: Filter by the identity id that enacted the mint
        required: false
        schema:
          type: string
          title: identity_id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.issuance.ListMintsResponse'
        '404':
          description: Resource not found
        '400':
          description: Bad request
        '500':
          description: Internal Server Error
  /v2/issuance/mints/{id}:
    get:
      tags:
      - Issuance
      summary: Get Mint Request
      description: Get a mint request using its ID
      operationId: bastion.api.v2.API.GetMint
      parameters:
      - name: id
        in: path
        description: Unique identifier for the mint request
        required: true
        schema:
          type: string
          title: id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.issuance.Mint'
        '404':
          description: Resource not found
        '400':
          description: Bad request
        '500':
          description: Internal Server Error
  /v2/issuance/redemption-instructions:
    get:
      tags:
      - Issuance
      summary: List Redemption Instructions
      description: List all redemption instructions
      operationId: bastion.api.v2.API.ListRedemptionInstructions
      parameters:
      - name: limit
        in: query
        description: The maximum number of redemption instructions to return in a single page. The maximum value that can be specified is 25.
        required: false
        schema:
          type: integer
          title: limit
          maximum: 25
          minimum: 1
          format: int32
          default: '10'
      - name: cursor
        in: query
        description: Pagination cursor to be used in subsequent queries to retrieve next page of results
        required: false
        schema:
          type: string
          title: cursor
      - name: identity_id
        in: query
        description: Identity ID to filter by
        required: false
        schema:
          type: string
          title: identity_id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.issuance.ListRedemptionInstructionsResponse'
        '404':
          description: Resource not found
        '400':
          description: Bad request
        '500':
          description: Internal Server Error
    post:
      tags:
      - Issuance
      summary: Create Redemption Instructions
      description: Create redemption instructions for a given identity
      operationId: bastion.api.v2.API.CreateRedemptionInstructions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bastion.api.v2.issuance.CreateRedemptionInstructionsRequest'
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.issuance.RedemptionInstructions'
        '409':
          description: Resource Conflicts
        '400':
          description: Bad request
        '422':
          description: Unprocessable Entity - identity or account state does not permit this operation
        '500':
          description: Internal Server Error
  /v2/issuance/redemption-instructions/{id}:
    get:
      tags:
      - Issuance
      summary: Get Redemption Address
      description: Get a redemption address using its ID
      operationId: bastion.api.v2.API.GetRedemptionInstructions
      parameters:
      - name: id
        in: path
        description: Unique identifier for the redemption instruction
        required: true
        schema:
          type: string
          title: id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.issuance.RedemptionInstructions'
        '404':
          description: Resource not found
        '400':
          description: Bad request
        '500':
          description: Internal Server Error
  /v2/issuance/redemptions:
    get:
      tags:
      - Issuance
      summary: List Redemptions
      description: List redemptions
      operationId: bastion.api.v2.API.ListRedemptions
      parameters:
      - name: status
        in: query
        description: Filter by status
        required: false
        schema:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.Status'
          title: status
      - name: limit
        in: query
        description: The maximum number of redemptions to return in a single page. The maximum value that can be specified is 25.
        required: false
        schema:
          type: integer
          title: limit
          maximum: 25
          minimum: 1
          format: int32
          default: '10'
      - name: cursor
        in: query
        description: Pagination cursor to be used in subsequent queries to retrieve next page of results
        required: false
        schema:
          type: string
          title: cursor
      - name: identity_id
        in: query
        description: Filter by the identity id that enacted the redemption
        required: false
        schema:
          type: string
          title: identity_id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.issuance.ListRedemptionsResponse'
        '404':
          description: Resource not found
        '400':
          description: Bad request
        '500':
          description: Internal Server Error
  /v2/issuance/redemptions/{id}:
    get:
      tags:
      - Issuance
      summary: Get Redemption Request
      description: Get a redemption request using its ID
      operationId: bastion.api.v2.API.GetRedemption
      parameters:
      - name: id
        in: path
        description: Unique identifier for the redemption request
        required: true
        schema:
          type: string
          title: id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.issuance.Redemption'
        '404':
          description: Resource not found
        '400':
          description: Bad request
        '500':
          description: Internal Server Error
  /v2/simulation/fiat-deposit:
    post:
      tags:
      - Simulation
      summary: Simulate Fiat Deposit
      description: Simulate a fiat deposit for testing purposes. Not available in production.
      operationId: bastion.api.v2.API.SimulateFiatDeposit
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bastion.api.v2.SimulateFiatDepositRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.SimulateFiatDepositResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
      servers:
      - url: https://api.sandbox.bastion.io
        description: Sandbox environment
  /v2/transaction-limits/policies:
    get:
      tags:
      - Transaction Limits
      summary: List Transaction Limit Policies
      description: List transaction limit policies for your organization
      operationId: bastion.api.v2.API.ListTransactionLimitPolicies
      parameters:
      - name: limit
        in: query
        description: "The maximum number of transaction limit policies to return in a single page.\n The maximum value that can be specified is 100. Defaults to 50 if unspecified."
        required: false
        schema:
          type: integer
          title: limit
          maximum: 100
          minimum: 1
          format: int32
          default: '50'
      - name: cursor
        in: query
        description: Pagination cursor to be used in subsequent queries to retrieve next page of results
        required: false
        schema:
          type: string
          title: cursor
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.transactions.ListTransactionLimitPoliciesResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '403':
          description: Request Forbidden
        '500':
          description: Internal Server Error
        '503':
          description: Transaction limits are not enabled for your app
  /v2/transaction-limits/policies/{id}:
    get:
      tags:
      - Transaction Limits
      summary: Get Transaction Limit Policy
      description: Get a transaction limit policy by ID
      operationId: bastion.api.v2.API.GetTransactionLimitPolicy
      parameters:
      - name: id
        in: path
        description: Unique identifier of the transaction limit policy to retrieve
        required: true
        schema:
          type: string
          title: id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.transactions.GetTransactionLimitPolicyResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '403':
          description: Request Forbidden
        '404':
          description: Transaction policy not found
        '500':
          description: Internal Server Error
        '503':
          description: Transaction limits are not enabled for your app
  /v2/webhooks:
    get:
      tags:
      - Webhooks
      summary: List Webhooks
      description: List all webhooks
      operationId: bastion.api.v2.API.ListWebhooks
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.ListWebhooksResponse'
        '400':
          description: Bad request
        '500':
          description: Internal Server Error
    post:
      tags:
      - Webhooks
      summary: Create Webhook
      description: Create a new webhook
      operationId: bastion.api.v2.API.CreateWebhook
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bastion.api.v2.CreateWebhookRequest'
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.Webhook'
        '400':
          description: Bad request
        '500':
          description: Internal Server Error
  /v2/webhooks/{id}:
    delete:
      tags:
      - Webhooks
      summary: Delete Webhook
      description: Delete a webhook by ID
      operationId: bastion.api.v2.API.DeleteWebhook
      parameters:
      - name: id
        in: path
        description: The ID of the webhook to delete
        required: true
        schema:
          type: string
          title: id
      responses:
        '204':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.DeleteWebhookResponse'
        '400':
          description: Bad request
        '404':
          description: Webhook not found
        '500':
          description: Internal Server Error
  /v2/webhooks/{id}/rotate-signing-key:
    post:
      tags:
      - Webhooks
      summary: Rotate Webhook Signing Key
      description: "Generate or rotate the HMAC signing secret for a webhook endpoint.\n If the webhook already has a key, the existing key is moved into a\n 'previous' slot and remains valid for the overlap window (24H)\n during which deliveries carry both signatures. The new secret is\n returned exactly once."
      operationId: bastion.api.v2.API.RotateWebhookSigningKey
      parameters:
      - name: id
        in: path
        description: The ID of the webhook to rotate the signing key for
        required: true
        schema:
          type: string
          title: id
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                request_id:
                  type: string
                  title: request_id
                  pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
                  format: uuid
                  description: "Request identifier in a UUID format. Serves as an idempotency key: a retry\n with the same request_id does not rotate the key again. Will become required."
              title: RotateWebhookSigningKeyRequest
              additionalProperties: false
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bastion.api.v2.RotateWebhookSigningKeyResponse'
        '400':
          description: Bad request
        '404':
          description: Webhook not found
        '500':
          description: Internal Server Error
components:
  schemas:
    bastion.api.IdentityStatus:
      type: string
      title: IdentityStatus
      enum:
      - IDENTITY_STATUS_UNSPECIFIED
      - PENDING_ONBOARDING
      - ACTIVE
      - SUSPENDED
      - REJECTED
      - TERMINATED
      description: Top-level identity lifecycle status.
      example: PENDING_ONBOARDING
    bastion.api.IdentitySubStatus:
      type: string
      title: IdentitySubStatus
      enum:
      - IDENTITY_SUB_STATUS_UNSPECIFIED
      - CREATED
      - COMPLIANCE_CHECKS_IN_PROGRESS
      - IDV_REQUIRED
      - IDV_REQUESTED
      - IDV_IN_PROGRESS
      - IDV_EXPIRED
      - RFI_REQUIRED
      description: "Finer-grained progress within a parent IdentityStatus. Most values track\n onboarding workflow progress and are only set while IdentityStatus is\n PENDING_ONBOARDING. RFI_REQUIRED can be set at any onboarding step and while\n IdentityStatus is ACTIVE or SUSPENDED; it stays set until the request for\n information is fulfilled, or until IdentityStatus changes, which closes it.\n The exception is a reinstatement that sets RFI_REQUIRED: it keeps an open\n RFI open, or opens one.\n Fulfillment returns an onboarding identity to the step it had reached, and\n clears the sub-status of an ACTIVE or SUSPENDED identity."
      example: CREATED
    bastion.api.KYBStatus:
      type: object
      properties:
        kyb_passed:
          type: boolean
          title: kyb_passed
          description: Flag indicating if the KYB check passed
        kyb_failure_reason:
          type:
          - string
          - 'null'
          title: kyb_failure_reason
          description: Reason for KYB check failure
        jurisdiction_check_passed:
          type: boolean
          title: jurisdiction_check_passed
          description: Flag indicating if the jurisdiction check passed
        jurisdiction_check_failure_reason:
          type:
          - string
          - 'null'
          title: jurisdiction_check_failure_reason
          description: Reason for jurisdiction check failure
        allowed_to_transact_fungibles:
          type: boolean
          title: allowed_to_transact_fungibles
          description: Flag indicating if the business is allowed to transact fungible assets
      title: KYBStatus
      additionalProperties: false
    bastion.api.KYCStatus:
      type: object
      properties:
        kyc_passed:
          type: boolean
          title: kyc_passed
          description: Flag indicating if the KYC check passed
        kyc_failure_reason:
          type:
          - string
          - 'null'
          title: kyc_failure_reason
          description: Reason for KYC check failure
        jurisdiction_check_passed:
          type: boolean
          title: jurisdiction_check_passed
          description: Flag indicating if the jurisdiction check passed
        jurisdiction_check_failure_reason:
          type:
          - string
          - 'null'
          title: jurisdiction_check_failure_reason
          description: Reason for jurisdiction check failure
        allowed_to_transact_fungibles:
          type: boolean
          title: allowed_to_transact_fungibles
          description: Flag indicating if the user is allowed to transact fungible assets
      title: KYCStatus
      additionalProperties: false
    bastion.api.WalletAddress:
      type: object
      properties:
        chains:
          type: array
          items:
            $ref: '#/components/schemas/bastion.common.Chain'
          title: chains
        address:
          type: string
          title: address
      title: WalletAddress
      additionalProperties: false
    bastion.api.account.AccountStatus:
      type: string
      title: AccountStatus
      enum:
      - ACCOUNT_STATUS_UNSPECIFIED
      - ACTIVE
      - FROZEN
      - CLOSED
      description: AccountStatus represents the state of an account, derived from its parent identity state.
      example: ACTIVE
    bastion.api.v2.Account:
      type: object
      properties:
        request_id:
          type: string
          title: request_id
          description: Request identifier in a UUID format. Serves as an idempotency key
        identity_type:
          allOf:
          - $ref: '#/components/schemas/bastion.common.IdentityType'
          title: identity_type
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.WalletAddress'
          title: addresses
          readOnly: true
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier of the identity associated with the account.
          readOnly: true
        id:
          type: string
          title: id
          description: Unique identifier of the account.
          readOnly: true
        account_type:
          allOf:
          - $ref: '#/components/schemas/bastion.common.AccountType'
          title: account_type
          description: 'Deprecated: use "type" instead'
          readOnly: true
          deprecated: true
        frozen:
          type: boolean
          title: frozen
          description: "`true` if the account is frozen.\n Accounts that are frozen are blocked from interacting with the Bastion platform without manual intervention.\n Contact compliance@bastion.com for more details if an account is frozen."
          readOnly: true
        identity_status:
          allOf:
          - $ref: '#/components/schemas/bastion.api.IdentityStatus'
          title: identity_status
          description: The identity's top-level status.
          readOnly: true
        identity_sub_status:
          allOf:
          - $ref: '#/components/schemas/bastion.api.IdentitySubStatus'
          title: identity_sub_status
          description: The identity's sub-status. Populated during PENDING_ONBOARDING, and RFI_REQUIRED while a request for information is open in any status except REJECTED and TERMINATED.
          readOnly: true
        account_status:
          allOf:
          - $ref: '#/components/schemas/bastion.api.account.AccountStatus'
          title: account_status
          description: 'Deprecated: use "status" instead'
          readOnly: true
          deprecated: true
        status:
          allOf:
          - $ref: '#/components/schemas/bastion.api.account.AccountStatus'
          title: status
          description: The account's status, derived from its parent identity state.
          readOnly: true
        type:
          allOf:
          - $ref: '#/components/schemas/bastion.common.AccountType'
          title: type
          description: "The account's type.\n\n Valid values are OMNIBUS and SEGREGATED.\n LEDGER and ONCHAIN are legacy values."
          readOnly: true
      title: Account
      required:
      - request_id
      additionalProperties: false
    bastion.api.v2.ComplianceUpdateData:
      type: object
      anyOf:
      - type: object
        properties:
          kyc:
            allOf:
            - $ref: '#/components/schemas/bastion.api.v2.KYCUpdateFields'
            title: kyc
        title: kyc
      unevaluatedProperties: false
    bastion.api.v2.CreateAccountRequest:
      type: object
      properties:
        request_id:
          type: string
          title: request_id
          pattern: '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}'
          format: uuid
          description: Request identifier in a UUID format. Serves as an idempotency key.
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier of the identity to which this account should belong.
        type:
          type: string
          allOf:
          - $ref: '#/components/schemas/bastion.common.AccountType'
          title: type
          description: "Type of account to create.\n\n Valid values are OMNIBUS and SEGREGATED.\n LEDGER and ONCHAIN are legacy values."
          default: SEGREGATED
      title: CreateAccountRequest
      required:
      - request_id
      - identity_id
      additionalProperties: false
    bastion.api.v2.CreateAccountResponse:
      type: object
      properties:
        account:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.Account'
          title: account
      title: CreateAccountResponse
      additionalProperties: false
    bastion.api.v2.CreateIDVCheckRequest:
      type: object
      properties:
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier of the identity to verify
        redirect_url:
          type:
          - string
          - 'null'
          title: redirect_url
          description: URL to redirect the user to after completing identity verification
        reason:
          allOf:
          - $ref: '#/components/schemas/bastion.common.IDVCheckReason'
          title: reason
          description: Reason for the identity verification check
        request_id:
          type: string
          title: request_id
          pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
          format: uuid
          description: Request identifier in UUID format. Serves as an idempotency key.
        labels:
          type: array
          items:
            type: string
          title: labels
          description: Labels to associate with this identity verification check
      title: CreateIDVCheckRequest
      required:
      - request_id
      additionalProperties: false
    bastion.api.v2.CreateIDVCheckResponse:
      type: object
      properties:
        id_verification_check:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.IDVCheck'
          title: id_verification_check
          description: The created identity verification check
      title: CreateIDVCheckResponse
      additionalProperties: false
    bastion.api.v2.CreateIdentityRequest:
      type: object
      properties:
        label:
          type: string
          title: label
          pattern: '[0-9a-zA-Z-:,]+'
          description: Label for an identity. Please do not use Personally Identifiable Information (PII) in this field.
        identity_type:
          allOf:
          - $ref: '#/components/schemas/bastion.common.IdentityType'
          title: identity_type
          description: Type of identity to create. Options include INDIVIDUAL and BUSINESS.
        request_id:
          type: string
          title: request_id
          pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
          format: uuid
          description: 'Request identifier in a UUID format. Serves as an idempotency key: retries with the same value return the original identity. Will become required.'
      title: CreateIdentityRequest
      additionalProperties: false
    bastion.api.v2.CreateIdentityResponse:
      type: object
      properties:
        identity:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.Identity'
      title: CreateIdentityResponse
      additionalProperties: false
    bastion.api.v2.CreateWebhookRequest:
      type: object
      properties:
        url:
          type: string
          title: url
          description: The URL to send webhook events to
        label:
          type: string
          title: label
          description: A friendly label to associate with the webhook registration
      title: CreateWebhookRequest
      required:
      - url
      - label
      additionalProperties: false
    bastion.api.v2.CreateWebhookResponse:
      type: object
      properties:
        webhook:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.Webhook'
          title: webhook
          readOnly: true
      title: CreateWebhookResponse
      additionalProperties: false
    bastion.api.v2.CryptoAsset:
      type: object
      properties:
        chain:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          title: chain
          description: Blockchain network for the asset
          readOnly: true
        symbol:
          type: string
          title: symbol
          description: Symbol or ticker of the asset
          readOnly: true
        decimals:
          type: string
          title: decimals
          format: int64
          description: Number of decimal places for the asset
          readOnly: true
        type:
          allOf:
          - $ref: '#/components/schemas/bastion.common.CryptocurrencyAssetType'
          title: type
          description: Type of the cryptocurrency asset
          readOnly: true
        contract_address:
          type: string
          title: contract_address
          description: Contract address of the asset, if applicable
          readOnly: true
      title: CryptoAsset
      additionalProperties: false
    bastion.api.v2.DeleteSigningKeyRequest:
      type: object
      properties:
        identity_id:
          type: string
          title: identity_id
        key_id:
          type: string
          title: key_id
      title: DeleteSigningKeyRequest
      required:
      - identity_id
      - key_id
      additionalProperties: false
    bastion.api.v2.DeleteSigningKeyResponse:
      type: object
      title: DeleteSigningKeyResponse
      additionalProperties: false
    bastion.api.v2.DeleteWebhookRequest:
      type: object
      properties:
        id:
          type: string
          title: id
          description: The ID of the webhook to delete
      title: DeleteWebhookRequest
      required:
      - id
      additionalProperties: false
    bastion.api.v2.DeleteWebhookResponse:
      type: object
      title: DeleteWebhookResponse
      additionalProperties: false
    bastion.api.v2.GetAccountAssetBalancesRequest:
      type: object
      properties:
        account_id:
          type: string
          title: account_id
          description: Unique identifier of an account.
        chain:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          title: chain
          description: "Optional chain to query balances for.\n If not provided, balances for all supported chains will be returned."
      title: GetAccountAssetBalancesRequest
      required:
      - account_id
      additionalProperties: false
    bastion.api.v2.GetAccountAssetBalancesResponse:
      type: object
      properties:
        balances:
          type: array
          items:
            $ref: '#/components/schemas/bastion.common.Balance'
          title: balances
          description: List of balances for the account
      title: GetAccountAssetBalancesResponse
      additionalProperties: false
    bastion.api.v2.GetAccountRequest:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier of an account.
      title: GetAccountRequest
      required:
      - id
      additionalProperties: false
    bastion.api.v2.GetAccountResponse:
      type: object
      properties:
        account:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.Account'
          title: account
      title: GetAccountResponse
      additionalProperties: false
    bastion.api.v2.GetAssetsRequest:
      type: object
      properties:
        chain:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          title: chain
          description: Chain on which to list the supported assets
      title: GetAssetsRequest
      additionalProperties: false
    bastion.api.v2.GetAssetsResponse:
      type: object
      properties:
        assets:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.CryptoAsset'
          title: assets
          description: List of supported assets
          readOnly: true
      title: GetAssetsResponse
      additionalProperties: false
    bastion.api.v2.GetIDVCheckRequest:
      type: object
      properties:
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier of the identity associated with the check
        id:
          type: string
          title: id
          description: Unique identifier of the identity verification check
      title: GetIDVCheckRequest
      additionalProperties: false
    bastion.api.v2.GetIDVCheckResponse:
      type: object
      properties:
        id_verification_check:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.IDVCheck'
          title: id_verification_check
          description: The identity verification check
      title: GetIDVCheckResponse
      additionalProperties: false
    bastion.api.v2.GetIdentityRequest:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier of an identity
      title: GetIdentityRequest
      additionalProperties: false
    bastion.api.v2.GetIdentityResponse:
      type: object
      properties:
        identity:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.Identity'
      title: GetIdentityResponse
      additionalProperties: false
    bastion.api.v2.IDVCheck:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier of the identity verification check
          readOnly: true
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier of the identity associated with this check
          readOnly: true
        verification_url:
          type: string
          title: verification_url
          description: URL to redirect the user to for identity verification
          readOnly: true
        reason:
          allOf:
          - $ref: '#/components/schemas/bastion.common.IDVCheckReason'
          title: reason
          description: Reason for the identity verification check
          readOnly: true
        request_id:
          type: string
          title: request_id
          description: Client-provided idempotency key
          readOnly: true
        redirect_url:
          type:
          - string
          - 'null'
          title: redirect_url
          description: URL to redirect the user to after completing identity verification
          readOnly: true
        status:
          allOf:
          - $ref: '#/components/schemas/bastion.common.IDVCheckStatus'
          title: status
          description: Current status of the identity verification check
          readOnly: true
        created_at:
          allOf:
          - $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: created_at
          description: Timestamp when the check was created
          readOnly: true
        updated_at:
          allOf:
          - $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: updated_at
          description: Timestamp when the check was last updated
          readOnly: true
        labels:
          type: array
          items:
            type: string
            readOnly: true
          title: labels
          description: Labels associated with this identity verification check
          readOnly: true
      title: IDVCheck
      additionalProperties: false
    bastion.api.v2.Identity:
      type: object
      anyOf:
      - type: object
        properties:
          kyb_status:
            allOf:
            - $ref: '#/components/schemas/bastion.api.KYBStatus'
            title: kyb_status
            description: "Deprecated: replaced by the top-level `status` and `sub_status` fields.\n\n Status of KYB for the given identity."
            readOnly: true
            deprecated: true
        title: kyb_status
      - type: object
        properties:
          kyc_status:
            allOf:
            - $ref: '#/components/schemas/bastion.api.KYCStatus'
            title: kyc_status
            description: "Deprecated: replaced by the top-level `status` and `sub_status` fields.\n\n Status of KYC for the given identity."
            readOnly: true
            deprecated: true
        title: kyc_status
      unevaluatedProperties: false
      not:
        allOf:
        - anyOf:
          - required:
            - kyb_status
          - required:
            - kyc_status
        - not:
            oneOf:
            - required:
              - kyb_status
            - required:
              - kyc_status
      properties:
        id:
          type: string
          title: id
          description: Unique identifier of an identity, assigned by Bastion
          readOnly: true
        identity_type:
          allOf:
          - $ref: '#/components/schemas/bastion.common.IdentityType'
          title: identity_type
          description: 'Deprecated: use "type" instead'
          deprecated: true
        account_ids:
          type: array
          items:
            type: string
            readOnly: true
          title: account_ids
          description: Account ids associated with the identity
          readOnly: true
        label:
          type: string
          title: label
          description: Customer-defined identifier for the identity
          readOnly: true
        fiat_operations_enabled:
          type: boolean
          title: fiat_operations_enabled
          description: True if the identity is cleared to perform fiat operations, such as conversions between stablecoins and fiat
          readOnly: true
        status:
          allOf:
          - $ref: '#/components/schemas/bastion.api.IdentityStatus'
          title: status
          description: The identity's status
          readOnly: true
        sub_status:
          allOf:
          - $ref: '#/components/schemas/bastion.api.IdentitySubStatus'
          title: sub_status
          description: The identity's sub-status. Populated during PENDING_ONBOARDING, and RFI_REQUIRED while a request for information is open in any status except REJECTED and TERMINATED.
          readOnly: true
        type:
          allOf:
          - $ref: '#/components/schemas/bastion.common.IdentityType'
          title: type
          description: Identity type
    bastion.api.v2.KYB:
      type: object
      properties:
        name:
          type: string
          title: name
          maxLength: 100
          minLength: 3
          description: Name of the business
        tax_id:
          type: string
          title: tax_id
          maxLength: 20
          minLength: 3
          description: For business US customers, EIN (in the format XX-XXXXXXX where X is a number) should be used. For non-US business customers, a national ID is preferred where applicable; however, a tax ID can also be used as an alternative.
        email_address:
          type: string
          title: email_address
          maxLength: 100
          description: Business email address
        address:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Address'
          title: address
          description: Business address
        description:
          type: string
          title: description
          maxLength: 255
          description: Business description
        source_of_funds:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.KYB.SourceOfFunds'
          title: source_of_funds
          description: Source of funds for the business
        business_type:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.KYB.BusinessType'
          title: business_type
          description: 'The type of business structure. Options include: cooperative, corporation, llc, other, partnership, sole-prop, trust'
        website:
          type: string
          title: website
          description: The business website. This must include the http:// or https://
        is_dao:
          type: boolean
          title: is_dao
          description: Whether the business is a DAO
        transmits_customer_funds:
          type: boolean
          title: transmits_customer_funds
          description: True if the business transmits funds on behalf of its customers
        compliance_screening_explanation:
          type: string
          title: compliance_screening_explanation
          description: Required if transmits_customer_funds is true. An explanation of types of compliance screening (KYC, KYB, or AML) the customer performs before transmitting funds on behalf of its customers.
        ultimate_beneficial_owners:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.UltimateBeneficialOwner'
          title: ultimate_beneficial_owners
        formation_document:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Document'
          title: formation_document
        ownership_document:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Document'
          title: ownership_document
        date_of_incorporation:
          type: string
          title: date_of_incorporation
          description: Date of incorporation of the business in format yyyy-mm-dd
        business_industry_code:
          type: string
          title: business_industry_code
          description: "6-digit [NAICS](https://www.census.gov/naics/) industry code for the business.\n Required when the business address is in the US.\n\n Supported codes:\n\n ```text\n 111110, 111120, 111130, 111140, 111150, 111160, 111191, 111199, 111211, 111219,\n 111310, 111320, 111331, 111332, 111333, 111334, 111335, 111336, 111339, 111411,\n 111419, 111421, 111422, 111910, 111920, 111930, 111940, 111991, 111992, 111998,\n 112111, 112112, 112120, 112210, 112310, 112320, 112330, 112340, 112390, 112410,\n 112420, 112511, 112512, 112519, 112910, 112920, 112930, 112990, 113110, 113210,\n 113310, 114111, 114112, 114119, 114210, 115111, 115112, 115113, 115114, 115115,\n 115116, 115210, 115310, 211120, 211130, 212114, 212115, 212210, 212220, 212230,\n 212290, 212311, 212312, 212313, 212319, 212321, 212322, 212323, 212390, 213111,\n 213112, 213113, 213114, 213115, 221111, 221112, 221113, 221114, 221115, 221116,\n 221117, 221118, 221121, 221122, 221210, 221310, 221320, 221330, 236115, 236116,\n 236117, 236118, 236210, 236220, 237110, 237120, 237130, 237210, 237310, 237990,\n 238110, 238111, 238112, 238121, 238122, 238131, 238132, 238140, 238141, 238142,\n 238151, 238152, 238160, 238161, 238162, 238171, 238172, 238191, 238192, 238210,\n 238211, 238212, 238220, 238221, 238222, 238291, 238292, 238311, 238312, 238321,\n 238322, 238331, 238332, 238341, 238342, 238350, 238351, 238352, 238391, 238392,\n 238911, 238912, 238990, 238991, 238992, 311111, 311119, 311211, 311212, 311213,\n 311221, 311224, 311225, 311230, 311313, 311314, 311340, 311351, 311352, 311411,\n 311412, 311421, 311422, 311423, 311511, 311512, 311513, 311514, 311520, 311611,\n 311612, 311613, 311615, 311710, 311811, 311812, 311813, 311821, 311824, 311830,\n 311911, 311919, 311920, 311930, 311941, 311942, 311991, 311999, 312111, 312112,\n 312113, 312120, 312130, 312140, 312230, 313110, 313210, 313220, 313230, 313240,\n 313310, 313320, 314110, 314120, 314910, 314994, 314999, 315120, 315210, 315250,\n 315990, 316110, 316210, 316990, 321113, 321114, 321211, 321212, 321215, 321219,\n 321911, 321912, 321918, 321920, 321991, 321992, 321999, 322110, 322120, 322130,\n 322211, 322212, 322219, 322220, 322230, 322291, 322299, 323111, 323113, 323117,\n 323120, 324110, 324121, 324122, 324191, 324199, 325110, 325120, 325130, 325180,\n 325193, 325194, 325199, 325211, 325212, 325220, 325311, 325312, 325314, 325315,\n 325320, 325411, 325412, 325413, 325414, 325510, 325520, 325611, 325612, 325613,\n 325620, 325910, 325920, 325991, 325992, 325998, 326111, 326112, 326113, 326121,\n 326122, 326130, 326140, 326150, 326160, 326191, 326199, 326211, 326212, 326220,\n 326291, 326299, 327110, 327120, 327211, 327212, 327213, 327215, 327310, 327320,\n 327331, 327332, 327390, 327410, 327420, 327910, 327991, 327992, 327993, 327999,\n 331110, 331210, 331221, 331222, 331313, 331314, 331315, 331318, 331410, 331420,\n 331491, 331492, 331511, 331512, 331513, 331523, 331524, 331529, 332111, 332112,\n 332114, 332117, 332119, 332215, 332216, 332311, 332312, 332313, 332321, 332322,\n 332323, 332410, 332420, 332431, 332439, 332510, 332613, 332618, 332710, 332721,\n 332722, 332811, 332812, 332813, 332911, 332912, 332913, 332919, 332991, 332992,\n 332993, 332994, 332996, 332999, 333111, 333112, 333120, 333131, 333132, 333241,\n 333242, 333243, 333248, 333310, 333413, 333414, 333415, 333511, 333514, 333515,\n 333517, 333519, 333611, 333612, 333613, 333618, 333912, 333914, 333921, 333922,\n 333923, 333924, 333991, 333992, 333993, 333994, 333995, 333996, 333998, 334111,\n 334112, 334118, 334210, 334220, 334290, 334310, 334412, 334413, 334416, 334417,\n 334418, 334419, 334510, 334511, 334512, 334513, 334514, 334515, 334516, 334517,\n 334519, 334610, 335131, 335132, 335139, 335210, 335220, 335311, 335312, 335313,\n 335314, 335910, 335921, 335929, 335931, 335932, 335991, 335999, 336110, 336120,\n 336211, 336212, 336213, 336214, 336310, 336320, 336330, 336340, 336350, 336360,\n 336370, 336390, 336411, 336412, 336413, 336414, 336415, 336419, 336510, 336611,\n 336612, 336991, 336992, 336999, 337110, 337121, 337122, 337126, 337127, 337211,\n 337212, 337214, 337215, 337910, 337920, 339112, 339113, 339114, 339115, 339116,\n 339910, 339920, 339930, 339940, 339950, 339991, 339992, 339993, 339994, 339995,\n 339999, 423110, 423120, 423130, 423140, 423210, 423220, 423310, 423320, 423330,\n 423390, 423410, 423420, 423430, 423440, 423450, 423460, 423490, 423510, 423520,\n 423610, 423620, 423690, 423710, 423720, 423730, 423740, 423810, 423820, 423830,\n 423840, 423850, 423860, 423910, 423920, 423930, 423940, 423990, 424110, 424120,\n 424130, 424210, 424310, 424340, 424350, 424410, 424420, 424430, 424440, 424450,\n 424460, 424470, 424480, 424490, 424510, 424520, 424590, 424610, 424690, 424710,\n 424720, 424810, 424820, 424910, 424920, 424930, 424940, 424950, 424990, 425120,\n 441110, 441120, 441210, 441222, 441227, 441330, 441340, 444110, 444120, 444140,\n 444180, 444230, 444240, 445110, 445131, 445132, 445230, 445240, 445250, 445291,\n 445292, 445298, 445320, 449110, 449121, 449122, 449129, 449210, 454113, 454390,\n 455110, 455211, 455219, 456110, 456120, 456130, 456191, 456199, 457110, 457120,\n 457210, 458110, 458210, 458310, 458320, 459110, 459120, 459130, 459140, 459210,\n 459310, 459410, 459420, 459510, 459910, 459920, 459930, 459991, 459999, 481111,\n 481112, 481211, 481212, 481219, 482111, 482112, 483111, 483112, 483113, 483114,\n 483211, 483212, 484110, 484121, 484122, 484210, 484220, 484230, 485111, 485112,\n 485113, 485119, 485210, 485310, 485320, 485410, 485510, 485991, 485999, 486110,\n 486210, 486910, 486990, 487110, 487210, 487990, 488111, 488119, 488190, 488210,\n 488310, 488320, 488330, 488390, 488410, 488490, 488510, 488991, 488999, 491110,\n 492110, 492210, 493110, 493120, 493130, 493190, 512110, 512120, 512131, 512132,\n 512191, 512199, 512230, 512240, 512250, 512290, 513110, 513120, 513130, 513140,\n 513191, 513199, 513210, 515210, 516110, 516120, 516210, 517111, 517112, 517121,\n 517410, 517810, 518210, 519210, 519290, 521110, 522110, 522130, 522180, 522210,\n 522220, 522291, 522292, 522298, 522299, 522310, 522320, 522390, 523150, 523160,\n 523210, 523910, 523940, 523991, 523999, 524113, 524114, 524126, 524127, 524128,\n 524130, 524210, 524291, 524292, 524298, 525110, 525120, 525190, 525910, 525920,\n 525990, 531110, 531120, 531130, 531190, 531210, 531311, 531312, 531320, 531390,\n 532111, 532112, 532120, 532210, 532281, 532282, 532283, 532284, 532289, 532310,\n 532411, 532412, 532420, 532490, 533110, 541110, 541191, 541199, 541211, 541213,\n 541214, 541219, 541310, 541320, 541330, 541340, 541350, 541360, 541370, 541380,\n 541410, 541420, 541430, 541490, 541511, 541512, 541513, 541519, 541611, 541612,\n 541613, 541614, 541618, 541620, 541690, 541713, 541714, 541715, 541720, 541810,\n 541820, 541830, 541840, 541850, 541860, 541870, 541890, 541910, 541921, 541922,\n 541930, 541940, 541990, 551111, 551112, 551114, 561110, 561210, 561311, 561312,\n 561320, 561330, 561410, 561421, 561422, 561431, 561439, 561440, 561450, 561491,\n 561492, 561499, 561510, 561520, 561591, 561599, 561611, 561612, 561613, 561621,\n 561622, 561710, 561720, 561730, 561740, 561790, 561910, 561920, 561990, 562111,\n 562112, 562119, 562211, 562212, 562213, 562219, 562910, 562920, 562991, 562998,\n 611110, 611210, 611310, 611410, 611420, 611430, 611511, 611512, 611513, 611519,\n 611610, 611620, 611630, 611691, 611692, 611699, 611710, 621111, 621112, 621210,\n 621310, 621320, 621330, 621340, 621391, 621399, 621410, 621420, 621491, 621492,\n 621493, 621498, 621511, 621512, 621610, 621910, 621991, 621999, 622110, 622210,\n 622310, 623110, 623210, 623220, 623311, 623312, 623990, 624110, 624120, 624190,\n 624210, 624221, 624229, 624230, 624310, 624410, 711110, 711120, 711130, 711190,\n 711211, 711212, 711219, 711310, 711320, 711410, 711510, 712110, 712120, 712130,\n 712190, 713110, 713120, 713210, 713290, 713910, 713920, 713930, 713940, 713950,\n 713990, 721110, 721120, 721191, 721199, 721211, 721214, 721310, 722310, 722320,\n 722330, 722410, 722511, 722513, 722514, 722515, 811111, 811114, 811121, 811122,\n 811191, 811192, 811198, 811210, 811310, 811411, 811412, 811420, 811430, 811490,\n 812111, 812112, 812113, 812191, 812199, 812210, 812220, 812310, 812320, 812331,\n 812332, 812910, 812921, 812922, 812930, 812990, 813110, 813211, 813212, 813219,\n 813311, 813312, 813319, 813410, 813910, 813920, 813930, 813940, 813990, 814110,\n 921110, 921120, 921130, 921140, 921150, 921190, 922110, 922120, 922130, 922140,\n 922150, 922160, 922190, 923110, 923120, 923130, 923140, 924110, 924120, 925110,\n 925120, 926110, 926120, 926130, 926140, 926150, 927110, 928110, 928120\n ```"
        account_purpose:
          allOf:
          - $ref: '#/components/schemas/bastion.common.AccountPurpose'
          title: account_purpose
          description: The business's purpose for opening a Bastion account.
        registration_number:
          type: string
          title: registration_number
          description: The business' registration number
      title: KYB
      required:
      - name
      - tax_id
      - email_address
      - address
      - description
      - source_of_funds
      - business_type
      - website
      - is_dao
      - transmits_customer_funds
      - ultimate_beneficial_owners
      - formation_document
      - ownership_document
      - date_of_incorporation
      - account_purpose
      - registration_number
      additionalProperties: false
      description: Know Your Business (KYB) information for a business identity
    bastion.api.v2.KYB.BusinessType:
      type: string
      title: BusinessType
      enum:
      - BUSINESS_TYPE_UNSPECIFIED
      - COOPERATIVE
      - CORPORATION
      - LLC
      - OTHER
      - PARTNERSHIP
      - SOLEPROP
      - TRUST
      example: COOPERATIVE
    bastion.api.v2.KYB.SourceOfFunds:
      type: string
      title: SourceOfFunds
      enum:
      - SOURCE_OF_FUNDS_UNSPECIFIED
      - BUSINESS_LOANS
      - BUSINESS_REVENUE
      - EQUITY_FUNDING
      - GRANTS
      - INTER_COMPANY_FUNDS
      - INVESTMENT_PROCEEDS
      - LEGAL_SETTLEMENT
      - LEGAL_SETTLEMENT_TAX_REFUND
      - OWNERS_CAPITAL
      - PENSION_RETIREMENT
      - SALE_OF_ASSETS
      - SALES_OF_GOODS_AND_SERVICES
      - THIRD_PARTY_FUNDS
      - TREASURY_RESERVES
      example: BUSINESS_LOANS
    bastion.api.v2.KYC:
      type: object
      properties:
        first_name:
          type: string
          title: first_name
          maxLength: 50
          minLength: 2
          description: "First name of the user. Must not contain the following characters:\n ! \" # $ % & ( ) * + , / : ; < = > ? @ [ \\ ] ^ _ { | } ~ or a backtick.\n Hyphens and apostrophes are permitted."
        middle_name:
          type:
          - string
          - 'null'
          title: middle_name
          maxLength: 50
          minLength: 2
          description: "Middle name of the user. Must not contain the following characters:\n ! \" # $ % & ( ) * + , / : ; < = > ? @ [ \\ ] ^ _ { | } ~ or a backtick.\n Hyphens and apostrophes are permitted."
        last_name:
          type: string
          title: last_name
          maxLength: 50
          minLength: 2
          description: "Last name of the user. Must not contain the following characters:\n ! \" # $ % & ( ) * + , / : ; < = > ? @ [ \\ ] ^ _ { | } ~ or a backtick.\n Hyphens and apostrophes are permitted."
        date_of_birth:
          type: string
          title: date_of_birth
          description: "Date of birth of the user provided as YYYY-MM-DD. The individual must be\n between 18 and 100 years old; dates outside this range are rejected."
        ip_address:
          type: string
          title: ip_address
          description: "Publicly routable IP address of the user. Private, loopback, link-local,\n unspecified, and multicast addresses are rejected, as are the RFC 5737\n and RFC 3849 documentation/example ranges (e.g. 192.0.2.0/24, 2001:db8::/32)."
        physical_address:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Address'
          title: physical_address
        tax_id_number:
          type: string
          title: tax_id_number
          maxLength: 20
          minLength: 3
          description: "For US individuals, the SSN or ITIN of the user, in `XXX-XX-XXXX` or `XXXXXXXXX` format (where `X` is a digit).\n Area numbers `000` and `666` are reserved, and known placeholder or repeated-digit values are rejected, for\n both SSNs and ITINs; SSNs (area `001`-`899`) and ITINs (area `900`-`999`) are otherwise accepted.\n For non-US individuals, a foreign equivalent of a tax ID or government-issued identification number is satisfactory."
        phone_number:
          type: string
          title: phone_number
          minLength: 7
          description: Phone number of the user in ISO E.164 format
        email_address:
          type: string
          title: email_address
          maxLength: 100
          description: Email address of the user
        account_purpose:
          allOf:
          - $ref: '#/components/schemas/bastion.common.kyc.account_purpose.IndividualAccountPurpose'
          title: account_purpose
          description: The individual's purpose for opening a Bastion account
        source_of_funds:
          allOf:
          - $ref: '#/components/schemas/bastion.common.kyc.IndividualSourceOfFunds'
          title: source_of_funds
          description: Source of funds for the individual
        occupation:
          allOf:
          - $ref: '#/components/schemas/bastion.common.kyc.Occupation'
          title: occupation
          description: Occupation of the individual
        nationality:
          type: string
          title: nationality
          description: Nationality of the individual as ISO 3166-1 alpha-2 country code
        country_of_birth:
          type: string
          title: country_of_birth
          description: Country of birth of the individual as ISO 3166-1 alpha-2 country code
        additional_id_number:
          type:
          - string
          - 'null'
          title: additional_id_number
          description: Additional identification number for the individual
      title: KYC
      required:
      - first_name
      - last_name
      - date_of_birth
      - ip_address
      - physical_address
      - tax_id_number
      - phone_number
      - email_address
      - account_purpose
      - source_of_funds
      - occupation
      - nationality
      - country_of_birth
      additionalProperties: false
      description: Know Your Customer (KYC) information for an individual identity
    bastion.api.v2.KYCUpdateFields:
      type: object
      properties:
        phone_number:
          type:
          - string
          - 'null'
          title: phone_number
          minLength: 7
          description: Phone number in ISO E.164 format
        email_address:
          type:
          - string
          - 'null'
          title: email_address
          maxLength: 100
          description: Email address
      title: KYCUpdateFields
      additionalProperties: false
    bastion.api.v2.ListAccountsRequest:
      type: object
      properties:
        limit:
          type: integer
          title: limit
          maximum: 100
          minimum: 1
          format: int64
          description: The maximum number of accounts to return in a single page.
          default: '50'
        cursor:
          type: string
          title: cursor
          description: Pagination cursor to be used in subsequent queries to retrieve next page of results.
        identity_ids:
          type: array
          items:
            type: string
          title: identity_ids
          description: "Optional identity IDs to filter accounts by.\n If provided, only accounts belonging to these identities will be returned. Maximum 25 identity IDs can be provided."
      title: ListAccountsRequest
      additionalProperties: false
    bastion.api.v2.ListAccountsResponse:
      type: object
      properties:
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.Account'
          title: accounts
          description: The accounts requested
        cursor:
          type: string
          title: cursor
          description: Pagination cursor to be used in subsequent queries to retrieve next page of results.
      title: ListAccountsResponse
      additionalProperties: false
    bastion.api.v2.ListIDVChecksRequest:
      type: object
      properties:
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier of the identity associated with the checks
      title: ListIDVChecksRequest
      additionalProperties: false
    bastion.api.v2.ListIDVChecksResponse:
      type: object
      properties:
        id_verification_checks:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.IDVCheck'
          title: id_verification_checks
          description: The identity verification checks
      title: ListIDVChecksResponse
      additionalProperties: false
    bastion.api.v2.ListIdentitiesRequest:
      type: object
      properties:
        limit:
          type: string
          title: limit
          maximum: 100
          minimum: 1
          format: int64
          description: The maximum number of identities to return in a single page
          default: '50'
        cursor:
          type: string
          title: cursor
          description: Pagination cursor to be used in subsequent queries to retrieve next page of results
        identity_type:
          allOf:
          - $ref: '#/components/schemas/bastion.common.IdentityType'
          title: identity_type
          description: Filter identities by type
        label:
          type: string
          title: label
          description: Filter identities by label
      title: ListIdentitiesRequest
      additionalProperties: false
    bastion.api.v2.ListIdentitiesResponse:
      type: object
      properties:
        identities:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.Identity'
          title: identities
          description: The identities requested
        cursor:
          type: string
          title: cursor
          description: Pagination cursor to be used in subsequent queries to retrieve next page of results
      title: ListIdentitiesResponse
      additionalProperties: false
    bastion.api.v2.ListSigningKeysRequest:
      type: object
      properties:
        identity_id:
          type: string
          title: identity_id
      title: ListSigningKeysRequest
      required:
      - identity_id
      additionalProperties: false
    bastion.api.v2.ListSigningKeysResponse:
      type: object
      properties:
        signing_keys:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.SigningKey'
          title: signing_keys
      title: ListSigningKeysResponse
      additionalProperties: false
    bastion.api.v2.ListWebhooksRequest:
      type: object
      title: ListWebhooksRequest
      additionalProperties: false
    bastion.api.v2.ListWebhooksResponse:
      type: object
      properties:
        webhooks:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.Webhook'
          title: webhooks
          readOnly: true
      title: ListWebhooksResponse
      additionalProperties: false
    bastion.api.v2.RefreshIDVCheckURLRequest:
      type: object
      properties:
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier of the identity associated with the check
        id:
          type: string
          title: id
          description: Unique identifier of the identity verification check to refresh
      title: RefreshIDVCheckURLRequest
      additionalProperties: false
    bastion.api.v2.RefreshIDVCheckURLResponse:
      type: object
      properties:
        id_verification_check:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.IDVCheck'
          title: id_verification_check
          description: The refreshed identity verification check
      title: RefreshIDVCheckURLResponse
      additionalProperties: false
    bastion.api.v2.RegisterSigningKeyRequest:
      type: object
      properties:
        identity_id:
          type: string
          title: identity_id
          description: Identity to register the signing key for.
        public_key:
          allOf:
          - $ref: '#/components/schemas/bastion.common.JwkEcPublicKey'
          title: public_key
          description: ECDSA public key to register, in JWK format.
        label:
          type: string
          title: label
          description: Customer-provided label for the signing key.
      title: RegisterSigningKeyRequest
      additionalProperties: false
    bastion.api.v2.RegisterSigningKeyResponse:
      type: object
      properties:
        signing_key:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.SigningKey'
          title: signing_key
      title: RegisterSigningKeyResponse
      additionalProperties: false
    bastion.api.v2.RotateWebhookSigningKeyRequest:
      type: object
      properties:
        id:
          type: string
          title: id
          description: The ID of the webhook to rotate the signing key for
        request_id:
          type: string
          title: request_id
          pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
          format: uuid
          description: "Request identifier in a UUID format. Serves as an idempotency key: a retry\n with the same request_id does not rotate the key again. Will become required."
      title: RotateWebhookSigningKeyRequest
      required:
      - id
      additionalProperties: false
    bastion.api.v2.RotateWebhookSigningKeyResponse:
      type: object
      properties:
        signing_secret:
          type: string
          title: signing_secret
          description: Plaintext signing secret. Returned exactly once — store it now.
          readOnly: true
        key_id:
          type: string
          title: key_id
          description: Opaque identifier for this key
          readOnly: true
        previous_key_expires_at:
          allOf:
          - $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: previous_key_expires_at
          description: When the previous key stops being valid. Empty on first generate.
          readOnly: true
      title: RotateWebhookSigningKeyResponse
      additionalProperties: false
    bastion.api.v2.SigningKey:
      type: object
      properties:
        key_id:
          type: string
          title: key_id
          description: Unique identifier of the signing key.
        identity_id:
          type: string
          title: identity_id
          description: Identity that owns the signing key.
        public_key:
          allOf:
          - $ref: '#/components/schemas/bastion.common.JwkEcPublicKey'
          title: public_key
          description: Registered ECDSA public key, in JWK format.
        label:
          type: string
          title: label
          description: Customer-provided label for the signing key.
        created_at:
          allOf:
          - $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: created_at
          description: Time the signing key was registered, as an RFC 3339 timestamp.
      title: SigningKey
      additionalProperties: false
    bastion.api.v2.SimulateFiatDepositRequest:
      type: object
      properties:
        amount:
          type: string
          title: amount
          description: The fiat amount to deposit (e.g. "1000.00")
        memo_id:
          type: string
          title: memo_id
          description: Memo ID associated with the mint instructions
        currency:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.ISSUANCE_SUPPORTED_FIAT_CURRENCY'
          title: currency
          description: Fiat currency for the deposit
        payment_rail:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.ISSUANCE_SUPPORTED_FIAT_PAYMENT_METHOD'
          title: payment_rail
          description: Payment rail for the deposit
      title: SimulateFiatDepositRequest
      required:
      - amount
      - memo_id
      - currency
      - payment_rail
      additionalProperties: false
    bastion.api.v2.SimulateFiatDepositResponse:
      type: object
      properties:
        mint_id:
          type: string
          title: mint_id
          description: Unique identifier for the resulting mint
          readOnly: true
      title: SimulateFiatDepositResponse
      additionalProperties: false
    bastion.api.v2.SubmitComplianceDataRequest:
      type: object
      anyOf:
      - type: object
        properties:
          kyb:
            allOf:
            - $ref: '#/components/schemas/bastion.api.v2.KYB'
            title: kyb
        title: kyb
      - type: object
        properties:
          kyc:
            allOf:
            - $ref: '#/components/schemas/bastion.api.v2.KYC'
            title: kyc
        title: kyc
      unevaluatedProperties: false
      not:
        allOf:
        - anyOf:
          - required:
            - kyb
          - required:
            - kyc
        - not:
            oneOf:
            - required:
              - kyb
            - required:
              - kyc
      properties:
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier of the identity to which the compliance data should be applied
    bastion.api.v2.SubmitComplianceDataResponse:
      type: object
      title: SubmitComplianceDataResponse
      additionalProperties: false
    bastion.api.v2.UltimateBeneficialOwner:
      type: object
      properties:
        first_name:
          type: string
          title: first_name
          maxLength: 50
          minLength: 2
          description: First name of owner
        last_name:
          type: string
          title: last_name
          maxLength: 50
          minLength: 2
          description: Last name of owner
        birth_date:
          type: string
          title: birth_date
          description: Date of birth in format yyyy-mm-dd
        email:
          type: string
          title: email
          maxLength: 100
          description: Email of owner
        phone:
          type: string
          title: phone
          minLength: 7
          description: Phone number of owner in ISO E.164 format
        tax_identification_number:
          type: string
          title: tax_identification_number
          description: For US owners, SSN should be used. For non-US individual owners, a national ID is preferred where applicable; however, a tax ID can also be used as an alternative.
        address:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Address'
          title: address
        gov_id_image_front:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Document'
          title: gov_id_image_front
        has_ownership:
          type: boolean
          title: has_ownership
          description: True if this person has at least 25% ownership of the business
        has_control:
          type: boolean
          title: has_control
          description: True if this is the control person of the company, having significant responsibility to control, manage or influence the activities of the business entity. At least one control person must be specified.
        is_signer:
          type: boolean
          title: is_signer
          description: True if this person is able to authorize transactions on behalf of the business. At least one signer must be specified.
        relationship_established_at:
          type: string
          title: relationship_established_at
          description: When the beneficial owner relationship was established in format yyyy-mm-dd
        control_person_title:
          type: string
          title: control_person_title
          maxLength: 100
          minLength: 2
          description: Title of this person
        gov_id_image_back:
          oneOf:
          - $ref: '#/components/schemas/bastion.common.Document'
          - type: 'null'
          title: gov_id_image_back
          description: Back side of the government issued ID. Required for all document types except for passports.
      title: UltimateBeneficialOwner
      required:
      - first_name
      - last_name
      - birth_date
      - email
      - phone
      - tax_identification_number
      - address
      - gov_id_image_front
      - has_ownership
      - has_control
      - is_signer
      - relationship_established_at
      - control_person_title
      additionalProperties: false
      description: Ultimate Beneficial Owner (UBO) of the business
    bastion.api.v2.UpdateComplianceDataRequest:
      type: object
      properties:
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier of the identity whose compliance data is to be updated
        update_reason:
          allOf:
          - $ref: '#/components/schemas/bastion.common.UpdateReason'
          title: update_reason
          description: Reason for the compliance data update
        update_data:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.ComplianceUpdateData'
          description: The compliance data to update
        request_id:
          type: string
          title: request_id
          pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
          format: uuid
          description: Client-provided request identifier in UUID format. Serves as an idempotency key.
      title: UpdateComplianceDataRequest
      required:
      - update_reason
      - request_id
      additionalProperties: false
    bastion.api.v2.UpdateComplianceDataResponse:
      type: object
      title: UpdateComplianceDataResponse
      additionalProperties: false
    bastion.api.v2.Webhook:
      type: object
      properties:
        id:
          type: string
          title: id
          description: The unique identifier of the webhook
          readOnly: true
        url:
          type: string
          title: url
          description: The URL to send webhook events to
          readOnly: true
        label:
          type: string
          title: label
          description: A friendly label to associate with the webhook registration
          readOnly: true
        created_at:
          type: string
          title: created_at
          description: The date and time the webhook was created
          readOnly: true
        status:
          type: string
          title: status
          description: The status of the webhook
          readOnly: true
        signing_key_id:
          type: string
          title: signing_key_id
          description: "KSUID of the endpoint's active signing key. Empty when the endpoint has not\n opted into signing."
          readOnly: true
        signing_key_created_at:
          allOf:
          - $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: signing_key_created_at
          description: The time the active signing key was created.
          readOnly: true
        previous_key_expires_at:
          allOf:
          - $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: previous_key_expires_at
          description: "The time the previous key stops being valid. Present only during the\n rotation overlap window."
          readOnly: true
      title: Webhook
      additionalProperties: false
    bastion.api.v2.conversions.Conversion:
      type: object
      properties:
        id:
          type: string
          title: id
          description: "Server-generated unique conversion ID (KSUID). This is the canonical\n transaction identifier; use it on end-user receipts and references."
          readOnly: true
        request_id:
          type: string
          title: request_id
          pattern: '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}'
          format: uuid
          description: "Client-provided request_id (UUID). Idempotency key for internal\n reconciliation only; do not surface on end-user receipts — use `id`."
        amount:
          type: string
          title: amount
          description: Amount in source currency.
        account_id:
          type: string
          title: account_id
          description: Account ID debited for the conversion
        payment_purpose:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.PaymentPurpose'
          title: payment_purpose
          description: Purpose of the payment. See [Payment purposes](/v2/api-reference/conversions/payment-purposes) for each value's meaning and how to choose one.
        source:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionSource'
          title: source
          description: Source configuration
        destination:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionDestination'
          title: destination
          description: Destination configuration
        type:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionType'
          title: type
          description: Inferred conversion type
          readOnly: true
        status:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionStatus'
          title: status
          description: Current external status of the conversion
          readOnly: true
        created_at:
          type: string
          title: created_at
          description: Time the conversion was created, as an RFC 3339 timestamp.
          readOnly: true
        updated_at:
          type: string
          title: updated_at
          description: Time the conversion was last updated, as an RFC 3339 timestamp.
          readOnly: true
        completed_at:
          type: string
          title: completed_at
          description: Timestamp for when conversion reached terminal COMPLETED status.
          readOnly: true
        exchange_rate:
          type: string
          title: exchange_rate
          description: The exchange rate applied to the conversion.
          readOnly: true
        fees_total:
          type: string
          title: fees_total
          description: Rolled-up total of all fees visible to the end user.
          readOnly: true
        destination_currency:
          type: string
          title: destination_currency
          description: 'Deprecated: use `destination.currency` instead.'
          readOnly: true
          deprecated: true
        fees:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.conversions.Fee'
          title: fees
          description: Itemized fee breakdown.
          readOnly: true
        fee_model:
          allOf:
          - $ref: '#/components/schemas/bastion.common.FeeModel'
          title: fee_model
          description: "Fee model applied to this conversion. DEDUCTED deducts fees from the source\n amount. ON_TOP adds fees on top of the quoted source amount."
          readOnly: true
        fees_total_currency:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionCurrency'
          title: fees_total_currency
          description: Currency that fees_total is expressed in.
          readOnly: true
        quote_id:
          type: string
          title: quote_id
          description: Quote referenced on submit.
          readOnly: true
        failure_reason:
          type:
          - string
          - 'null'
          title: failure_reason
          description: "Human-readable reason when the conversion failed, was canceled, or was\n returned. Omitted when unset."
          readOnly: true
        failure_details:
          oneOf:
          - $ref: '#/components/schemas/bastion.common.FailureDetails'
          - type: 'null'
          title: failure_details
          description: "Structured cause when status is FAILED. Omitted when the cause has no\n published type."
          readOnly: true
        refund_details:
          oneOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.RefundDetails'
          - type: 'null'
          title: refund_details
          description: Present only when status is RETURNED.
          readOnly: true
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier of the identity that owns the account.
          readOnly: true
      title: Conversion
      required:
      - request_id
      - amount
      - account_id
      - payment_purpose
      - source
      - destination
      additionalProperties: false
    bastion.api.v2.conversions.ConversionCurrency:
      type: string
      title: ConversionCurrency
      enum:
      - CONVERSION_CURRENCY_UNSPECIFIED
      - USDC
      - USD
      - MXN
      - INR
      - KRW
      - USDT
      - GHS
      - EUR
      - JPY
      - PHP
      - IDR
      - THB
      - MYR
      - SGD
      - BRL
      - HNL
      - GBP
      - COP
      - GTQ
      - KES
      - BOB
      - EGP
      - JMD
      - CLP
      - ARS
      - PEN
      - PKR
      - CRC
      - DOP
      - CAD
      - ZAR
      - AUD
      - AED
      - SAR
      - ILS
      - QAR
      - JOD
      description: "Currency of a conversion.\n The currency can be a stablecoin or a fiat currency."
      example: USDC
    bastion.api.v2.conversions.ConversionDestination:
      type: object
      properties:
        currency:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionCurrency'
          title: currency
          description: Currency of the destination (e.g., USD for off-ramp, USDC or USDT for on-ramp)
        payment_method:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.PaymentMethod'
          title: payment_method
          description: 'Transfer mechanism: BLOCKCHAIN, WIRE, ACH.'
        chain:
          oneOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          - type: 'null'
          title: chain
          description: "Blockchain network. Required when payment_method = BLOCKCHAIN.\n e.g., SOLANA_MAINNET, ETHEREUM_MAINNET, BASE_MAINNET.\n Omitted for fiat destinations."
        payment_instructions_id:
          type: string
          title: payment_instructions_id
          description: "Required when destination is fiat: the ID of the pre-registered\n payment instructions for receiving fiat."
        amount:
          type:
          - string
          - 'null'
          title: amount
          description: Amount delivered in destination currency.
          readOnly: true
        country:
          oneOf:
          - $ref: '#/components/schemas/bastion.common.Country'
          - type: 'null'
          title: country
          description: Destination country (ISO 3166-1 alpha-2). Populated for fiat off-ramps.
          readOnly: true
      title: ConversionDestination
      required:
      - currency
      - payment_method
      additionalProperties: false
      description: Destination of the conversion
    bastion.api.v2.conversions.ConversionRequest:
      type: object
      properties:
        request_id:
          type: string
          title: request_id
          pattern: '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}'
          format: uuid
          description: Request identifier in UUID format. Serves as an idempotency key.
        amount:
          type: string
          title: amount
          description: Amount to be converted in source currency. Maximum 6 decimal places.
        account_id:
          type: string
          title: account_id
          description: Account ID to debit for the conversion.
        payment_purpose:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.PaymentPurpose'
          title: payment_purpose
          description: Purpose of the payment. See [Payment purposes](/v2/api-reference/conversions/payment-purposes) for each value's meaning and how to choose one.
        source:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionSource'
          title: source
          description: Source of the conversion
        destination:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionDestination'
          title: destination
          description: Destination of the conversion
        quote_id:
          type: string
          title: quote_id
          description: "Quote ID from a prior GET /v2/conversions/quotes response. Required for\n non-US off-ramp conversions. US destinations can omit quote_id."
        device_signals:
          oneOf:
          - $ref: '#/components/schemas/bastion.common.DeviceSignals'
          - type: 'null'
          title: device_signals
          description: Signals about the device initiating the conversion
      title: ConversionRequest
      required:
      - request_id
      - amount
      - account_id
      - payment_purpose
      - source
      - destination
      additionalProperties: false
    bastion.api.v2.conversions.ConversionResponse:
      type: object
      properties:
        conversion:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.Conversion'
          title: conversion
      title: ConversionResponse
      additionalProperties: false
    bastion.api.v2.conversions.ConversionSource:
      type: object
      properties:
        currency:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionCurrency'
          title: currency
          description: Currency of the source (e.g., USDC or USDT for off-ramp, USD for on-ramp)
        payment_method:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.PaymentMethod'
          title: payment_method
          description: 'Transfer mechanism: BLOCKCHAIN, WIRE, ACH.'
        chain:
          oneOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          - type: 'null'
          title: chain
          description: "Blockchain network. Required when payment_method = BLOCKCHAIN.\n e.g., SOLANA_MAINNET, ETHEREUM_MAINNET, BASE_MAINNET.\n Omitted for fiat sources."
        amount:
          type:
          - string
          - 'null'
          title: amount
          description: Amount in source currency.
          readOnly: true
        total:
          type:
          - string
          - 'null'
          title: total
          description: All-in wallet debit in source currency (principal plus fees where applicable).
          readOnly: true
      title: ConversionSource
      required:
      - currency
      - payment_method
      additionalProperties: false
      description: Source of the conversion
    bastion.api.v2.conversions.ConversionStatus:
      type: string
      title: ConversionStatus
      enum:
      - CONVERSION_STATUS_UNSPECIFIED
      - INITIATED
      - PROCESSING
      - PAYOUT_INITIATED
      - PAYOUT_COMPLETED
      - COMPLETED
      - FAILED
      - CANCELLED
      - RETURNED
      description: Current external status of the conversion.
      example: INITIATED
    bastion.api.v2.conversions.ConversionType:
      type: string
      title: ConversionType
      enum:
      - CONVERSION_TYPE_UNSPECIFIED
      - ON_RAMP
      - OFF_RAMP
      description: Inferred type of the conversion.
      example: ON_RAMP
    bastion.api.v2.conversions.DepositInstructions:
      type: object
      properties:
        amount:
          type: string
          title: amount
          description: Amount to be deposited
        currency:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionCurrency'
          title: currency
          description: Currency of the fiat transaction
        bank_name:
          type: string
          title: bank_name
          description: Name of the bank
        bank_address:
          type: string
          title: bank_address
          description: Address of the bank
        payment_method:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.PaymentMethod'
          title: payment_method
          description: Payment method for the transaction
        deposit_message:
          type: string
          title: deposit_message
          description: Deposit message
        bank_account_number:
          type: string
          title: bank_account_number
          description: Bank account number
        bank_routing_number:
          type: string
          title: bank_routing_number
          description: Bank routing number
        bank_beneficiary_name:
          type: string
          title: bank_beneficiary_name
          description: Name of the bank beneficiary
        bank_beneficiary_address:
          type: string
          title: bank_beneficiary_address
          description: Address of the bank beneficiary
      title: DepositInstructions
      additionalProperties: false
      description: Bank details for funding a virtual account.
    bastion.api.v2.conversions.Fee:
      type: object
      properties:
        amount:
          type: string
          title: amount
          description: Fee amount as a decimal string (e.g. "2.50").
        currency:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionCurrency'
          title: currency
          description: Currency the fee is denominated in.
        type:
          allOf:
          - $ref: '#/components/schemas/bastion.common.FeeType'
          title: type
          description: Category of the fee (e.g. platform fee).
        fee_percent:
          type:
          - string
          - 'null'
          title: fee_percent
          description: Percentage rate on the DEVELOPER line (informational; omitted on PLATFORM).
          readOnly: true
      title: Fee
      additionalProperties: false
      description: Individual fee line item on a conversion.
    bastion.api.v2.conversions.GetConversionRequest:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Conversion identifier.
      title: GetConversionRequest
      required:
      - id
      additionalProperties: false
    bastion.api.v2.conversions.GetQuoteRequest:
      type: object
      anyOf:
      - type: object
        properties:
          destination_amount:
            type: string
            title: destination_amount
            description: Amount of destination fiat the recipient should receive.
        title: destination_amount
      - type: object
        properties:
          source_amount:
            type: string
            title: source_amount
            description: Amount of source currency (USDC or USDT) to convert.
        title: source_amount
      - type: object
        properties:
          source_total_max:
            type: string
            title: source_total_max
            description: "Max all-in source debit (wallet budget). Bastion returns the largest\n source.amount whose source.total fits the budget. ON_TOP only."
        title: source_total_max
      unevaluatedProperties: false
      not:
        allOf:
        - anyOf:
          - required:
            - destination_amount
          - required:
            - source_amount
          - required:
            - source_total_max
        - not:
            oneOf:
            - required:
              - destination_amount
            - required:
              - source_amount
            - required:
              - source_total_max
      properties:
        source_currency:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionCurrency'
          title: source_currency
          description: Source asset currency. Must be USDC or USDT.
        source_chain:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          title: source_chain
          description: Source blockchain network. e.g., SOLANA_MAINNET, ETHEREUM_MAINNET, BASE_MAINNET.
        destination_currency:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionCurrency'
          title: destination_currency
          description: Destination fiat currency. e.g., MXN, INR.
        destination_country:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Country'
          title: destination_country
          description: "Destination country (ISO 3166-1 alpha-2). Must form a supported corridor\n with destination_currency and payment_method."
        payment_method:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.PaymentMethod'
          title: payment_method
          description: Payment rail. Must match an enabled corridor for the destination country.
        developer_fee_percent:
          type:
          - string
          - 'null'
          title: developer_fee_percent
          description: "Developer fee percent override in [0, 100] with at most 6 fractional digits.\n The value is a decimal string. Omit to use the configured developer fee\n policy for the app."
      required:
      - source_currency
      - source_chain
      - destination_currency
      - destination_country
      - payment_method
      description: Indicative pricing for an off-ramp conversion. Returned by GetQuote.
    bastion.api.v2.conversions.PaymentMethod:
      type: string
      title: PaymentMethod
      enum:
      - PAYMENT_METHOD_UNSPECIFIED
      - BLOCKCHAIN
      - WIRE
      - ACH
      - SPEI
      - IMPS_FIRC
      - BANK_TRANSFER
      - SEPA
      - PIX
      - TEF
      - COELSA
      - CCE
      - IBFT
      - SINPE
      - LBTR
      - EFT
      - BECS
      - NPSS
      - MADA
      - ZAHAV
      description: Transfer mechanism for the conversion.
      example: BLOCKCHAIN
    bastion.api.v2.conversions.PaymentPurpose:
      type: string
      title: PaymentPurpose
      enum:
      - PAYMENT_PURPOSE_UNSPECIFIED
      - SALARY_PAYMENT
      - PERSONAL_REMITTANCE
      - RENT_PAYMENT
      - PROPERTY_PURCHASE
      - OWNED_ACCOUNT_ABROAD
      - ADVERTISING_EXPENSES
      - ADVISORY_FEES
      - BUSINESS_INSURANCE
      - CONSTRUCTION
      - DELIVERY_FEES
      - EDUCATION
      - EXPORTS
      - DONATION
      - HOTEL
      - LOAN_PAYMENT
      - MAINTENANCE_EXPENSES
      - MEDICAL_EXPENSE
      - OFFICE_EXPENSES
      - ROYALTY_FEES
      - SERVICE_CHARGE
      - SHARES_INVESTMENT
      - TAX_PAYMENT
      - TRANSPORTATION_FEES
      - TRAVEL
      - UTILITY_BILLS
      - INTERNAL_BUSINESS_MOVEMENT
      description: Purpose of payment. See [Payment purposes](/v2/api-reference/conversions/payment-purposes) for each value's meaning and how to choose one.
      example: SALARY_PAYMENT
    bastion.api.v2.conversions.Quote:
      type: object
      properties:
        exchange_rate:
          type: string
          title: exchange_rate
          description: FX rate applied.
        limits:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.QuoteLimits'
          title: limits
          description: Per-corridor transaction limits.
        source:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.QuoteSource'
          title: source
          description: Source side of the quote.
        destination:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.QuoteDestination'
          title: destination
          description: Destination side of the quote.
        fees_total:
          type: string
          title: fees_total
          description: Total fees as a decimal string.
        fees_total_currency:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionCurrency'
          title: fees_total_currency
          description: Currency that fees_total is denominated in.
        fees:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.conversions.Fee'
          title: fees
          description: Itemized fee breakdown.
        fee_model:
          allOf:
          - $ref: '#/components/schemas/bastion.common.FeeModel'
          title: fee_model
          description: Fee model applied to this quote.
          readOnly: true
        id:
          type: string
          title: id
          description: Bastion quote identifier. Submit as ConversionRequest.quote_id.
          readOnly: true
        locked:
          type: boolean
          title: locked
          description: "When true, exchange_rate is guaranteed until expires_at.\n When false, the exchange rate is indicative and can change between quote and submit.\n This field is always false."
          readOnly: true
        expires_at:
          type: string
          title: expires_at
          description: Quote expiry (RFC 3339). Submit after this time is rejected with QUOTE_EXPIRED.
          readOnly: true
      title: Quote
      additionalProperties: false
      description: "Indicative pricing for an off-ramp conversion. Each quote is persisted.\n Non-US off-ramp submit must send quote_id. US destinations can omit quote_id.\n Quotes are not rate-locked."
    bastion.api.v2.conversions.QuoteDestination:
      type: object
      properties:
        amount:
          type: string
          title: amount
          description: Destination amount as a decimal string (e.g. "410.55").
        currency:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionCurrency'
          title: currency
          description: Destination fiat currency.
        country:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Country'
          title: country
          description: Destination country (ISO 3166-1 alpha-2). Present for fiat destinations.
        payment_method:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.PaymentMethod'
          title: payment_method
          description: Payment rail on the destination side (e.g. SPEI, WIRE, IMPS_FIRC).
      title: QuoteDestination
      additionalProperties: false
      description: 'Destination side of a quote: the fiat being received.'
    bastion.api.v2.conversions.QuoteLimits:
      type: object
      properties:
        min_amount:
          type:
          - string
          - 'null'
          title: min_amount
          description: "Minimum transaction amount for the corridor. May be null upstream; we\n omit the field if not present."
        max_amount:
          type:
          - string
          - 'null'
          title: max_amount
          description: "Maximum transaction amount for the corridor. An empty string means the\n corridor has no upper bound."
        currency:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionCurrency'
          title: currency
          description: Currency the limits are denominated in (typically the destination fiat).
      title: QuoteLimits
      additionalProperties: false
      description: Per-corridor transaction limits passed through from the upstream provider.
    bastion.api.v2.conversions.QuoteResponse:
      type: object
      properties:
        quote:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.Quote'
          title: quote
      title: QuoteResponse
      additionalProperties: false
    bastion.api.v2.conversions.QuoteSource:
      type: object
      properties:
        amount:
          type: string
          title: amount
          description: Source amount as a decimal string (e.g. "25.00").
        currency:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionCurrency'
          title: currency
          description: Source asset currency.
        chain:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          title: chain
          description: Source blockchain network. Present for crypto sources.
        payment_method:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.PaymentMethod'
          title: payment_method
          description: Transfer mechanism for the source side (BLOCKCHAIN for off-ramp).
        total:
          type: string
          title: total
          description: All-in wallet debit in source currency (principal plus fees where applicable).
          readOnly: true
      title: QuoteSource
      additionalProperties: false
      description: 'Source side of a quote: the asset being sent.'
    bastion.api.v2.conversions.RefundDetails:
      type: object
      properties:
        refund_amount:
          type:
          - string
          - 'null'
          title: refund_amount
          description: Amount refunded to the customer, in the source currency.
          readOnly: true
        transaction_hash:
          type:
          - string
          - 'null'
          title: transaction_hash
          description: Cross-app credit transfer (intermediary → customer). Not the inbound Borderless refund hash.
          readOnly: true
        deposit_id:
          type:
          - string
          - 'null'
          title: deposit_id
          description: Identifier of the deposit that was refunded.
          readOnly: true
        failure_details:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.RefundFailureDetails'
          title: failure_details
          description: Details of why the refund failed, when applicable.
          readOnly: true
      title: RefundDetails
      additionalProperties: false
    bastion.api.v2.conversions.RefundFailureDetails:
      type: object
      properties:
        type:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.RefundFailureType'
          title: type
          description: Category of the refund failure.
          readOnly: true
        description:
          type:
          - string
          - 'null'
          title: description
          description: Human-readable explanation of the refund failure.
          readOnly: true
      title: RefundFailureDetails
      additionalProperties: false
    bastion.api.v2.conversions.RefundFailureType:
      type: string
      title: RefundFailureType
      enum:
      - REFUND_FAILURE_TYPE_UNSPECIFIED
      - REFUND_FAILURE_TYPE_BANK_REJECTED
      - REFUND_FAILURE_TYPE_EXPIRED
      - REFUND_FAILURE_TYPE_DATA_MISSING
      - REFUND_FAILURE_TYPE_OTHER
      - REFUND_FAILURE_TYPE_PAYOUT_RETURNED
      description: Structured failure category on RETURNED conversions.
      example: REFUND_FAILURE_TYPE_BANK_REJECTED
    bastion.api.v2.cryptocurrency.GetRawTransactionRequest:
      type: object
      properties:
        raw_transaction_id:
          type: string
          title: raw_transaction_id
          description: Unique identifier of the raw transaction
      title: GetRawTransactionRequest
      required:
      - raw_transaction_id
      additionalProperties: false
    bastion.api.v2.cryptocurrency.GetRawTransactionResponse:
      type: object
      properties:
        raw_transaction:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.RawTransaction'
      title: GetRawTransactionResponse
      additionalProperties: false
    bastion.api.v2.cryptocurrency.GetTransferRequest:
      type: object
      properties:
        transfer_id:
          type: string
          title: transfer_id
          description: Unique identifier of the cryptocurrency transfer
      title: GetTransferRequest
      required:
      - transfer_id
      additionalProperties: false
    bastion.api.v2.cryptocurrency.GetTransferResponse:
      type: object
      properties:
        transfer:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.Transfer'
          title: transfer
      title: GetTransferResponse
      additionalProperties: false
    bastion.api.v2.cryptocurrency.ListTransfersV2Request:
      type: object
      properties:
        limit:
          type: integer
          title: limit
          maximum: 25
          minimum: 1
          format: int32
          description: The maximum number of cryptocurrency transfers to return in a single page. The maximum value that can be specified is 25.
          default: '10'
        cursor:
          type: string
          title: cursor
          description: Pagination cursor to be used in subsequent queries to retrieve next page of results
        account_id:
          type: string
          title: account_id
          description: Unique identifier of the account to filter transfers by
      title: ListTransfersV2Request
      required:
      - account_id
      additionalProperties: false
    bastion.api.v2.cryptocurrency.ListTransfersV2Response:
      type: object
      properties:
        transfers:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.Transfer'
          title: transfers
        cursor:
          type: string
          title: cursor
          description: Pagination cursor to be used in subsequent queries to retrieve next page of results. If this field is omitted, there are no subsequent pages.
      title: ListTransfersV2Response
      additionalProperties: false
    bastion.api.v2.cryptocurrency.PreflightCheck:
      type: string
      title: PreflightCheck
      enum:
      - PREFLIGHT_CHECK_UNSPECIFIED
      - PREFLIGHT_CHECK_BALANCE
      description: PreflightCheck names a validation that can run synchronously at submit time.
      example: PREFLIGHT_CHECK_BALANCE
    bastion.api.v2.cryptocurrency.RawEip1559Transaction:
      type: object
      properties:
        to:
          type: string
          title: to
          description: Recipient or contract address, 0x-prefixed
        value:
          type: string
          title: value
          description: Amount of the chain's base asset to send, in wei, as a decimal string
        data:
          type: string
          title: data
          description: Calldata, 0x-prefixed hex. Omit for a plain value transfer.
        gas_limit:
          type: string
          title: gas_limit
          description: "Gas limit, as a decimal string. Omit it and Bastion estimates it from the account's address, without fees,\n and refuses a transaction that reverts or that sends more than the account holds. Setting it skips those\n checks: set it to sign a transaction that depends on another not yet mined, or for a contract whose gas use\n depends on the gas price. Must be empty in SIGN_AND_SUBMIT mode."
        max_fee_per_gas:
          type: string
          title: max_fee_per_gas
          description: "Maximum total fee per gas, in wei, as a decimal string. Set it with max_priority_fee_per_gas, or omit both and\n Bastion estimates them. Must be empty in SIGN_AND_SUBMIT mode."
        max_priority_fee_per_gas:
          type: string
          title: max_priority_fee_per_gas
          description: "Maximum priority fee per gas, in wei, as a decimal string. Set it with max_fee_per_gas, or omit both and\n Bastion estimates them. Must be empty in SIGN_AND_SUBMIT mode."
        nonce:
          type: string
          title: nonce
          description: "Account nonce, as a decimal string. It must not be below the account's confirmed nonce on chain. Omit it and\n Bastion uses the account's next nonce as seen by its node, counting transactions waiting to be mined. Signing\n does not reserve a nonce: to sign several transactions before broadcasting them, or to replace one still\n waiting to be mined, set each nonce. Must be empty in SIGN_AND_SUBMIT mode."
      title: RawEip1559Transaction
      required:
      - to
      additionalProperties: false
    bastion.api.v2.cryptocurrency.RawLegacyTransaction:
      type: object
      properties:
        to:
          type: string
          title: to
          description: Recipient or contract address, 0x-prefixed
        value:
          type: string
          title: value
          description: Amount of the chain's base asset to send, in wei, as a decimal string
        data:
          type: string
          title: data
          description: Calldata, 0x-prefixed hex. Omit for a plain value transfer.
        gas_limit:
          type: string
          title: gas_limit
          description: "Gas limit, as a decimal string. Omit it and Bastion estimates it from the account's address, without fees,\n and refuses a transaction that reverts or that sends more than the account holds. Setting it skips those\n checks: set it to sign a transaction that depends on another not yet mined, or for a contract whose gas use\n depends on the gas price."
        gas_price:
          type: string
          title: gas_price
          description: "Gas price, in wei, as a decimal string. Omit it and Bastion sets twice the network's gas price plus a priority\n fee, the cap it would set as max_fee_per_gas, which a legacy transaction pays in full."
        nonce:
          type: string
          title: nonce
          description: "Account nonce, as a decimal string. It must not be below the account's confirmed nonce on chain. Omit it and\n Bastion uses the account's next nonce as seen by its node, counting transactions waiting to be mined. Signing\n does not reserve a nonce: to sign several transactions before broadcasting them, or to replace one still\n waiting to be mined, set each nonce."
      title: RawLegacyTransaction
      required:
      - to
      additionalProperties: false
      description: A legacy (pre-EIP-1559) transaction. Only SIGN_ONLY mode accepts it.
    bastion.api.v2.cryptocurrency.RawTransaction:
      type: object
      anyOf:
      - type: object
        properties:
          eip1559_transaction:
            allOf:
            - $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.RawEip1559Transaction'
            title: eip1559_transaction
        title: eip1559_transaction
      - type: object
        properties:
          legacy_transaction:
            allOf:
            - $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.RawLegacyTransaction'
            title: legacy_transaction
        title: legacy_transaction
      unevaluatedProperties: false
      not:
        allOf:
        - anyOf:
          - required:
            - eip1559_transaction
          - required:
            - legacy_transaction
        - not:
            oneOf:
            - required:
              - eip1559_transaction
            - required:
              - legacy_transaction
      properties:
        id:
          type: string
          title: id
          description: Unique identifier of the raw transaction
          readOnly: true
        request_id:
          type: string
          title: request_id
          description: Request identifier supplied at creation
        account_id:
          type: string
          title: account_id
          description: Account whose wallet signs the transaction
        chain:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          title: chain
          description: Chain the transaction is for
        mode:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.RawTransaction.Mode'
          title: mode
          description: Mode supplied at creation
        status:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.RawTransaction.Status'
          title: status
          readOnly: true
        preview:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.RawTransactionPreview'
          title: preview
          readOnly: true
        from_address:
          type: string
          title: from_address
          description: Address that signs and sends the transaction
          readOnly: true
        nonce:
          type: string
          title: nonce
          description: Nonce the transaction was signed at, as a decimal string; empty until signed
          readOnly: true
        gas_limit:
          type: string
          title: gas_limit
          description: Gas limit the transaction was signed with, as a decimal string; empty until signed
          readOnly: true
        max_fee_per_gas:
          type: string
          title: max_fee_per_gas
          description: "Maximum total fee per gas the transaction was signed with, in wei, as a decimal string. Empty until signed and\n for a legacy transaction."
          readOnly: true
        max_priority_fee_per_gas:
          type: string
          title: max_priority_fee_per_gas
          description: "Maximum priority fee per gas the transaction was signed with, in wei, as a decimal string. Empty until signed\n and for a legacy transaction."
          readOnly: true
        gas_price:
          type: string
          title: gas_price
          description: "Gas price the transaction was signed with, in wei, as a decimal string. Empty until signed and for an EIP-1559\n transaction."
          readOnly: true
        transaction_hash:
          type: string
          title: transaction_hash
          description: "Hash of the signed transaction; empty until signed. For a CANCELED transaction, the hash of the transaction\n that canceled it."
          readOnly: true
        failure_reason:
          type: string
          title: failure_reason
          description: Why the transaction failed; set only when status is FAILED
          readOnly: true
        created_at:
          type: string
          title: created_at
          readOnly: true
        updated_at:
          type: string
          title: updated_at
          readOnly: true
        signed_transaction:
          type: string
          title: signed_transaction
          description: "Signed transaction, 0x-prefixed, ready for eth_sendRawTransaction. Returned by Submit Raw Transaction in\n SIGN_ONLY mode; empty in SIGN_AND_SUBMIT mode, where Bastion broadcasts it."
          readOnly: true
    bastion.api.v2.cryptocurrency.RawTransaction.Mode:
      type: string
      title: Mode
      enum:
      - MODE_UNSPECIFIED
      - SIGN_ONLY
      - SIGN_AND_SUBMIT
      description: "What Bastion does with a raw transaction.\n\n - `SIGN_ONLY`: Sign it and return the signed transaction for you to broadcast.\n - `SIGN_AND_SUBMIT`: Pick the nonce, gas limit, and fees, sign, broadcast, and track the transaction until it\n   reaches a final status. Poll Get Raw Transaction to follow it. Takes only an EIP-1559 transaction with the\n   nonce, gas limit, and fee fields empty."
      example: SIGN_ONLY
    bastion.api.v2.cryptocurrency.RawTransaction.Status:
      type: string
      title: Status
      enum:
      - STATUS_UNSPECIFIED
      - CREATED
      - SIGNED
      - SUBMITTED
      - CONFIRMED
      - FAILED
      - CANCELED
      description: "Status of a raw transaction.\n\n - `STATUS_UNSPECIFIED`: Not known yet; keep polling.\n - `CREATED`: Stored, but not yet signed or broadcast. In SIGN_ONLY mode, signing did not complete: retry the\n   request with the same request_id. In SIGN_AND_SUBMIT mode, Bastion is preparing to broadcast it.\n - `SIGNED`: Signed. SIGN_ONLY mode only: Bastion does not broadcast, so the transaction stays SIGNED.\n - `SUBMITTED`: SIGN_AND_SUBMIT mode only. Broadcast and waiting to be mined.\n - `CONFIRMED`: SIGN_AND_SUBMIT mode only. Mined and succeeded. Final.\n - `FAILED`: SIGN_AND_SUBMIT mode only. Mined and reverted, or never mined: it could not be signed or\n   broadcast, or another transaction used its nonce. failure_reason says which. Final.\n - `CANCELED`: SIGN_AND_SUBMIT mode only. The transaction was stuck, so Bastion mined an empty transaction at\n   its nonce in its place. It will never run. Final.\n\n New statuses may be added; treat an unknown value as not yet final."
      example: CREATED
    bastion.api.v2.cryptocurrency.RawTransactionPreview:
      type: object
      properties:
        will_revert:
          type: boolean
          title: will_revert
          description: True when estimating the transaction from the account's address reverts
        revert_reason:
          type: string
          title: revert_reason
        gas_estimate:
          type: string
          title: gas_estimate
          description: Estimated gas, as a decimal string
      title: RawTransactionPreview
      additionalProperties: false
      description: "What the transaction is expected to do, estimated from the account's address before signing. Informational\n only: it never blocks signing."
    bastion.api.v2.cryptocurrency.SubmitCryptocurrencyTransferV2Envelope:
      type: object
      properties:
        transfer:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.SubmitCryptocurrencyTransferV2Request'
          description: "The transfer to submit. Sent as the request body.\n Kept as its own message so persisted approval payloads keep decoding."
        preflight_checks:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.PreflightCheck'
          title: preflight_checks
          description: "Checks to run synchronously before the transfer is accepted, trading a\n little request latency for an immediate error instead of an asynchronous\n failure. Sent as a repeated query parameter; omitting it preserves\n existing behavior. A value outside the list below refuses the request."
      title: SubmitCryptocurrencyTransferV2Envelope
      required:
      - transfer
      additionalProperties: false
    bastion.api.v2.cryptocurrency.SubmitCryptocurrencyTransferV2Request:
      type: object
      anyOf:
      - type: object
        properties:
          account_destination:
            allOf:
            - $ref: '#/components/schemas/bastion.common.AccountDestination'
            title: account_destination
            description: Internal Bastion account destination for P2P transfers
        title: account_destination
      - type: object
        properties:
          address_destination:
            allOf:
            - $ref: '#/components/schemas/bastion.common.AddressDestination'
            title: address_destination
            description: External blockchain address destination
        title: address_destination
      unevaluatedProperties: false
      not:
        allOf:
        - anyOf:
          - required:
            - account_destination
          - required:
            - address_destination
        - not:
            oneOf:
            - required:
              - account_destination
            - required:
              - address_destination
      properties:
        request_id:
          type: string
          title: request_id
          pattern: '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}'
          format: uuid
          description: Request identifier in a UUID format. Serves as an idempotency key.
        account_id:
          type: string
          title: account_id
          description: Unique identifier of the account transferring the cryptocurrency
        currency_symbol:
          type: string
          title: currency_symbol
          description: Symbol or ticker of the cryptocurrency to send
        amount:
          type: string
          title: amount
          description: 'Amount to send in the asset currency''s default unit (ex: Ether for ETH)'
        destination_address:
          type: string
          title: destination_address
          description: "Deprecated: use `address_destination` instead.\n\n Address of the recipient to receive the cryptocurrency."
          deprecated: true
        destination_chain:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          title: destination_chain
          description: "Deprecated: use `address_destination` instead.\n\n Chain identifier for the cryptocurrency transaction."
          deprecated: true
        priority:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Priority'
          title: priority
          description: "Optional inclusion priority for the cryptocurrency transfer transaction. Higher priority results in faster confirmation times but higher gas fee spend.\n\n > ⚠️ **Transaction Priority**\n >\n > Setting a higher priority expedites your transaction by increasing the gas price used to submit the transaction.\n >\n > Please note, however, that high-priority transfers may be delayed if the account has pending lower-priority transactions that must be processed first in sequence."
          deprecated: true
        validate_only:
          type: boolean
          title: validate_only
          description: "If true, only validates the request without executing the transfer.\n When set, all validations are run but no transfer is submitted."
        device_signals:
          oneOf:
          - $ref: '#/components/schemas/bastion.common.DeviceSignals'
          - type: 'null'
          title: device_signals
          description: Signals about the device initiating the transfer
      required:
      - request_id
      - account_id
      - currency_symbol
      - amount
    bastion.api.v2.cryptocurrency.SubmitCryptocurrencyTransferV2Response:
      type: object
      properties:
        id:
          type: string
          title: id
        request_id:
          type: string
          title: request_id
      title: SubmitCryptocurrencyTransferV2Response
      additionalProperties: false
    bastion.api.v2.cryptocurrency.SubmitRawTransactionRequest:
      type: object
      anyOf:
      - type: object
        properties:
          eip1559_transaction:
            allOf:
            - $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.RawEip1559Transaction'
            title: eip1559_transaction
        title: eip1559_transaction
      - type: object
        properties:
          legacy_transaction:
            allOf:
            - $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.RawLegacyTransaction'
            title: legacy_transaction
        title: legacy_transaction
      unevaluatedProperties: false
      not:
        allOf:
        - anyOf:
          - required:
            - eip1559_transaction
          - required:
            - legacy_transaction
        - not:
            oneOf:
            - required:
              - eip1559_transaction
            - required:
              - legacy_transaction
      properties:
        request_id:
          type: string
          title: request_id
          pattern: '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}'
          format: uuid
          description: Request identifier in a UUID format. Serves as an idempotency key.
        account_id:
          type: string
          title: account_id
          description: Account whose wallet signs the transaction
        chain:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          title: chain
          description: Testnet chain the transaction is for. The chain ID in the signed transaction is derived from this value.
        mode:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.RawTransaction.Mode'
          title: mode
          description: "What Bastion does with the transaction: SIGN_ONLY returns it signed for you to broadcast; SIGN_AND_SUBMIT\n broadcasts it for you."
      required:
      - request_id
      - account_id
      - chain
      - mode
    bastion.api.v2.cryptocurrency.SubmitRawTransactionResponse:
      type: object
      properties:
        raw_transaction:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.RawTransaction'
      title: SubmitRawTransactionResponse
      additionalProperties: false
    bastion.api.v2.cryptocurrency.Transfer:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier of the cryptocurrency transfer
        request_id:
          type: string
          title: request_id
          pattern: '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}'
          format: uuid
          description: Request identifier in a UUID format. Serves as an idempotency key.
        account_id:
          type: string
          title: account_id
          description: Unique identifier of the account transferring the cryptocurrency
        account_address:
          type: string
          title: account_address
          description: Address of the account transferring the cryptocurrency
        currency_symbol:
          type: string
          title: currency_symbol
          description: Symbol or ticker of the cryptocurrency to send
        amount:
          type: string
          title: amount
          description: 'Amount to send in the asset currency''s default unit (ex: Ether for ETH)'
        destination_address:
          type: string
          title: destination_address
          description: Address of the recipient to receive the cryptocurrency
        destination_chain:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          title: destination_chain
          description: Chain identifier for the cryptocurrency transaction
        status:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.TransferStatus'
          title: status
          description: "Status of a cryptocurrency transfer as it moves through the processing pipeline.\n\n - `TRANSFER_STATUS_UNSPECIFIED`: Default value, should not be used.\n - `ACCEPTED`: The transfer request has been received and validated, but has not yet been batched or submitted to the blockchain.\n - `SUBMITTED`: The transfer has been submitted to the blockchain and is awaiting confirmation.\n - `CONFIRMED`: The transfer has been confirmed on the blockchain. This is a terminal status.\n - `FAILED`: The transfer has failed. Check the failureDetails field for more information. This is a terminal status.\n - `DROPPED`: The transfer has been dropped. This is a terminal status."
        created_at:
          type: string
          title: created_at
          description: Timestamp when the cryptocurrency transfer was created
        updated_at:
          type: string
          title: updated_at
          description: Timestamp when the cryptocurrency transfer was last updated
        transaction_hash:
          type: string
          title: transaction_hash
          description: Hash of the cryptocurrency transaction
        completed_at:
          type: string
          title: completed_at
          description: Timestamp when the cryptocurrency transfer was completed
        failure_details:
          allOf:
          - $ref: '#/components/schemas/bastion.common.FailureDetails'
          title: failure_details
          description: Details of the failure if the transfer is not successful.
        events:
          type: array
          items:
            $ref: '#/components/schemas/bastion.common.ContractEvent'
          title: events
          description: Contract events emitted by the transaction.
        destination_type:
          allOf:
          - $ref: '#/components/schemas/bastion.common.DestinationType'
          title: destination_type
          description: Type of destination for this transfer (ON_CHAIN for external, ACCOUNT for internal P2P).
        destination_account_id:
          type: string
          title: destination_account_id
          description: Unique identifier of the destination account, populated when destination_type is ACCOUNT.
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier of the identity that owns the sending account.
          readOnly: true
      title: Transfer
      required:
      - id
      - request_id
      - account_id
      - account_address
      - currency_symbol
      - amount
      - destination_address
      - destination_chain
      - status
      - created_at
      - updated_at
      - transaction_hash
      - completed_at
      additionalProperties: false
    bastion.api.v2.cryptocurrency.TransferStatus:
      type: string
      title: TransferStatus
      enum:
      - TRANSFER_STATUS_UNSPECIFIED
      - ACCEPTED
      - SUBMITTED
      - CONFIRMED
      - FAILED
      - DROPPED
      - CANCELED
      description: "Status of a cryptocurrency transfer as it moves through the processing pipeline.\n\n - `TRANSFER_STATUS_UNSPECIFIED`: Default value, should not be used.\n - `ACCEPTED`: The transfer request has been received and validated, but has not yet been batched or submitted to the blockchain.\n - `SUBMITTED`: The transfer has been submitted to the blockchain and is awaiting confirmation.\n - `CONFIRMED`: The transfer has been confirmed on the blockchain. This is a terminal status.\n - `FAILED`: The transfer has failed. Check the failureDetails field for more information. This is a terminal status.\n - `DROPPED`: The transfer has been dropped. This is a terminal status.\n - `CANCELED`: The transfer has been explicitly canceled by submitting a 0-value self-transfer. This is a terminal status."
      example: ACCEPTED
    bastion.api.v2.cryptocurrency.deposits.Deposit:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier of the cryptocurrency deposit
        dedup_key:
          type: string
          title: dedup_key
          description: Deduplication key matching the originating webhook event id
        account_id:
          type: string
          title: account_id
          description: Unique identifier of the account that received the deposit
        account_address:
          type: string
          title: account_address
          description: Address of the account that received the deposit
        source_address:
          type: string
          title: source_address
          description: Address that sent the deposit
        source_type:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.deposits.SourceType'
          title: source_type
          description: Source type of the deposit
        currency_symbol:
          type: string
          title: currency_symbol
          description: Symbol or ticker of the deposited cryptocurrency
        amount:
          type: string
          title: amount
          description: 'Amount deposited in the asset currency''s default unit (ex: Ether for ETH)'
        destination_chain:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          title: destination_chain
          description: Chain identifier for the deposit
        transaction_hash:
          type: string
          title: transaction_hash
          description: Transaction hash (EVM) or signature (Solana)
        status:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.deposits.DepositStatus'
          title: status
          description: Status of the deposit
        confirmed_at:
          allOf:
          - $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: confirmed_at
          description: Timestamp when the deposit was considered to be confirmed (ISO 8601)
        created_at:
          allOf:
          - $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: created_at
          description: Timestamp when the on-chain transaction was created (ISO 8601)
        source_account_id:
          type: string
          title: source_account_id
          description: Unique identifier of the source account for account-originated deposits
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier of the identity that owns the receiving account
          readOnly: true
        source_identity_id:
          type: string
          title: source_identity_id
          description: Unique identifier of the identity that owns the source account
          readOnly: true
      title: Deposit
      required:
      - id
      - dedup_key
      - account_id
      - account_address
      - source_address
      - source_type
      - currency_symbol
      - amount
      - destination_chain
      - transaction_hash
      - status
      - confirmed_at
      - created_at
      additionalProperties: false
    bastion.api.v2.cryptocurrency.deposits.DepositStatus:
      type: string
      title: DepositStatus
      enum:
      - DEPOSIT_STATUS_UNSPECIFIED
      - PENDING
      - CONFIRMED
      - FAILED
      description: "Status of a cryptocurrency deposit.\n\n - `STATUS_UNKNOWN`: Default value, should not be used.\n - `PENDING`: The deposit has been detected on-chain but not yet confirmed.\n - `CONFIRMED`: The deposit has been confirmed on the blockchain. This is a terminal status."
      example: PENDING
    bastion.api.v2.cryptocurrency.deposits.GetDepositRequest:
      type: object
      properties:
        deposit_id:
          type: string
          title: deposit_id
          description: Unique identifier of the cryptocurrency deposit
      title: GetDepositRequest
      required:
      - deposit_id
      additionalProperties: false
    bastion.api.v2.cryptocurrency.deposits.GetDepositResponse:
      type: object
      properties:
        deposit:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.deposits.Deposit'
          title: deposit
      title: GetDepositResponse
      additionalProperties: false
    bastion.api.v2.cryptocurrency.deposits.ListDepositsRequest:
      type: object
      properties:
        account_id:
          type: string
          title: account_id
          description: Unique identifier of the account to filter deposits by
        destination_chain:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          title: destination_chain
          description: 'Deprecated: use "chain" instead'
          deprecated: true
        currency_symbol:
          type: string
          title: currency_symbol
          description: Optional currency symbol filter
        start_time:
          allOf:
          - $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: start_time
          description: Optional start time filter (ISO 8601)
        end_time:
          allOf:
          - $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: end_time
          description: Optional end time filter (ISO 8601)
        limit:
          type: integer
          title: limit
          maximum: 25
          minimum: 1
          format: int32
          description: The maximum number of deposits to return. The maximum value that can be specified is 25.
          default: '10'
        cursor:
          type: string
          title: cursor
          description: Pagination cursor to be used in subsequent queries to retrieve the next page of results
        transaction_hash:
          type: string
          title: transaction_hash
          description: Optional filter on the transaction hash (EVM) or signature (Solana) that funded the deposit
        chain:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          title: chain
          description: Optional filter on the chain the deposit was received on
      title: ListDepositsRequest
      required:
      - account_id
      additionalProperties: false
    bastion.api.v2.cryptocurrency.deposits.ListDepositsResponse:
      type: object
      properties:
        deposits:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.cryptocurrency.deposits.Deposit'
          title: deposits
        cursor:
          type: string
          title: cursor
          description: Pagination cursor to be used in subsequent queries to retrieve next page of results. If this field is omitted, there are no subsequent pages.
      title: ListDepositsResponse
      additionalProperties: false
    bastion.api.v2.cryptocurrency.deposits.SourceType:
      type: string
      title: SourceType
      enum:
      - SOURCE_TYPE_UNSPECIFIED
      - ON_CHAIN
      - ACCOUNT
      description: "Source type of a cryptocurrency deposit.\n\n - `SOURCE_TYPE_UNSPECIFIED`: Default value, should not be used.\n - `ON_CHAIN`: The deposit was detected on-chain.\n - `ACCOUNT`: The deposit originated from an internal account."
      example: ON_CHAIN
    bastion.api.v2.institutions.Institution:
      type: object
      properties:
        bank_id:
          type: string
          title: bank_id
          description: Opaque bank identifier. Pass this as bank_id when registering payment instructions.
          readOnly: true
        name:
          type: string
          title: name
          description: Human-readable institution name.
          readOnly: true
      title: Institution
      additionalProperties: false
      description: Institution represents a single bank available for a corridor.
    bastion.api.v2.institutions.ListInstitutionsRequest:
      type: object
      properties:
        country:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Country'
          title: country
          description: ISO 3166-1 alpha-2 country code.
        currency:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.PaymentInstructions.FiatCurrencySymbol'
          title: currency
          description: Fiat currency symbol (e.g. JPY, KRW).
        payment_method:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.PaymentMethod'
          title: payment_method
          description: Payment method for the corridor.
      title: ListInstitutionsRequest
      required:
      - country
      - currency
      - payment_method
      additionalProperties: false
      description: Request for listing supported institutions for a corridor.
    bastion.api.v2.institutions.ListInstitutionsResponse:
      type: object
      properties:
        country:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Country'
          title: country
          description: Country echoed back from the request.
        currency:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.PaymentInstructions.FiatCurrencySymbol'
          title: currency
          description: Currency echoed back from the request.
        payment_method:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.PaymentMethod'
          title: payment_method
          description: Payment method echoed back from the request.
        all_institutions_supported:
          type: boolean
          title: all_institutions_supported
          description: When true, any bank is accepted and institutions is empty.
        institutions:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.institutions.Institution'
          title: institutions
          description: List of supported institutions. Empty when all_institutions_supported is true.
      title: ListInstitutionsResponse
      additionalProperties: false
      description: Response containing supported institutions for a corridor.
    bastion.api.v2.issuance.BankAccount:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier associated with the bank account
          readOnly: true
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier for the identity that this bank account belongs to
          readOnly: true
        bank_account_details:
          allOf:
          - $ref: '#/components/schemas/bastion.common.BankAccountDetails'
          title: bank_account_details
          description: Details of the bank account
          readOnly: true
      title: BankAccount
      additionalProperties: false
    bastion.api.v2.issuance.CreateBankAccountRequest:
      type: object
      properties:
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier of the identity that this bank account belongs to
        bank_account_details:
          allOf:
          - $ref: '#/components/schemas/bastion.common.BankAccountDetails'
          title: bank_account_details
          description: Details of the bank account to be registered
        request_id:
          type: string
          title: request_id
          pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
          format: uuid
          description: 'Request identifier in a UUID format. Serves as an idempotency key: retries with the same value return the original bank account. Will become required.'
      title: CreateBankAccountRequest
      required:
      - identity_id
      - bank_account_details
      additionalProperties: false
    bastion.api.v2.issuance.CreateBankAccountResponse:
      type: object
      properties:
        bank_account:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.BankAccount'
          title: bank_account
      title: CreateBankAccountResponse
      additionalProperties: false
    bastion.api.v2.issuance.CreateMintDestinationAddressRequest:
      type: object
      properties:
        request_id:
          type: string
          title: request_id
          pattern: '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}'
          format: uuid
          description: Request identifier in a UUID format. Serves as an idempotency key.
        address:
          type: string
          title: address
          description: Mint destination address
        chain:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.ISSUANCE_SUPPORTED_CHAIN'
          title: chain
          description: Blockchain network for the mint destination address
        label:
          type: string
          title: label
          description: Label for the mint destination address
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier of the identity that this mint address belongs to
      title: CreateMintDestinationAddressRequest
      required:
      - request_id
      - address
      - chain
      - label
      - identity_id
      additionalProperties: false
    bastion.api.v2.issuance.CreateMintDestinationAddressResponse:
      type: object
      properties:
        mint_destination_address:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.MintDestinationAddress'
          title: mint_destination_address
      title: CreateMintDestinationAddressResponse
      additionalProperties: false
    bastion.api.v2.issuance.CreateMintInstructionsRequest:
      type: object
      properties:
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier of the identity that this mint instruction belongs to
        request_id:
          type: string
          title: request_id
          description: Request identifier in a UUID format. Serves as an idempotency key.
        stablecoin_symbol:
          type: string
          title: stablecoin_symbol
          description: Symbol of the stablecoin associated with this mint instruction
        mint_destination_address_id:
          type: string
          title: mint_destination_address_id
          description: Unique identifier of the mint destination address associated with this mint instruction
        payment_rail:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.ISSUANCE_SUPPORTED_FIAT_PAYMENT_METHOD'
          title: payment_rail
          description: Payment rail associated with this mint instruction, currently only 'WIRE' is supported
        fiat_currency_symbol:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.ISSUANCE_SUPPORTED_FIAT_CURRENCY'
          title: fiat_currency_symbol
          description: Fiat currency symbol associated with this mint instruction, currently only 'USD' is supported
        label:
          type: string
          title: label
          description: Label for the mint instruction
      title: CreateMintInstructionsRequest
      required:
      - identity_id
      - request_id
      - stablecoin_symbol
      - mint_destination_address_id
      - payment_rail
      - fiat_currency_symbol
      additionalProperties: false
    bastion.api.v2.issuance.CreateMintInstructionsResponse:
      type: object
      properties:
        mint_instructions:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.MintInstructions'
          title: mint_instructions
      title: CreateMintInstructionsResponse
      additionalProperties: false
    bastion.api.v2.issuance.CreateRedemptionInstructionsRequest:
      type: object
      properties:
        request_id:
          type: string
          title: request_id
          pattern: '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}'
          format: uuid
          description: Request identifier in a UUID format. Serves as an idempotency key.
        bank_account_id:
          type: string
          title: bank_account_id
          description: Bank account ID to which the redeemed funds should be sent
        chain:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.ISSUANCE_SUPPORTED_CHAIN'
          title: chain
          description: Blockchain network for the redemption
        label:
          type: string
          title: label
          description: Label for the redemption instruction
        payment_rail:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.ISSUANCE_SUPPORTED_FIAT_PAYMENT_METHOD'
          title: payment_rail
          description: Payment rail for the redemption, currently only 'WIRE' is supported
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier of the identity that this redemption instruction belongs to
        stablecoin_symbol:
          type: string
          title: stablecoin_symbol
          description: Symbol of the stablecoin associated with this redemption instruction
      title: CreateRedemptionInstructionsRequest
      required:
      - request_id
      - bank_account_id
      - chain
      - label
      - payment_rail
      - identity_id
      - stablecoin_symbol
      additionalProperties: false
    bastion.api.v2.issuance.CreateRedemptionInstructionsResponse:
      type: object
      properties:
        redemption_instructions:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.RedemptionInstructions'
          title: redemption_instructions
      title: CreateRedemptionInstructionsResponse
      additionalProperties: false
    bastion.api.v2.issuance.GetBankAccountRequest:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier for the bank account
      title: GetBankAccountRequest
      required:
      - id
      additionalProperties: false
    bastion.api.v2.issuance.GetBankAccountResponse:
      type: object
      properties:
        bank_account:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.BankAccount'
          title: bank_account
      title: GetBankAccountResponse
      additionalProperties: false
    bastion.api.v2.issuance.GetMintDestinationAddressRequest:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier for the mint destination address
      title: GetMintDestinationAddressRequest
      required:
      - id
      additionalProperties: false
    bastion.api.v2.issuance.GetMintDestinationAddressResponse:
      type: object
      properties:
        mint_destination_address:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.MintDestinationAddress'
          title: mint_destination_address
      title: GetMintDestinationAddressResponse
      additionalProperties: false
    bastion.api.v2.issuance.GetMintInstructionsRequest:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier for the mint instruction
      title: GetMintInstructionsRequest
      required:
      - id
      additionalProperties: false
    bastion.api.v2.issuance.GetMintInstructionsResponse:
      type: object
      properties:
        mint_instructions:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.MintInstructions'
          title: mint_instructions
      title: GetMintInstructionsResponse
      additionalProperties: false
    bastion.api.v2.issuance.GetMintRequest:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier for the mint request
      title: GetMintRequest
      required:
      - id
      additionalProperties: false
    bastion.api.v2.issuance.GetMintRequestResponse:
      type: object
      properties:
        mint_request:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.Mint'
          title: mint_request
      title: GetMintRequestResponse
      additionalProperties: false
    bastion.api.v2.issuance.GetRedemptionInstructionsRequest:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier for the redemption instruction
      title: GetRedemptionInstructionsRequest
      required:
      - id
      additionalProperties: false
    bastion.api.v2.issuance.GetRedemptionInstructionsResponse:
      type: object
      properties:
        redemption_instructions:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.RedemptionInstructions'
          title: redemption_instructions
      title: GetRedemptionInstructionsResponse
      additionalProperties: false
    bastion.api.v2.issuance.GetRedemptionRequest:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier for the redemption request
      title: GetRedemptionRequest
      required:
      - id
      additionalProperties: false
    bastion.api.v2.issuance.GetRedemptionResponse:
      type: object
      properties:
        redemption_request:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.Redemption'
          title: redemption_request
      title: GetRedemptionResponse
      additionalProperties: false
    bastion.api.v2.issuance.ISSUANCE_SUPPORTED_CHAIN:
      type: string
      title: ISSUANCE_SUPPORTED_CHAIN
      enum:
      - ISSUANCE_SUPPORTED_CHAIN_UNSPECIFIED
      - SOLANA_DEVNET
      - SOLANA_MAINNET
      example: SOLANA_DEVNET
    bastion.api.v2.issuance.ISSUANCE_SUPPORTED_FIAT_CURRENCY:
      type: string
      title: ISSUANCE_SUPPORTED_FIAT_CURRENCY
      enum:
      - ISSUANCE_SUPPORTED_FIAT_CURRENCY_UNSPECIFIED
      - USD
      example: USD
    bastion.api.v2.issuance.ISSUANCE_SUPPORTED_FIAT_PAYMENT_METHOD:
      type: string
      title: ISSUANCE_SUPPORTED_FIAT_PAYMENT_METHOD
      enum:
      - ISSUANCE_SUPPORTED_FIAT_PAYMENT_METHOD_UNSPECIFIED
      - WIRE
      description: Payment method for the fiat transaction
      example: WIRE
    bastion.api.v2.issuance.ListBankAccountsRequest:
      type: object
      properties:
        identity_id:
          type: string
          title: identity_id
          description: Filter bank accounts by identity ID
      title: ListBankAccountsRequest
      additionalProperties: false
    bastion.api.v2.issuance.ListBankAccountsResponse:
      type: object
      properties:
        bank_accounts:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.issuance.BankAccount'
          title: bank_accounts
      title: ListBankAccountsResponse
      additionalProperties: false
    bastion.api.v2.issuance.ListMintDestinationAddressesRequest:
      type: object
      properties:
        limit:
          type: integer
          title: limit
          maximum: 25
          minimum: 1
          format: int32
          description: The maximum number of mint destination addresses to return in a single page. The maximum value that can be specified is 25.
          default: '10'
        cursor:
          type: string
          title: cursor
          description: Pagination cursor to be used in subsequent queries to retrieve next page of results
        identity_id:
          type: string
          title: identity_id
          description: Filter by identity ID
      title: ListMintDestinationAddressesRequest
      additionalProperties: false
    bastion.api.v2.issuance.ListMintDestinationAddressesResponse:
      type: object
      properties:
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.issuance.MintDestinationAddress'
          title: addresses
        cursor:
          type: string
          title: cursor
          description: Cursor for the next page of results, if available
          readOnly: true
      title: ListMintDestinationAddressesResponse
      additionalProperties: false
    bastion.api.v2.issuance.ListMintInstructionsRequest:
      type: object
      properties:
        identity_id:
          type: string
          title: identity_id
          description: Identity ID to filter mint instructions by
        limit:
          type: integer
          title: limit
          maximum: 100
          minimum: 1
          format: int32
          description: The maximum number of mint instructions to return in a single page
          default: '10'
        cursor:
          type: string
          title: cursor
          description: Cursor for pagination
      title: ListMintInstructionsRequest
      additionalProperties: false
    bastion.api.v2.issuance.ListMintInstructionsResponse:
      type: object
      properties:
        mint_instructions:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.issuance.MintInstructions'
          title: mint_instructions
        cursor:
          type: string
          title: cursor
          description: Cursor for the next page of results
      title: ListMintInstructionsResponse
      additionalProperties: false
    bastion.api.v2.issuance.ListMintsRequest:
      type: object
      properties:
        status:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.Status'
          title: status
          description: Filter by status
        limit:
          type: integer
          title: limit
          maximum: 25
          minimum: 1
          format: int32
          description: The maximum number of mint requests to return in a single page. The maximum value that can be specified is 25.
          default: '10'
        cursor:
          type: string
          title: cursor
          description: Pagination cursor to be used in subsequent queries to retrieve next page of results
        identity_id:
          type: string
          title: identity_id
          description: Filter by the identity id that enacted the mint
      title: ListMintsRequest
      additionalProperties: false
    bastion.api.v2.issuance.ListMintsResponse:
      type: object
      properties:
        mints:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.issuance.Mint'
          title: mints
        cursor:
          type: string
          title: cursor
          description: Cursor for the next page of results, if available
          readOnly: true
      title: ListMintsResponse
      additionalProperties: false
    bastion.api.v2.issuance.ListRedemptionInstructionsRequest:
      type: object
      properties:
        limit:
          type: integer
          title: limit
          maximum: 25
          minimum: 1
          format: int32
          description: The maximum number of redemption instructions to return in a single page. The maximum value that can be specified is 25.
          default: '10'
        cursor:
          type: string
          title: cursor
          description: Pagination cursor to be used in subsequent queries to retrieve next page of results
        identity_id:
          type: string
          title: identity_id
          description: Identity ID to filter by
      title: ListRedemptionInstructionsRequest
      additionalProperties: false
    bastion.api.v2.issuance.ListRedemptionInstructionsResponse:
      type: object
      properties:
        redemption_instructions:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.issuance.RedemptionInstructions'
          title: redemption_instructions
        cursor:
          type: string
          title: cursor
          description: Cursor for the next page of results, if available
          readOnly: true
      title: ListRedemptionInstructionsResponse
      additionalProperties: false
    bastion.api.v2.issuance.ListRedemptionsRequest:
      type: object
      properties:
        status:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.Status'
          title: status
          description: Filter by status
        limit:
          type: integer
          title: limit
          maximum: 25
          minimum: 1
          format: int32
          description: The maximum number of redemptions to return in a single page. The maximum value that can be specified is 25.
          default: '10'
        cursor:
          type: string
          title: cursor
          description: Pagination cursor to be used in subsequent queries to retrieve next page of results
        identity_id:
          type: string
          title: identity_id
          description: Filter by the identity id that enacted the redemption
      title: ListRedemptionsRequest
      additionalProperties: false
    bastion.api.v2.issuance.ListRedemptionsResponse:
      type: object
      properties:
        redemptions:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.issuance.Redemption'
          title: redemptions
        cursor:
          type: string
          title: cursor
          description: Cursor for the next page of results, if available
          readOnly: true
      title: ListRedemptionsResponse
      additionalProperties: false
    bastion.api.v2.issuance.Mint:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier for the mint request
          readOnly: true
        amount:
          type: string
          title: amount
          description: Amount of the asset to be minted
          readOnly: true
        chain:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.ISSUANCE_SUPPORTED_CHAIN'
          title: chain
          description: Blockchain network for the mint
          readOnly: true
        mint_address_id:
          type: string
          title: mint_address_id
          description: Unique identifier of the mint destination address
          readOnly: true
        status:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.Status'
          title: status
          description: Status of the mint request
          readOnly: true
        external_tx_id:
          type: string
          title: external_tx_id
          description: External transaction id of the mint request
          readOnly: true
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier of the identity enacting this mint request
          readOnly: true
        stablecoin_symbol:
          type: string
          title: stablecoin_symbol
          description: Symbol of the stablecoin being minted
          readOnly: true
      title: Mint
      additionalProperties: false
    bastion.api.v2.issuance.MintDestinationAddress:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier for the mint destination address
          readOnly: true
        address:
          type: string
          title: address
          description: Mint destination address
          readOnly: true
        chain:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.ISSUANCE_SUPPORTED_CHAIN'
          title: chain
          description: Blockchain network for the mint destination address
          readOnly: true
        label:
          type: string
          title: label
          description: Label for the mint destination address
          readOnly: true
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier of the identity that this mint address belongs to
          readOnly: true
      title: MintDestinationAddress
      additionalProperties: false
    bastion.api.v2.issuance.MintInstructions:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier for the mint instruction
          readOnly: true
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier for the identity that this mint instruction belongs to
          readOnly: true
        request_id:
          type: string
          title: request_id
          description: Request identifier in a UUID format. Serves as an idempotency key.
          readOnly: true
        stablecoin_symbol:
          type: string
          title: stablecoin_symbol
          description: Symbol of the stablecoin associated with this mint instruction
          readOnly: true
        chain:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.ISSUANCE_SUPPORTED_CHAIN'
          title: chain
          description: Chain associated with this mint instruction
          readOnly: true
        mint_destination_address_id:
          type: string
          title: mint_destination_address_id
          description: Unique identifier of the mint destination address associated with this mint instruction
          readOnly: true
        payment_rail:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.ISSUANCE_SUPPORTED_FIAT_PAYMENT_METHOD'
          title: payment_rail
          description: Payment rail associated with this mint instruction, currently only 'WIRE' is supported
          readOnly: true
        fiat_currency_symbol:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.ISSUANCE_SUPPORTED_FIAT_CURRENCY'
          title: fiat_currency_symbol
          description: Fiat currency symbol associated with this mint instruction, currently only 'USD' is supported
          readOnly: true
        memo_id:
          type: string
          title: memo_id
          description: Memo ID associated with this mint instruction. Attach this to memo field of the WIRE transfer that will be used to initiate mints.
          readOnly: true
        bank_account_details:
          allOf:
          - $ref: '#/components/schemas/bastion.common.BankAccountDetails'
          title: bank_account_details
          description: Details of the bank account that funds must be deposited into in order to initiate mints
          readOnly: true
        label:
          type: string
          title: label
          description: Label for the mint instruction
          readOnly: true
      title: MintInstructions
      additionalProperties: false
    bastion.api.v2.issuance.Redemption:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier for the redemption request
          readOnly: true
        amount:
          type: string
          title: amount
          description: Amount of the asset to be redeemed
          readOnly: true
        chain:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.ISSUANCE_SUPPORTED_CHAIN'
          title: chain
          description: Blockchain network for the redemption
          readOnly: true
        redemption_address_id:
          type: string
          title: redemption_address_id
          description: Unique identifier of the redemption address that will receive the redeemed funds
          readOnly: true
        from_address:
          type: string
          title: from_address
          description: Source address of transaction that triggered the redemption
          readOnly: true
        status:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.Status'
          title: status
          description: Status of the redemption request
          readOnly: true
        deposit_external_tx_id:
          type: string
          title: deposit_external_tx_id
          description: External transaction ID of the deposit
          readOnly: true
        burn_external_tx_id:
          type: string
          title: burn_external_tx_id
          description: External transaction ID of the burn
          readOnly: true
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier of the identity that enacted this redemption request
          readOnly: true
        stablecoin_symbol:
          type: string
          title: stablecoin_symbol
          description: Symbol of the stablecoin being redeemed
          readOnly: true
      title: Redemption
      additionalProperties: false
    bastion.api.v2.issuance.RedemptionInstructions:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier for the redemption instruction
          readOnly: true
        address:
          type: string
          title: address
          description: Generated redemption address. Stablecoins sent to this address will be redeemed.
          readOnly: true
        bank_account_id:
          type: string
          title: bank_account_id
          description: Bank account ID to which the redeemed funds should be sent
          readOnly: true
        chain:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.ISSUANCE_SUPPORTED_CHAIN'
          title: chain
          description: Blockchain network for the redemption instruction
          readOnly: true
        label:
          type: string
          title: label
          description: Label for the redemption instruction
          readOnly: true
        payment_rail:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.issuance.ISSUANCE_SUPPORTED_FIAT_PAYMENT_METHOD'
          title: payment_rail
          description: Payment rail for the redemption instruction, currently only 'WIRE' is supported
          readOnly: true
        identity_id:
          type: string
          title: identity_id
          description: Unique identifier of the identity that this redemption instruction belongs to
          readOnly: true
        stablecoin_symbol:
          type: string
          title: stablecoin_symbol
          description: Symbol of the stablecoin associated with this redemption instruction
          readOnly: true
      title: RedemptionInstructions
      additionalProperties: false
    bastion.api.v2.issuance.Status:
      type: string
      title: Status
      enum:
      - STATUS_UNSPECIFIED
      - ACCEPTED
      - SUBMITTED
      - COMPLETED
      - DENIED
      - FAILED
      - CANCELLED
      example: ACCEPTED
    bastion.api.v2.payment_instructions.BankAccountDetails:
      type: object
      anyOf:
      - type: object
        properties:
          bank_transfer_details:
            allOf:
            - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.BankTransferDetails'
            title: bank_transfer_details
        title: bank_transfer_details
      - type: object
        properties:
          cce_details:
            allOf:
            - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.CceDetails'
            title: cce_details
        title: cce_details
      - type: object
        properties:
          coelsa_details:
            allOf:
            - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.CoelsaDetails'
            title: coelsa_details
        title: coelsa_details
      - type: object
        properties:
          eft_details:
            allOf:
            - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.EftDetails'
            title: eft_details
        title: eft_details
      - type: object
        properties:
          imps_firc_details:
            allOf:
            - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.ImpsFircDetails'
            title: imps_firc_details
        title: imps_firc_details
      - type: object
        properties:
          pix_details:
            allOf:
            - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.PixDetails'
            title: pix_details
        title: pix_details
      - type: object
        properties:
          sepa_details:
            allOf:
            - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.SepaDetails'
            title: sepa_details
        title: sepa_details
      - type: object
        properties:
          spei_details:
            allOf:
            - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.SpeiDetails'
            title: spei_details
        title: spei_details
      - type: object
        properties:
          wire_details:
            allOf:
            - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.WireDetails'
            title: wire_details
        title: wire_details
      unevaluatedProperties: false
      not:
        allOf:
        - anyOf:
          - required:
            - bank_transfer_details
          - required:
            - cce_details
          - required:
            - coelsa_details
          - required:
            - eft_details
          - required:
            - imps_firc_details
          - required:
            - pix_details
          - required:
            - sepa_details
          - required:
            - spei_details
          - required:
            - wire_details
        - not:
            oneOf:
            - required:
              - bank_transfer_details
            - required:
              - cce_details
            - required:
              - coelsa_details
            - required:
              - eft_details
            - required:
              - imps_firc_details
            - required:
              - pix_details
            - required:
              - sepa_details
            - required:
              - spei_details
            - required:
              - wire_details
      properties:
        name:
          type: string
          title: name
          description: "Name of the bank (e.g., \"Chase\", \"BBVA\"). This is a top-level field of\n BankAccountDetails and a sibling of wire_details, not nested inside it.\n Required for every payment method except PIX, which routes on the PIX key\n alone."
      description: "Bank account details for the transaction. Corridor-specific fields live\n inside the `details` oneof; exactly one variant must be set, matching the\n payment_method on the parent message."
    bastion.api.v2.payment_instructions.BankAccountDetails.BankAccountType:
      type: string
      title: BankAccountType
      enum:
      - CHECKING
      - SAVINGS
      description: "Type of the bank account (checking vs savings). Used by US Wire, Peru CCE,\n and bank-transfer corridors that route on account type (e.g. CO)."
      example: CHECKING
    bastion.api.v2.payment_instructions.BankTransferDetails:
      type: object
      properties:
        account_number:
          type: string
          title: account_number
          description: Bank account number.
        bank_id:
          type: string
          title: bank_id
          description: "Opaque bank identifier from the institutions endpoint. Optional for\n corridors that identify the bank via SWIFT/BIC + sort code (e.g. GB)."
        bank_code:
          type: string
          title: bank_code
          description: "Local bank/sort code. Required for JP (Zengin, format \"XXXX-XXX\") and\n GB (sort code, 6 digits)."
        swift_or_bic_number:
          type: string
          title: swift_or_bic_number
          description: SWIFT/BIC code. Used by corridors without a bank_id selector (e.g. GB).
        type:
          oneOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.BankAccountDetails.BankAccountType'
          - type: 'null'
          title: type
          description: "Account type (checking vs savings). Required for corridors that route on\n it (CO, CL, BO, DO); absent elsewhere."
      title: BankTransferDetails
      required:
      - account_number
      additionalProperties: false
      description: "Generic bank transfer details. Used for corridors that require a bank\n selector (e.g. JP, KR, SG). The bank_id is an opaque identifier returned\n by the institutions endpoint."
    bastion.api.v2.payment_instructions.BeneficiaryType:
      type: string
      title: BeneficiaryType
      enum:
      - FIRST_PARTY
      - THIRD_PARTY
      description: Beneficiary type of the payment instructions.
      example: FIRST_PARTY
    bastion.api.v2.payment_instructions.BusinessRecipient:
      type: object
      properties:
        business_name:
          type: string
          title: business_name
        email:
          type: string
          title: email
          description: Email address of the recipient. Required for THIRD_PARTY only.
        address:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Address'
          title: address
        tax_id:
          type: string
          title: tax_id
          description: "Tax identification number (e.g. CNPJ for BR, RFC for MX).\n Required by some corridors, such as BR."
        phone:
          type: string
          title: phone
          description: Phone number. Required by some corridors.
      title: BusinessRecipient
      required:
      - business_name
      - address
      additionalProperties: false
    bastion.api.v2.payment_instructions.CceDetails:
      type: object
      properties:
        account_number:
          type: string
          title: account_number
          description: Bank account number. Must be exactly 20 digits.
        type:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.BankAccountDetails.BankAccountType'
          title: type
          description: Type of the bank account (Checking or Savings).
        address:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Address'
          title: address
          description: Address associated with the bank account.
        bank_id:
          type: string
          title: bank_id
          description: Bank slug from the institutions endpoint.
      title: CceDetails
      required:
      - account_number
      - type
      - bank_id
      additionalProperties: false
      description: Peru CCE (Cámara de Compensación Electrónica) transfer details.
    bastion.api.v2.payment_instructions.CoelsaDetails:
      type: object
      properties:
        account_number:
          type: string
          title: account_number
          description: Bank account number (CBU/CVU — 22 digits, or ALIAS string).
        account_number_type:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.CoelsaDetails.AccountNumberType'
          title: account_number_type
          description: Whether account_number is a CBU, CVU, or ALIAS.
      title: CoelsaDetails
      required:
      - account_number
      - account_number_type
      additionalProperties: false
      description: Argentina COELSA transfer details.
    bastion.api.v2.payment_instructions.CoelsaDetails.AccountNumberType:
      type: string
      title: AccountNumberType
      enum:
      - ACCOUNT_NUMBER_TYPE_UNSPECIFIED
      - CBU
      - CVU
      - ALIAS
      description: 'Account number type: CBU (bank account), CVU (digital wallet), or ALIAS (human-readable alias).'
      example: CBU
    bastion.api.v2.payment_instructions.CreatePaymentInstructionsRequest:
      type: object
      properties:
        identity_id:
          type: string
          title: identity_id
          description: Identity id to create payment instructions for
        country:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Country'
          title: country
          description: Country of the bank account (ISO 3166-1 alpha-2).
        fiat_currency_symbol:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.PaymentInstructions.FiatCurrencySymbol'
          title: fiat_currency_symbol
          description: Currency symbol of the fiat transaction
        account_name:
          type: string
          title: account_name
          description: Friendly name for the payment instructions
        payment_method:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.PaymentMethod'
          title: payment_method
          description: Payment method
        bank_account_details:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.BankAccountDetails'
          description: Bank account details
        beneficiary_type:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.BeneficiaryType'
          title: beneficiary_type
          description: Whether these instructions pay the sender (FIRST_PARTY) or someone else (THIRD_PARTY).
        recipient:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.Recipient'
          description: Recipient information.
        request_id:
          type: string
          title: request_id
          description: "Client-provided idempotency key (UUID). Must be unique per request and\n included on every call to prevent duplicate payment instructions from\n being created. Re-submitting the same request_id returns the original\n response without creating a duplicate."
      title: CreatePaymentInstructionsRequest
      required:
      - identity_id
      - country
      - fiat_currency_symbol
      - account_name
      - payment_method
      - bank_account_details
      - beneficiary_type
      - recipient
      - request_id
      additionalProperties: false
    bastion.api.v2.payment_instructions.CreatePaymentInstructionsResponse:
      type: object
      properties:
        instructions:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.PaymentInstructions'
          title: instructions
      title: CreatePaymentInstructionsResponse
      additionalProperties: false
    bastion.api.v2.payment_instructions.EftDetails:
      type: object
      properties:
        account_number:
          type: string
          title: account_number
          description: Bank account number.
        transit_number:
          type: string
          title: transit_number
          description: "Branch transit number. Required for CA (5 digits); identifies the\n specific bank branch receiving the transfer."
        bank_id:
          type: string
          title: bank_id
          description: Opaque bank identifier from the /v2/institutions endpoint.
        institution_number:
          type: string
          title: institution_number
          description: 3-digit Canadian institution number. Required for CA; unused for ZA.
      title: EftDetails
      required:
      - account_number
      - transit_number
      - bank_id
      additionalProperties: false
      description: Electronic Funds Transfer details. Used for CA (CAD) and ZA (ZAR).
    bastion.api.v2.payment_instructions.GetPaymentInstructionsRequest:
      type: object
      properties:
        identity_id:
          type: string
          title: identity_id
          description: Identity ID
        payment_instructions_id:
          type: string
          title: payment_instructions_id
          description: Payment instructions ID
      title: GetPaymentInstructionsRequest
      required:
      - identity_id
      - payment_instructions_id
      additionalProperties: false
    bastion.api.v2.payment_instructions.GetPaymentInstructionsResponse:
      type: object
      properties:
        instructions:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.PaymentInstructions'
          title: instructions
      title: GetPaymentInstructionsResponse
      additionalProperties: false
    bastion.api.v2.payment_instructions.ImpsFircDetails:
      type: object
      properties:
        account_number:
          type: string
          title: account_number
          description: -- Bank account number. --
        ifsc_code:
          type: string
          title: ifsc_code
          description: -- 11-char Indian IFSC code. --
      title: ImpsFircDetails
      required:
      - account_number
      - ifsc_code
      additionalProperties: false
      description: India IMPS/FIRC transfer details.
    bastion.api.v2.payment_instructions.IndividualRecipient:
      type: object
      properties:
        first_name:
          type: string
          title: first_name
        middle_name:
          type: string
          title: middle_name
        last_name:
          type: string
          title: last_name
        email:
          type: string
          title: email
          description: Email address of the recipient. Required for THIRD_PARTY only.
        address:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Address'
          title: address
        tax_id:
          type: string
          title: tax_id
          description: "Tax identification number (e.g. CPF for BR, RFC for MX).\n Required by some corridors, such as BR."
        phone:
          type: string
          title: phone
          description: Phone number. Required by some corridors.
      title: IndividualRecipient
      required:
      - first_name
      - last_name
      - address
      additionalProperties: false
    bastion.api.v2.payment_instructions.ListPaymentInstructionsRequest:
      type: object
      properties:
        identity_id:
          type: string
          title: identity_id
          description: Identity ID to list payment instructions for
      title: ListPaymentInstructionsRequest
      required:
      - identity_id
      additionalProperties: false
    bastion.api.v2.payment_instructions.ListPaymentInstructionsResponse:
      type: object
      properties:
        payment_instructions:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.payment_instructions.PaymentInstructions'
          title: payment_instructions
      title: ListPaymentInstructionsResponse
      additionalProperties: false
    bastion.api.v2.payment_instructions.PaymentInstructions:
      type: object
      properties:
        country:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Country'
          title: country
          description: Country of the bank account (ISO 3166-1 alpha-2).
        fiat_currency_symbol:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.PaymentInstructions.FiatCurrencySymbol'
          title: fiat_currency_symbol
          description: Currency symbol of the fiat transaction
        account_name:
          type: string
          title: account_name
          description: Friendly name for the payment instructions (e.g., "John's Chase Account")
        payment_method:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.PaymentMethod'
          title: payment_method
          description: Payment method for the fiat transaction
        bank_account_details:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.BankAccountDetails'
          description: Bank account details
        id:
          type: string
          title: id
          description: Payment instructions ID
          readOnly: true
        beneficiary_type:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.BeneficiaryType'
          title: beneficiary_type
          description: Whether these instructions pay the sender (FIRST_PARTY) or someone else (THIRD_PARTY).
        recipient:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.Recipient'
          description: Recipient information.
        identity_id:
          type: string
          title: identity_id
          description: Bastion identity that owns the payment instructions.
          readOnly: true
      title: PaymentInstructions
      required:
      - country
      - fiat_currency_symbol
      - account_name
      - payment_method
      - bank_account_details
      - beneficiary_type
      - recipient
      additionalProperties: false
      description: Payment instructions for a conversion.
    bastion.api.v2.payment_instructions.PaymentInstructions.FiatCurrencySymbol:
      type: string
      title: FiatCurrencySymbol
      enum:
      - USD
      - MXN
      - INR
      - KRW
      - JPY
      - SGD
      - MYR
      - THB
      - IDR
      - PHP
      - QAR
      - EGP
      - JOD
      - GHS
      - KES
      - HNL
      - BOB
      - JMD
      - COP
      - GTQ
      - BRL
      - PEN
      - CLP
      - CRC
      - DOP
      - ZAR
      - CAD
      - PKR
      - SAR
      - ILS
      - EUR
      - GBP
      - ARS
      - AUD
      - AED
      description: Fiat currency symbol.
      example: USD
    bastion.api.v2.payment_instructions.PaymentMethod:
      type: string
      title: PaymentMethod
      enum:
      - WIRE
      - ACH
      - SPEI
      - IMPS_FIRC
      - BANK_TRANSFER
      - CCE
      - TEF
      - SINPE
      - LBTR
      - EFT
      - IBFT
      - MADA
      - ZAHAV
      - SEPA
      - PIX
      - COELSA
      - BECS
      - NPSS
      description: Payment method for the fiat transaction.
      example: WIRE
    bastion.api.v2.payment_instructions.PixDetails:
      type: object
      properties:
        identifier_type:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.PixDetails.IdentifierType'
          title: identifier_type
        identifier_value:
          type: string
          title: identifier_value
      title: PixDetails
      required:
      - identifier_type
      - identifier_value
      additionalProperties: false
      description: Brazil PIX transfer details.
    bastion.api.v2.payment_instructions.PixDetails.IdentifierType:
      type: string
      title: IdentifierType
      enum:
      - IDENTIFIER_TYPE_UNSPECIFIED
      - CPF
      - CNPJ
      - EMAIL
      - PHONE_NUMBER
      - RANDOM_KEY
      example: CPF
    bastion.api.v2.payment_instructions.Recipient:
      type: object
      anyOf:
      - type: object
        properties:
          business:
            allOf:
            - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.BusinessRecipient'
            title: business
        title: business
      - type: object
        properties:
          individual:
            allOf:
            - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.IndividualRecipient'
            title: individual
        title: individual
      unevaluatedProperties: false
      not:
        allOf:
        - anyOf:
          - required:
            - business
          - required:
            - individual
        - not:
            oneOf:
            - required:
              - business
            - required:
              - individual
      properties:
        name:
          type: string
          title: name
          description: "Full name of the recipient.\n It is declared optional because there are specialized Recipient structures\n with their own required name fields"
        email:
          type: string
          title: email
          description: Email address of the recipient. Required for THIRD_PARTY only.
        tax_id:
          type: string
          title: tax_id
          description: "Tax identification number, e.g. CPF/CNPJ for BR. Required by some corridors.\n Deprecated: set tax_id on individual/business instead. Read during the\n migration window as a fallback when the nested field is unset."
          deprecated: true
        address:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Address'
          title: address
          description: "Recipient's address. It is declared optional because\n there are specialized Recipient structures\n with their own required address fields"
        recipient_type:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.RecipientType'
          title: recipient_type
          description: "Whether the recipient is an individual or a business.\n The value is optional if a more specialized Recipient structure is populated"
        phone:
          type: string
          title: phone
          description: "Phone number required by some corridors.\n Deprecated: set phone on individual/business instead. Read during the\n migration window as a fallback when the nested field is unset."
          deprecated: true
      description: "Recipient identifies the beneficiary of the payment instructions.\n Required on every PI registration. tax_id is required by some corridors,\n such as BR; email is required only for THIRD_PARTY beneficiaries."
    bastion.api.v2.payment_instructions.RecipientType:
      type: string
      title: RecipientType
      enum:
      - INDIVIDUAL
      - BUSINESS
      description: Whether the recipient is an individual or a business.
      example: INDIVIDUAL
    bastion.api.v2.payment_instructions.SepaDetails:
      type: object
      properties:
        bank_account_number:
          type: string
          title: bank_account_number
          description: IBAN.
        swift_or_bic_number:
          type: string
          title: swift_or_bic_number
          description: SWIFT/BIC code.
        account_owner_type:
          type: string
          title: account_owner_type
          description: "Account owner type.\n Deprecated: derived from the recipient — the populated recipient.individual /\n recipient.business oneof takes precedence over recipient.recipient_type.\n Will be removed."
          deprecated: true
        first_name:
          type: string
          title: first_name
          description: "Account owner first name.\n Deprecated: derived from recipient.individual.first_name (empty for a\n business recipient); will be removed."
          deprecated: true
        last_name:
          type: string
          title: last_name
          description: "Account owner last name.\n Deprecated: derived from recipient.individual.last_name (empty for a\n business recipient); will be removed."
          deprecated: true
      title: SepaDetails
      required:
      - bank_account_number
      - swift_or_bic_number
      additionalProperties: false
      description: "SEPA transfer details.\n\n Account-owner identity (account_owner_type, first_name, last_name) is derived\n from the recipient. The populated recipient.individual / recipient.business\n oneof variant is authoritative and takes precedence; recipient.recipient_type\n is used only when neither oneof variant is set. account_owner_type resolves to\n INDIVIDUAL (recipient.individual or recipient_type == INDIVIDUAL) or BUSINESS\n (recipient.business or recipient_type == BUSINESS); first_name/last_name come\n from recipient.individual and stay empty for a business recipient. These\n fields are retained only for backward compatibility and will be removed; when\n omitted, the recipient is used as the source of truth."
    bastion.api.v2.payment_instructions.SpeiDetails:
      type: object
      properties:
        clabe:
          type: string
          title: clabe
          description: -- 18-digit Mexican CLABE. --
      title: SpeiDetails
      required:
      - clabe
      additionalProperties: false
      description: Mexico SPEI transfer details.
    bastion.api.v2.payment_instructions.WireDetails:
      type: object
      properties:
        account_number:
          type: string
          title: account_number
          description: Bank account number
        routing_number:
          type: string
          title: routing_number
          description: Bank routing number
        type:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.payment_instructions.BankAccountDetails.BankAccountType'
          title: type
          description: Type of the bank account
        address:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Address'
          title: address
          description: Address of the bank
      title: WireDetails
      required:
      - account_number
      - routing_number
      - type
      - address
      additionalProperties: false
      description: US domestic wire transfer details.
    bastion.api.v2.transactions.GetTransactionLimitPolicyRequest:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier of the transaction limit policy to retrieve
      title: GetTransactionLimitPolicyRequest
      required:
      - id
      additionalProperties: false
    bastion.api.v2.transactions.GetTransactionLimitPolicyResponse:
      type: object
      properties:
        policy:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.transactions.TransactionLimitPolicy'
          title: policy
          description: The requested transaction limit policy
      title: GetTransactionLimitPolicyResponse
      additionalProperties: false
    bastion.api.v2.transactions.ListTransactionLimitPoliciesRequest:
      type: object
      properties:
        limit:
          type: integer
          title: limit
          maximum: 100
          minimum: 1
          format: int32
          description: "The maximum number of transaction limit policies to return in a single page.\n The maximum value that can be specified is 100. Defaults to 50 if unspecified."
          default: '50'
        cursor:
          type: string
          title: cursor
          description: Pagination cursor to be used in subsequent queries to retrieve next page of results
      title: ListTransactionLimitPoliciesRequest
      additionalProperties: false
    bastion.api.v2.transactions.ListTransactionLimitPoliciesResponse:
      type: object
      properties:
        policies:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.transactions.TransactionLimitPolicy'
          title: policies
          description: List of transaction limit policies
        cursor:
          type: string
          title: cursor
          description: "Pagination cursor to be used in subsequent queries to retrieve next page of results.\n If this field is omitted, there are no subsequent pages."
      title: ListTransactionLimitPoliciesResponse
      additionalProperties: false
    bastion.api.v2.transactions.TransactionLimitPolicy:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier of the transaction limit policy
        scope:
          allOf:
          - $ref: '#/components/schemas/bastion.common.TransactionLimitScope'
          title: scope
          description: "Describes who the policy applies to.\n A policy can either be APP_SCOPED (meaning it applies to an entire app) or IDENTITY_SCOPED (meaning it applies to a specific identity)"
        evaluation_window:
          allOf:
          - $ref: '#/components/schemas/bastion.common.TransactionLimitEvaluationWindow'
          title: evaluation_window
          description: "Evaluation window for the transaction limit policy.\n Values are PER_TRANSACTION (maximum notional value for a single transaction), PAST_DAY (maximum cumulative value over a rolling 24-hour window for a given identity), or PAST_WEEK (maximum cumulative value over a rolling 7-day window for a given identity)"
        threshold_type:
          allOf:
          - $ref: '#/components/schemas/bastion.common.TransactionLimitThresholdType'
          title: threshold_type
          description: "Threshold type for the transaction limit policy.\n Valid values are HARD (meaning that transactions will be blocked if the policy is breached) or SOFT (meaning that only webhook notifications will be sent if the policy is breached)"
        threshold_currency:
          allOf:
          - $ref: '#/components/schemas/bastion.common.TransactionLimitThresholdCurrency'
          title: threshold_currency
          description: Currency that the thresholdAmount is expressed in. Currently, only USD is supported.
        threshold_amount:
          type: string
          title: threshold_amount
          description: Amount threshold for the transaction limit policy
        identity_id:
          type:
          - string
          - 'null'
          title: identity_id
          description: Identity ID if the policy scope is IDENTITY_SCOPED. Null otherwise.
        is_active:
          type: boolean
          title: is_active
          description: Whether the policy is currently active
        created_at:
          allOf:
          - $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: created_at
          description: Timestamp when the policy was created
        updated_at:
          allOf:
          - $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: updated_at
          description: Timestamp when the policy was last updated
        managed_by:
          oneOf:
          - $ref: '#/components/schemas/bastion.common.TransactionLimitManagedBy'
          - type: 'null'
          title: managed_by
          description: Who manages this policy. BASTION means Bastion-imposed; CUSTOMER means customer-set.
        transaction_type:
          oneOf:
          - $ref: '#/components/schemas/bastion.common.TransactionLimitTransactionType'
          - type: 'null'
          title: transaction_type
          description: "The product lane this policy applies to. `CONVERSION_ONRAMP` and `CONVERSION_OFFRAMP` encode\n ramp direction directly in the type value."
      title: TransactionLimitPolicy
      additionalProperties: false
    bastion.api.v2.virtual_accounts.CreateVirtualAccountRequest:
      type: object
      properties:
        identity_id:
          type: string
          title: identity_id
          description: Identity to create the virtual account for.
        request_id:
          type: string
          title: request_id
          description: Request identifier in a UUID format. Serves as an idempotency key.
        source:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.virtual_accounts.VirtualAccountSource'
          title: source
          description: Fiat deposit configuration.
        destination:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.virtual_accounts.VirtualAccountDestination'
          description: Asset delivery configuration.
      title: CreateVirtualAccountRequest
      required:
      - identity_id
      - request_id
      - source
      - destination
      additionalProperties: false
    bastion.api.v2.virtual_accounts.CreateVirtualAccountResponse:
      type: object
      properties:
        virtual_account:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.virtual_accounts.VirtualAccount'
          title: virtual_account
      title: CreateVirtualAccountResponse
      additionalProperties: false
    bastion.api.v2.virtual_accounts.ListVirtualAccountsRequest:
      type: object
      properties:
        identity_id:
          type: string
          title: identity_id
          description: Identity whose virtual accounts to list.
        status:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.virtual_accounts.VirtualAccountStatus'
          title: status
          description: Only return virtual accounts with this status.
        limit:
          type: string
          title: limit
          maximum: 50
          minimum: 1
          format: int64
          description: The maximum number of virtual accounts to return in a single page.
          default: '10'
        cursor:
          type: string
          title: cursor
          description: Pagination cursor from a previous response, used to fetch the next page.
      title: ListVirtualAccountsRequest
      required:
      - identity_id
      additionalProperties: false
    bastion.api.v2.virtual_accounts.ListVirtualAccountsResponse:
      type: object
      properties:
        virtual_accounts:
          type: array
          items:
            $ref: '#/components/schemas/bastion.api.v2.virtual_accounts.VirtualAccount'
          title: virtual_accounts
        cursor:
          type: string
          title: cursor
      title: ListVirtualAccountsResponse
      additionalProperties: false
    bastion.api.v2.virtual_accounts.VirtualAccount:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier for this virtual account.
          readOnly: true
        identity_id:
          type: string
          title: identity_id
          description: Bastion identity that owns the account.
          readOnly: true
        status:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.virtual_accounts.VirtualAccountStatus'
          title: status
          description: Current status.
          readOnly: true
        source:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.virtual_accounts.VirtualAccountSource'
          title: source
          description: 'Source: fiat deposit configuration.'
          readOnly: true
        destination:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.virtual_accounts.VirtualAccountDestination'
          description: 'Destination: asset delivery configuration.'
          readOnly: true
        deposit_instructions:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.DepositInstructions'
          title: deposit_instructions
          description: "Deposit instructions (populated when status = ACTIVE).\n Returned synchronously by providers that support it (e.g. CRB/MT)."
          readOnly: true
        created_at:
          type: string
          title: created_at
          description: Time the virtual account was created, as an RFC 3339 timestamp.
          readOnly: true
        updated_at:
          type: string
          title: updated_at
          description: Time the virtual account was last updated, as an RFC 3339 timestamp.
          readOnly: true
      title: VirtualAccount
      additionalProperties: false
    bastion.api.v2.virtual_accounts.VirtualAccountDestination:
      type: object
      anyOf:
      - type: object
        properties:
          account_id:
            type: string
            title: account_id
            description: Use Bastion wallet. Required until external_wallet_address is enabled.
        title: account_id
        required:
        - account_id
      - type: object
        properties:
          external_wallet_address:
            type: string
            title: external_wallet_address
            description: External wallet address. Not yet enabled.
        title: external_wallet_address
      unevaluatedProperties: false
      not:
        allOf:
        - anyOf:
          - required:
            - account_id
          - required:
            - external_wallet_address
        - not:
            oneOf:
            - required:
              - account_id
            - required:
              - external_wallet_address
      properties:
        currency:
          allOf:
          - $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionCurrency'
          title: currency
          description: Target cryptocurrency after conversion (e.g. USDC).
        chain:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          title: chain
          description: Blockchain network. Required when destination is on-chain.
      required:
      - currency
      description: 'Crypto side: where converted assets are delivered.'
    bastion.api.v2.virtual_accounts.VirtualAccountSource:
      type: object
      properties:
        banking_country:
          type: string
          title: banking_country
          description: Country determines the banking partner (e.g. "US" -> CRB, "BR" -> Borderless).
      title: VirtualAccountSource
      required:
      - banking_country
      additionalProperties: false
      description: 'Fiat side: what the VA accepts as deposits.'
    bastion.api.v2.virtual_accounts.VirtualAccountStatus:
      type: string
      title: VirtualAccountStatus
      enum:
      - VIRTUAL_ACCOUNT_STATUS_UNSPECIFIED
      - VIRTUAL_ACCOUNT_STATUS_PENDING
      - VIRTUAL_ACCOUNT_STATUS_ACTIVE
      - VIRTUAL_ACCOUNT_STATUS_INACTIVE
      - VIRTUAL_ACCOUNT_STATUS_FAILED
      example: VIRTUAL_ACCOUNT_STATUS_PENDING
    bastion.common.AccountDestination:
      type: object
      properties:
        account_id:
          type: string
          title: account_id
          description: Unique identifier of the destination account
      title: AccountDestination
      additionalProperties: false
      description: Internal Bastion account destination for a P2P transfer.
    bastion.common.AccountPurpose:
      type: string
      title: AccountPurpose
      enum:
      - ACCOUNT_PURPOSE_UNSPECIFIED
      - CHARITABLE_DONATIONS
      - ECOMMERCE_RETAIL_PAYMENTS
      - INVESTMENT_PURPOSES
      - PAYMENTS_TO_FRIENDS_OR_FAMILY_ABROAD
      - PAYROLL
      - PERSONAL_OR_LIVING_EXPENSES
      - PROTECT_WEALTH
      - PURCHASE_GOODS_AND_SERVICES
      - RECEIVE_PAYMENTS_FOR_GOODS_AND_SERVICES
      - TAX_OPTIMIZATION
      - THIRD_PARTY_MONEY_TRANSMISSION
      - TREASURY_MANAGEMENT
      example: CHARITABLE_DONATIONS
    bastion.common.AccountType:
      type: string
      title: AccountType
      enum:
      - ACCOUNT_TYPE_UNSPECIFIED
      - LEDGER
      - ONCHAIN
      - OMNIBUS
      - SEGREGATED
      example: LEDGER
    bastion.common.Address:
      type: object
      properties:
        street_line_1:
          type: string
          title: street_line_1
          maxLength: 100
          minLength: 3
          description: "Street address line 1. Must not be a PO box, and must be between 3 and 100 characters inclusive.\n Payment instruction addresses allow at most 35 characters, so an address accepted at\n onboarding can still be rejected on a payment instruction."
        street_line_2:
          type: string
          title: street_line_2
          maxLength: 100
          description: "Street address line 2. Optional. Must not be a PO box, and when set must be between 3 and\n 100 characters inclusive. Payment instruction addresses allow at most 35 characters."
        city:
          type: string
          title: city
          maxLength: 50
          minLength: 3
          description: City
        postal_code:
          type: string
          title: postal_code
          maxLength: 20
          description: "Postal (zip) code, checked against the country's postal code format. US addresses use\n `12345`, `12345-6789`, or `123456789`; `00000` and `99999` are rejected. El Salvador\n addresses use `CP`, a space, and four digits, e.g. `CP 1011`."
        country:
          type: string
          title: country
          maxLength: 2
          minLength: 2
          description: Two-letter ISO 3166-1 alpha-2 country code in upper case, e.g. "US".
        region_code:
          type: string
          title: region_code
          maxLength: 50
          description: "Subdivision (state, province, or region) code of up to 50 characters. Required unless\n the country has no ISO 3166-2 subdivisions, e.g. \"HK\". For US addresses, must be a valid\n ISO 3166-2 US subdivision code without the country prefix, e.g. \"CA\" (not \"US-CA\")."
      title: Address
      required:
      - street_line_1
      - city
      - postal_code
      - country
      additionalProperties: false
    bastion.common.AddressDestination:
      type: object
      properties:
        address:
          type: string
          title: address
          description: Blockchain address of the recipient
        chain:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          title: chain
          description: Chain for the transfer
      title: AddressDestination
      additionalProperties: false
      description: External blockchain address destination for a cryptocurrency transfer.
    bastion.common.Balance:
      type: object
      properties:
        symbol:
          type: string
          title: symbol
          description: Asset symbol (e.g., USDC, ETH, USD)
        total:
          type: string
          title: total
          description: Total amount in atomic units (e.g., 100000000 for 100 USDC)
        available:
          type: string
          title: available
          description: Available amount in atomic units (e.g., 100000000 for 100 USDC)
        decimals:
          type: integer
          title: decimals
          format: int32
          description: Number of decimal places for the quantity
        type:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Balance.BalanceType'
          title: type
          description: Type of the balance
        chain:
          oneOf:
          - $ref: '#/components/schemas/bastion.common.Chain'
          - type: 'null'
          title: chain
          description: Chain the asset belongs to
        contract_address:
          type:
          - string
          - 'null'
          title: contract_address
          description: Contract address of the asset
      title: Balance
      additionalProperties: false
    bastion.common.Balance.BalanceType:
      type: string
      title: BalanceType
      enum:
      - BALANCE_TYPE_UNSPECIFIED
      - SPL_TOKEN
      - ERC20_TOKEN
      - FIAT
      - NATIVE
      description: Type of the balance
      example: SPL_TOKEN
    bastion.common.BankAccountDetails:
      type: object
      properties:
        bank_name:
          type: string
          title: bank_name
          description: Name of the bank holding the account.
        account_holder_name:
          type: string
          title: account_holder_name
          description: Full legal name of the account holder.
        account_number:
          type: string
          title: account_number
          description: Bank account number.
        routing_number:
          type: string
          title: routing_number
          description: US ABA routing number for the account.
        type:
          type: string
          title: type
        address:
          allOf:
          - $ref: '#/components/schemas/bastion.common.Address'
          title: address
        clabe:
          type: string
          title: clabe
          description: "International corridor fields. Each field is populated only for its\n matching payment method (enforced by the bastion_apis validator). MX / SPEI"
        ifsc_code:
          type: string
          title: ifsc_code
          description: IN / IMPS_FIRC
        bank_id:
          type: string
          title: bank_id
          description: JP, KR, etc. / BANK_TRANSFER — opaque institution ID
        swift_or_bic_number:
          type: string
          title: swift_or_bic_number
          description: EU / SEPA BIC or SWIFT code
        account_owner_type:
          type: string
          title: account_owner_type
          description: EU / SEPA account owner type
        first_name:
          type: string
          title: first_name
          description: EU / SEPA account owner first name
        last_name:
          type: string
          title: last_name
          description: EU / SEPA account owner last name
        bank_code:
          type: string
          title: bank_code
          description: "JP Zengin code (format: \"XXXX-XXX\"), GB sort code, or ZA EFT branch\n code. CA / EFT combines its 3-digit institution number and 5-digit\n transit number into a single \"III-TTTTT\" string here instead."
        identifier_type:
          type: string
          title: identifier_type
          description: BR / PIX identifier type
        identifier_value:
          type: string
          title: identifier_value
          description: BR / PIX key value
        bank_account_number_type:
          type: string
          title: bank_account_number_type
          description: AR / COELSA account number type (CBU, CVU, ALIAS)
      title: BankAccountDetails
      additionalProperties: false
    bastion.common.Chain:
      type: string
      title: Chain
      enum:
      - CHAIN_UNSPECIFIED
      - ETHEREUM_MAINNET
      - POLYGON_MAINNET
      - ETHEREUM_TESTNET
      - OPTIMISM_SEPOLIA
      - BASE_MAINNET
      - BASE_SEPOLIA
      - OPTIMISM_MAINNET
      - POLYGON_AMOY
      - SOLANA_MAINNET
      - SOLANA_DEVNET
      description: Chain identifier
      example: ETHEREUM_MAINNET
    bastion.common.ContractEvent:
      type: object
      properties:
        event_name:
          type: string
          title: event_name
          description: Name of the emitted contract event (e.g. `Transfer`).
        event_info:
          type: object
          title: event_info
          additionalProperties:
            allOf:
            - $ref: '#/components/schemas/google.protobuf.ListValue'
            title: value
          description: Decoded event parameters, keyed by parameter name.
        contract_address:
          type: string
          title: contract_address
          description: Address of the contract that emitted the event.
      title: ContractEvent
      additionalProperties: false
    bastion.common.Country:
      type: string
      title: Country
      enum:
      - US
      - CA
      - MX
      - CR
      - DO
      - GT
      - HN
      - JM
      - SV
      - AR
      - BO
      - BR
      - CL
      - CO
      - EC
      - PE
      - AT
      - BE
      - BG
      - CH
      - CY
      - CZ
      - DE
      - DK
      - EE
      - ES
      - FI
      - FR
      - GR
      - HR
      - HU
      - IE
      - IT
      - LT
      - LU
      - LV
      - MT
      - NL
      - 'NO'
      - PL
      - PT
      - RO
      - SE
      - SI
      - SK
      - AE
      - EG
      - IL
      - JO
      - QA
      - SA
      - GH
      - KE
      - ZA
      - AU
      - ID
      - IN
      - JP
      - KR
      - MY
      - PH
      - PK
      - SG
      - TH
      - GB
      description: ISO 3166-1 alpha-2 country code.
      example: US
    bastion.common.CryptocurrencyAssetType:
      type: string
      title: CryptocurrencyAssetType
      enum:
      - CRYPTOCURRENCY_ASSET_TYPE_UNSPECIFIED
      - BASE
      - ERC20
      - SPL
      example: BASE
    bastion.common.DestinationType:
      type: string
      title: DestinationType
      enum:
      - DESTINATION_TYPE_UNSPECIFIED
      - ON_CHAIN
      - ACCOUNT
      description: "Destination type for a cryptocurrency transfer.\n\n - `ON_CHAIN`: External transfer to a blockchain address.\n - `ACCOUNT`: Internal P2P transfer to another Bastion account."
      example: ON_CHAIN
    bastion.common.DeviceSignals:
      type: object
      properties:
        ip_address:
          type: string
          title: ip_address
          description: Accepts either IPv4 or IPv6 addresses
        device_id:
          type: string
          title: device_id
          description: Opaque string; format varies by platform (Apple/Google/Samsung-Android).
      title: DeviceSignals
      additionalProperties: false
      description: "DeviceSignals carries client device/network identifiers captured at\n request time for value-moving, user-initiated endpoints."
    bastion.common.Document:
      type: object
      properties:
        file_data:
          type: string
          title: file_data
          description: "Base64 encoded image of the document *following the data-uri scheme (e.g. data:image/[type];base64,[base_64_encoded_file_contents])*.\n Maximum File Size: 10MB\n Valid file types: .pdf, .jpeg, .jpg, .png, .heic, .tif"
        issuing_country:
          type: string
          title: issuing_country
          description: Country that issued the document
        issued_date:
          type: string
          title: issued_date
          description: Date the document was issued in format yyyy-mm-dd
        type:
          allOf:
          - $ref: '#/components/schemas/bastion.common.DocumentType'
          title: type
          description: Type of the document
      title: Document
      required:
      - file_data
      - issuing_country
      - issued_date
      - type
      additionalProperties: false
      description: Document to be uploaded
    bastion.common.DocumentType:
      type: string
      title: DocumentType
      enum:
      - DOCUMENT_TYPE_UNSPECIFIED
      - DOCUMENT_TYPE_PASSPORT
      - DOCUMENT_TYPE_NATIONAL_ID
      - DOCUMENT_TYPE_DRIVER_LICENSE
      - DOCUMENT_TYPE_RESIDENCE_PERMIT
      - DOCUMENT_TYPE_FORMATION
      - DOCUMENT_TYPE_OWNERSHIP
      - DOCUMENT_TYPE_PROOF_OF_ADDRESS
      - DOCUMENT_TYPE_SOURCE_OF_FUNDS
      - DOCUMENT_TYPE_INDIVIDUAL_HOLDING
      - DOCUMENT_TYPE_BVN_NG
      - DOCUMENT_TYPE_SELFIE
      description: Type of the document
      example: DOCUMENT_TYPE_PASSPORT
    bastion.common.FailureDetails:
      type: object
      properties:
        type:
          allOf:
          - $ref: '#/components/schemas/bastion.common.FailureType.Enum'
          title: type
          description: Category of the failure.
        description:
          type: string
          title: description
          description: Human-readable explanation of the failure.
      title: FailureDetails
      additionalProperties: false
    bastion.common.FailureType.Enum:
      type: string
      title: Enum
      enum:
      - UNSPECIFIED
      - EXECUTION_ERROR
      - INVALID_NUM_OF_TOKENS
      - INVALID_CONTRACT_ACTION_INFO
      - INVALID_CONTRACT_ADDRESS
      - INVALID_CONTRACT_ACTIONS
      - INVALID_BLOCKCHAIN
      - INVALID_CONTRACT_JSON_ABI
      - INVALID_REQUEST_ID
      - TRANSACTION_NOT_FOUND
      - DUPLICATE_TRANSACTION
      - NO_USER_WALLET_FOUND
      - KEY_EXPORTED
      - INVALID_RECIPIENT_ADDRESS
      - INVALID_OFFCHAIN_SIGNABLE_MESSAGE
      - INSUFFICIENT_GAS
      - INVALID_PAYMENT_AMOUNT
      - TRANSACTION_LIMIT_POLICY_BREACHED
      - COMPLIANCE_CHECK_FAILED
      - INSUFFICIENT_FUNDS
      example: EXECUTION_ERROR
    bastion.common.FeeModel:
      type: string
      title: FeeModel
      enum:
      - FEE_MODEL_UNSPECIFIED
      - INCLUSIVE
      - DEDUCTED
      - ON_TOP
      description: Fee model for a conversion.
      example: INCLUSIVE
    bastion.common.FeeType:
      type: string
      title: FeeType
      enum:
      - FEE_TYPE_UNSPECIFIED
      - PLATFORM
      - DEVELOPER
      description: Type of fee charged on a conversion.
      example: PLATFORM
    bastion.common.IDVCheckReason:
      type: string
      title: IDVCheckReason
      enum:
      - IDV_CHECK_REASON_UNSPECIFIED
      - ONBOARDING
      - ACCOUNT_RECOVERY
      - RFI
      example: ONBOARDING
    bastion.common.IDVCheckStatus:
      type: string
      title: IDVCheckStatus
      enum:
      - IDV_CHECK_STATUS_UNSPECIFIED
      - IN_PROGRESS
      - APPROVED
      - REJECTED
      - VERIFICATION_URL_EXPIRED
      example: IN_PROGRESS
    bastion.common.IdentityType:
      type: string
      title: IdentityType
      enum:
      - IDENTITY_TYPE_UNSPECIFIED
      - INDIVIDUAL
      - BUSINESS
      description: "Identity type\n\n > ℹ️ BUSINESS accounts are only supported in the US at this time."
      example: INDIVIDUAL
    bastion.common.JwkEcPublicKey:
      type: object
      properties:
        kid:
          type: string
          title: kid
        kty:
          type: string
          title: kty
        crv:
          type: string
          title: crv
        x:
          type: string
          title: x
        y:
          type: string
          title: y
      title: JwkEcPublicKey
      required:
      - kty
      - crv
      - x
      - y
      additionalProperties: false
    bastion.common.Priority:
      type: string
      title: Priority
      enum:
      - PRIORITY_UNSPECIFIED
      - PRIORITY_NORMAL
      - PRIORITY_HIGH
      - PRIORITY_URGENT
      description: "Optional inclusion priority for the cryptocurrency transfer transaction. Higher priority results in faster confirmation times but higher gas fee spend.\n\n > ⚠️ **Transaction Priority**\n >\n > Setting a higher priority expedites your transaction by increasing the gas price used to submit the transaction.\n >\n > Please note, however, that high-priority transfers may be delayed if the account has pending lower-priority transactions that must be processed first in sequence."
      example: PRIORITY_NORMAL
    bastion.common.TransactionLimitEvaluationWindow:
      type: string
      title: TransactionLimitEvaluationWindow
      enum:
      - TRANSACTION_LIMIT_EVALUATION_WINDOW_UNSPECIFIED
      - PAST_WEEK
      - PER_TRANSACTION
      - PAST_DAY
      description: "The evaluation window of a transaction limit policy.\n PAST_WEEK / PAST_DAY evaluate the aggregate amount transacted by the identity over the trailing 7-day / 1-day window; PER_TRANSACTION evaluates the amount transacted in a single transaction."
      example: PAST_WEEK
    bastion.common.TransactionLimitManagedBy:
      type: string
      title: TransactionLimitManagedBy
      enum:
      - TRANSACTION_LIMIT_MANAGED_BY_UNSPECIFIED
      - BASTION
      - CUSTOMER
      description: "Who manages a transaction limit policy.\n BASTION means the policy is created and owned by Bastion; CUSTOMER means it is set by the customer."
      example: BASTION
    bastion.common.TransactionLimitScope:
      type: string
      title: TransactionLimitScope
      enum:
      - TRANSACTION_LIMIT_SCOPE_UNSPECIFIED
      - IDENTITY_SCOPED
      - APP_SCOPED
      description: "The scope of a transaction limit policy.\n Valid values are IDENTITY_SCOPED, meaning that the policy only applies to a specific identity, or APP_SCOPED, meaning that the policy applies to all identities associated with your app."
      example: IDENTITY_SCOPED
    bastion.common.TransactionLimitThresholdCurrency:
      type: string
      title: TransactionLimitThresholdCurrency
      enum:
      - TRANSACTION_LIMIT_THRESHOLD_CURRENCY_UNSPECIFIED
      - USD
      description: "The currency of a transaction limit policy.\n At the moment, only USD is supported."
      example: USD
    bastion.common.TransactionLimitThresholdType:
      type: string
      title: TransactionLimitThresholdType
      enum:
      - TRANSACTION_LIMIT_THRESHOLD_TYPE_UNSPECIFIED
      - HARD
      - SOFT
      description: "The threshold type of a transaction limit policy.\n Valid values are HARD, meaning that exceeding the threshold will cause a transaction to be blocked, or SOFT, meaning exceeding the threshold will result in an alert to be delivered via webhook notification."
      example: HARD
    bastion.common.TransactionLimitTransactionType:
      type: string
      title: TransactionLimitTransactionType
      enum:
      - TRANSACTION_LIMIT_TRANSACTION_TYPE_UNSPECIFIED
      - CRYPTO_TRANSFER
      - CONVERSION_ONRAMP
      - CONVERSION_OFFRAMP
      description: "The product lane a transaction limit policy applies to.\n Conversion direction is encoded directly in the type: CONVERSION_ONRAMP for on-ramps,\n CONVERSION_OFFRAMP for off-ramps."
      example: CRYPTO_TRANSFER
    bastion.common.UpdateReason:
      type: string
      title: UpdateReason
      enum:
      - UPDATE_REASON_UNSPECIFIED
      - USER_INITIATED
      - EDD_REQUEST
      - DATA_CORRECTION
      example: USER_INITIATED
    bastion.common.kyc.IndividualSourceOfFunds:
      type: string
      title: IndividualSourceOfFunds
      enum:
      - INDIVIDUAL_SOURCE_OF_FUNDS_UNSPECIFIED
      - EMPLOYMENT_SALARY
      - BUSINESS_OWNERSHIP
      - INVESTMENTS
      - SAVINGS
      - LOAN
      - GIFT
      - SALE_OF_ASSETS
      - INHERITANCE
      example: EMPLOYMENT_SALARY
    bastion.common.kyc.Occupation:
      type: string
      title: Occupation
      enum:
      - OCCUPATION_UNSPECIFIED
      - AGRICULTURE
      - ART_AND_ENTERTAINMENT
      - BUSINESS_MANAGEMENT
      - COMPUTERS_AND_IT
      - CONSTRUCTION_AND_REAL_ESTATE
      - EDUCATION
      - FINANCE_AND_INSURANCE
      - FOOD_BEVERAGE_AND_HOSPITALITY
      - GOVERNMENT_AND_PUBLIC_ADMINISTRATION
      - HEALTHCARE
      - HOSPITALITY
      - MANUFACTURING
      - MINING
      - MARKETING
      - MEDIA
      - SCIENCE
      - STUDENT
      - TRANSPORTATION
      - UNEMPLOYED
      - OTHER
      - RETIRED
      example: AGRICULTURE
    bastion.common.kyc.account_purpose.IndividualAccountPurpose:
      type: string
      title: IndividualAccountPurpose
      enum:
      - INDIVIDUAL_ACCOUNT_PURPOSE_UNSPECIFIED
      - PAYROLL
      - SAVINGS
      - PERSONAL_OR_LIVING_EXPENSES
      - PURCHASE_GOODS_AND_SERVICES
      - PAYMENTS_TO_FRIENDS_OR_FAMILY_ABROAD
      - RECEIVE_PAYMENTS_FOR_GOODS_AND_SERVICES
      - TRADING
      example: PAYROLL
    google.protobuf.ListValue:
      type: array
      items:
        $ref: '#/components/schemas/google.protobuf.Value'
    google.protobuf.NullValue:
      type: string
      title: NullValue
      enum:
      - NULL_VALUE
      description: "Represents a JSON `null`.\n\n `NullValue` is a sentinel, using an enum with only one value to represent\n the null value for the `Value` type union.\n\n A field of type `NullValue` with any value other than `0` is considered\n invalid. Most ProtoJSON serializers will emit a `Value` with a `null_value`\n set as a JSON `null` regardless of the integer value, and so will round trip\n to a `0` value."
      example: NULL_VALUE
    google.protobuf.Struct:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/google.protobuf.Value'
    google.protobuf.Timestamp:
      type: string
      examples:
      - '2023-01-15T01:30:15.01Z'
      - '2024-12-25T12:00:00Z'
      format: date-time
    google.protobuf.Value:
      oneOf:
      - type: 'null'
      - type: number
      - type: string
      - type: boolean
      - type: array
      - type: object
        additionalProperties: true
  securitySchemes:
    auth:
      type: http
      description: Bearer authentication with an API token
      scheme: bearer
security:
- auth: []
tags:
- name: Bastion APIs
