> ## Documentation Index
> Fetch the complete documentation index at: https://docs.busha.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Approve, reject or cancel a held business transfer

> An approver decides a transfer held for approval. Approving requires the approver's authenticator code in
`code`; a wrong or missing code answers `invalid_auth_code` and leaves the transfer pending. Rejecting moves
no money, so it needs no code. An approved transfer converts at the market price when it runs. Nobody may
decide a transfer they started (`403`), and an API key may not decide one (`403`); the policy's approver roles,
not a scope, decide who may. The member who started it may `cancel` it before a decision. The
window is 24 hours, or until the pay-in closes for a transfer paid by deposit: a decision after it answers
`409 resource_state_conflict`, and the transfer is cancelled.




## OpenAPI

````yaml https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/transfers/{id}/approval
openapi: 3.0.0
info:
  title: Busha API
  contact:
    email: developers@busha.co
  description: >
    ## Introduction

    The **Busha API** is designed to provide businesses with tools for
    borderless financial transactions and operations, enabling modern, global
    money management. It serves as the backbone for facilitating:

    - Creation and management of multi-currency balances

    - Retrieval of real-time cryptocurrency rates

    - Substantial data insights for business owners


    Whether you’re a product-driven fintech or a developer building
    integrations, this API significantly accelerates implementation while
    reducing financial complexities.

    For detailed guides on API integration, visit our [official
    documentation]().



    ## Authentication

    All API requests require a **Bearer Token** for authentication, passed in
    the `Authorization` header.

    Your authorization value is a base64 encoded value of your api key and your
    secret key.

    You can obtain API tokens via your Busha user or business account.
    Authentication is mandatory to ensure secure and authorized interactions
    with the API.

    The API keys from the dashboard provides a base64 encoding of the your
    authorization tokens.


    Your generated Key should look like this:

    `VURtNXhWcHueantkpaiewjo0S044MWsadfojienuoxRTiWDJaeWJaTGxxanZ3Ym10OU1RZnVWajVW=`


    Example Header:

    ``` curl

    Authorization: Bearer
    VURtNXhWcHueantkpaiewjo0S044MWsadfojienuoxRTiWDJaeWJaTGxxanZ3Ym10OU1RZnVWajVW=

    ```


    ## Error Handling

    #Standardized error responses ensure predictable interactions. Errors are
    detailed for easy debugging and understanding:

    | **Error Code** | **HTTP Status Code** | **Description** |

    | --- | --- | --- |

    | `bad_request` | 400 | Invalid input or malformed request |

    | `unauthorized` | 401 | Invalid or missing authentication |

    | `not_found` | 404 | Resource not found |

    | `service_unavailable` | 503 | Server error |


    Basic Error Example:

    ``` json

    {
      "error": {
        "name": "bad_request",
        "message": "Invalid input data"
      }
    }

    ```


    Schema Error Body Example:

    ``` json

    {
      "error": {
        "name": "bad_request",
        "message": "Invalid input data"
      },
      "schema": {
        "reason": "The request body is defined as an object. However, it does not meet the schema requirements of the specification",
        "fix": "Ensure that the object being submitted, matches the schema correctly"
      }
    }

    ```


    Field Error Body Example:

    ``` json

    {
      "error": {
        "name": "bad_request",
        "message": "Invalid input data"
      },
      "fields": {
        "field1": [
          {
            "reason": "The request body is defined as an object. However, it does not meet the schema requirements of the specification",
          },
        ],
        "field2": [
          {
            "reason": "The request body is defined as an object. However, it does not meet the schema requirements of the specification",
          }
        ],
      }
    }

    ```


    ## Pagination

    Pagination uses cursors provided as:

    The API supports **cursor-based pagination** for endpoints with large
    datasets. Pagination uses a `next_cursor` and `previous_cursor` returned in
    the response.

    Example Response Format:

    ``` json

    {
      "current_entries_size": 10,
      "next_cursor": "base64_cursor_value",
      "previous_cursor": "base64_previous_cursor_value"
    }

    ```


    ## Rate Limiting

    Rate limits determine how many API calls can be made in a rolling minute.
    This ensures fair and optimized use of system resources.


    The rate limits allowed by each resource will be provided with the header:

    ```curl

    x-rate-limit 100

    ```

    If this header does not exist, then the rate limit is set at a default 100
    req/min


    Requests exceeding the allocated quota will receive a `429 Too Many
    Requests` response.


    ## Rejected business verification

    A business whose verification was rejected is view-only. Every request from
    its members that changes state answers `400` with `error.name =
    "profile_rejected"`, including operations whose per-operation error contract
    does not list that name. Reads, the caller's own session, and notifications
    stay available. Contact support to reopen the case.


    ##  Common Parameters

    Common parameters enhance consistency across endpoints:
      | **Parameter Name** | **Location** | **Description** | **Example** |
      | --- | --- | --- | --- |
      | `X-BU-PROFILE-ID` | Header | User profile identifier | `BUS_qwejinoiuiqw93ejjw` |
      | `id` | Path | Unique NanoID identifier | `dpt_jweqafajsndiun34fd` |
      | `cursor` | Query | Pagination cursor | `base64_cursor_string` |

    #### Paginated Response Example
      ``` json
      {
        "status": "success",
        "message": "Data retrieved",
        "pagination": {
          "next_cursor": "value_for_next_page",
          "current_entries_size": 20
        },
        "data": [...]
      }
      ```
  version: 1.0.0
servers:
  - url: https://api.sandbox.busha.so
    description: Sandbox Environment
  - url: https://api.busha.io
    description: Production Environment
security: []
tags:
  - name: Balances
    description: Handles account balances across different currencies.
  - name: Currencies
    description: >
      Endpoints to manage supported currencies, their properties, and network
      details.
  - name: Customers
    description: Handle customer requests and responses
  - name: Files
    description: Provides APIs to handle files upload
  - name: Insights
    description: Business analytics insights endpoints
  - name: Miscellaneous
    description: Provides auxiliary APIs to complement and enhance other services.
  - name: Pairs
    description: Access trading pair information and rates
  - name: PaymentLinks
    description: Payment Links
  - name: PaymentRequests
    description: Payment request
  - name: Pledges
    description: Customer-authorized pledge lifecycle APIs
  - name: Quotes
    description: Handle quotes requests and responses
  - name: Recipients
  - name: Transactions
  - name: Transfers
paths:
  /v1/transfers/{id}/approval:
    post:
      tags:
        - Transfers
      summary: Approve, reject or cancel a held business transfer
      description: >
        An approver decides a transfer held for approval. Approving requires the
        approver's authenticator code in

        `code`; a wrong or missing code answers `invalid_auth_code` and leaves
        the transfer pending. Rejecting moves

        no money, so it needs no code. An approved transfer converts at the
        market price when it runs. Nobody may

        decide a transfer they started (`403`), and an API key may not decide
        one (`403`); the policy's approver roles,

        not a scope, decide who may. The member who started it may `cancel` it
        before a decision. The

        window is 24 hours, or until the pay-in closes for a transfer paid by
        deposit: a decision after it answers

        `409 resource_state_conflict`, and the transfer is cancelled.
      operationId: decideTransferApproval
      parameters:
        - $ref: '#/components/parameters/PathParamNanoID'
        - $ref: '#/components/parameters/ProfileHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecideTransferApprovalRequest'
      responses:
        '200':
          $ref: '#/components/responses/TransferResponse'
        4XX:
          $ref: '#/components/responses/TransferError4XX'
        5XX:
          $ref: '#/components/responses/TransferError5XX'
      security:
        - Auth:
            - transfers:read
components:
  parameters:
    PathParamNanoID:
      in: path
      name: id
      required: true
      schema:
        type: string
        format: nanoid
        example: bus_123456789
    ProfileHeader:
      in: header
      name: X-BU-PROFILE-ID
      required: false
      description: User profile header
      schema:
        type: string
        example: BUS_YOK8tp5Zga01qOKEsqp07
  schemas:
    DecideTransferApprovalRequest:
      type: object
      required:
        - decision
      properties:
        decision:
          type: string
          enum:
            - approve
            - reject
            - cancel
          example: approve
        reason:
          type: string
          maxLength: 500
          description: >-
            Why the approver declined it, shown to the requester as the decision
            context.
          example: Approved for the supplier payment
        code:
          type: string
          description: >
            The approver's authenticator code; required to approve. Rejecting or
            cancelling moves no money, so it is

            accepted without one.
          example: '492817'
    BaseSchema:
      description: General response Values
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - success
            - error
          example: success
        message:
          type: string
          example: message for success
    Transfer:
      type: object
      required:
        - id
        - quote_id
        - description
        - sub_description
        - source_currency
        - target_currency
        - source_amount
        - target_amount
        - profile_id
        - created_at
        - updated_at
        - status
        - rate
        - fees
      properties:
        id:
          $ref: '#/components/schemas/ResourceID'
        quote_id:
          $ref: '#/components/schemas/NanoID'
        reference:
          $ref: '#/components/schemas/QuoteReference'
        stages:
          type: array
          description: Ordered pipeline steps included in the transfer flow.
          example:
            - deposit
            - conversion
          items:
            type: string
            enum:
              - deposit
              - conversion
              - withdrawal
        category:
          type: string
          description: Computed shorthand derived from the transfer stages.
          example: buy
          enum:
            - deposit
            - withdrawal
            - conversion
            - buy
            - sell
            - send
            - exchange
        description:
          type: string
          example: Bought Bitcoin
        sub_description:
          type: string
          example: With Naira
        source_currency:
          allOf:
            - $ref: '#/components/schemas/Currency'
        target_currency:
          allOf:
            - $ref: '#/components/schemas/Currency'
        source_amount:
          allOf:
            - $ref: '#/components/schemas/Decimal'
        target_amount:
          allOf:
            - $ref: '#/components/schemas/Decimal'
        trade:
          type: string
          example: buy
        profile_id:
          $ref: '#/components/schemas/NanoID'
        rate:
          allOf:
            - $ref: '#/components/schemas/QuoteRate'
        fees:
          type: array
          items:
            $ref: '#/components/schemas/Fee'
        pay_in:
          allOf:
            - $ref: '#/components/schemas/TransferPayInObj'
        pay_out:
          allOf:
            - $ref: '#/components/schemas/PaymentObj'
        status:
          allOf:
            - $ref: '#/components/schemas/TransferStatus'
        timeline:
          allOf:
            - $ref: '#/components/schemas/TransferTimeline'
        expires_at:
          type: string
          format: date-time
          example: '2023-12-01T15:04:05Z'
        created_at:
          type: string
          format: date-time
          example: '2023-10-15T12:15:30Z'
        updated_at:
          type: string
          format: date-time
          example: '2023-10-15T12:20:45Z'
        liveness:
          allOf:
            - $ref: '#/components/schemas/TransferLivenessHold'
        notice:
          allOf:
            - $ref: '#/components/schemas/TransferNotice'
        owner_approval:
          allOf:
            - $ref: '#/components/schemas/TransferOwnerApproval'
        initiated_by:
          allOf:
            - $ref: '#/components/schemas/TransferInitiator'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - name
            - message
          properties:
            name:
              type: string
              example: bad_request
            message:
              type: string
              example: Invalid Request
        fields:
          type: object
        schema:
          type: array
          items:
            $ref: '#/components/schemas/SchemaViolation'
      example:
        error:
          name: bad_request
          message: Invalid Request
    ResourceID:
      type: string
      example: bus_123456789
      format: string
      description: A valid id
    NanoID:
      type: string
      example: bus_123456789
      format: nanoid
      description: A valid id
    QuoteReference:
      type: string
      example: QUO_123456abc
      maxLength: 64
      minLength: 12
    Currency:
      type: string
      example: BTC
      format: string
      maxLength: 10
      minLength: 1
      description: A valid currency
    Decimal:
      type: string
      description: decimal value
      example: '100'
    QuoteRate:
      type: object
      properties:
        product:
          type: string
          example: BTCUSDT
        rate_explained:
          type: string
          example: 1 BTC = 1000 USDT
        source_currency:
          $ref: '#/components/schemas/Currency'
        target_currency:
          $ref: '#/components/schemas/Currency'
        rate:
          $ref: '#/components/schemas/Decimal'
        side:
          type: string
          enum:
            - buy
            - sell
          example: sell
        type:
          type: string
          enum:
            - FIXED
          example: FIXED
        base_rate:
          $ref: '#/components/schemas/Decimal'
        discount:
          $ref: '#/components/schemas/QuoteRateDiscount'
    Fee:
      type: object
      required:
        - name
        - amount
        - type
      properties:
        name:
          type: string
          example: processing_fee
        amount:
          $ref: '#/components/schemas/AmountWithCurrency'
        converted_amount:
          $ref: '#/components/schemas/AmountWithCurrency'
        type:
          $ref: '#/components/schemas/FeeType'
    TransferPayInObj:
      allOf:
        - $ref: '#/components/schemas/PaymentObj'
        - type: object
          properties:
            payer_details:
              $ref: '#/components/schemas/RecipientDetails'
    PaymentObj:
      allOf:
        - $ref: '#/components/schemas/PayOutObj'
        - type: object
          properties:
            profile_id:
              type: string
              example: profile-id-1234
            memo:
              type: string
              example: address memo
            recipient_details:
              $ref: '#/components/schemas/RecipientDetails'
            blockchain_hash:
              type: string
              example: 31b99c79e2fb7554d0a9421867a53a80e6810cdfd2b06826eec1b2a22974b171
            blockchain_url:
              type: string
              example: >-
                https://explorer.com/tx/31b99c79e2fb7554d0a9421867a53a80e6810cdfd2b06826eec1b2a22974b171
            session_id:
              type: string
              example: 31b99c79e2fb7554d0a9421867a53a80e6810cdfd2b06826eec1b2a22974b171
            from_address:
              type: string
              example: 31b99c79e2fb7554d0a9421867a53a80e6810cdfd2b06826eec1b2a22974b171
            expires_at:
              type: string
              format: date-time
              example: '2023-10-15T12:15:30Z'
    TransferStatus:
      type: string
      description: Status of a transfer
      enum:
        - pending
        - processing
        - cancelled
        - funds_converted
        - funds_received
        - outgoing_payment_sent
        - funds_delivered
        - funds_not_delivered
        - funds_refunded
        - reverse_fund_conversion
    TransferTimeline:
      type: object
      required:
        - total_steps
        - current_step
        - transfer_status
        - events
      properties:
        total_steps:
          type: integer
        current_step:
          type: integer
        transfer_status:
          type: string
        events:
          type: array
          items:
            $ref: '#/components/schemas/Timeline'
    TransferLivenessHold:
      type: object
      description: >
        Present when the payout was held for the customer's selfie. While the
        transfer is `pending`, open the selfie

        with `POST /v1/transfers/{id}/liveness`.
      required:
        - required
      properties:
        required:
          type: boolean
          example: true
    TransferNotice:
      type: object
      description: Why the transfer stopped, for the customer to read.
      properties:
        type:
          type: string
          description: >
            What stopped it. A payout held for a selfie ends with
            `liveness_failed`, `liveness_expired`,

            `quote_expired` (its price ran out while it waited) or
            `payout_not_approved` (support declined it);

            a business transfer held for its owner ends with
            `transfer_not_approved` or `quote_expired`.
          example: liveness_expired
        stage:
          type: string
          example: approval
        text:
          type: string
          example: The selfie wasn't taken in time. Transfer cancelled.
    TransferOwnerApproval:
      type: object
      description: >
        Present on a business transfer held for approval, from the hold to its
        outcome. An approver decides it with

        `POST /v1/transfers/{id}/approval`; the requester's own two-step is
        unchanged.
      required:
        - required
        - status
      properties:
        required:
          type: boolean
          description: Whether it still waits for a decision.
          example: true
        status:
          type: string
          enum:
            - pending
            - approved
            - rejected
            - expired
            - cancelled
          example: pending
        requested_by:
          type: string
          description: The user who started the transfer; empty for one an API key started.
          example: 6f1c2a8e-4c1b-4f0a-9d3e-2b7a1c9e0f11
        requested_by_name:
          type: string
          description: >-
            The requester's name, so approvers who cannot read the team list see
            who asked; empty for one an API key started.
          example: Ada Palm
        via_api:
          type: boolean
          description: Whether an API key started it.
          example: false
        expires_at:
          type: string
          format: date-time
          description: >
            When the window closes: 24 hours for a transfer paid from the
            balance, or when the pay-in closes for one

            paid by deposit. A decision after it answers `409
            resource_state_conflict`, and the transfer is

            cancelled when the request closes.
          example: '2026-11-20T17:30:00Z'
        decided_by:
          type: string
          description: >-
            The user who approved, rejected or cancelled it; empty while it
            waits and when it expired.
          example: 0b6a2f1e-7c3d-4e5f-8a9b-1c2d3e4f5a6b
        decided_by_name:
          type: string
          description: The decider's name.
          example: Kemi Palm
        decided_at:
          type: string
          format: date-time
          description: When it was decided or expired; empty while it waits.
          example: '2026-11-20T12:05:00Z'
        reason:
          type: string
          description: The reason the approver gave for a rejection.
          example: Wrong supplier account
        policy:
          $ref: '#/components/schemas/OwnerApproval'
    TransferInitiator:
      type: object
      description: >
        Who made a business transfer: the team member signed in to the
        dashboard, or the API key that called the API.

        A limit or recurring order's transfers name whoever placed the order.
        Absent on personal transfers, on

        transfers of a business's sub-account customers, on ones a scheduled
        flow made (such as a savings plan), on a

        payment link paid by someone outside the business, and on business
        transfers made before this was recorded.
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - member
            - api_key
          example: member
        user_id:
          type: string
          description: The member's user id; empty for an API key.
          example: 6f1c2a8e-4c1b-4f0a-9d3e-2b7a1c9e0f11
        name:
          type: string
          description: The member's name when they made it; empty for an API key.
          example: Ada Palm
        api_key_id:
          type: string
          description: >-
            The API key's id; empty for a member, and for a partner app signed
            in with OAuth2.
          example: 0b6a2f1e-7c3d-4e5f-8a9b-1c2d3e4f5a6b
        api_key_label:
          type: string
          description: The API key's label when it made the transfer.
          example: Payouts server
    SchemaViolation:
      type: object
      description: >
        One thing wrong with the request body: in prose for a person, and in a
        code and a pointer for a program. `reason` and `fix` are written by the
        validation library and their wording changes between releases of it;
        `code` and `pointer` do not, so branch on those.
      properties:
        reason:
          type: string
          description: >-
            What is wrong, in prose. For a person reading a log, not for code to
            match on.
          example: missing property 'additional_info'
        fix:
          type: string
          description: What to do about it, in prose.
          example: Ensure that the object being submitted, matches the schema correctly
        code:
          type: string
          description: >
            What is wrong, as a stable token. `missing-property` for a required
            property left out, `type-mismatch` for a value of the wrong JSON
            type, `enum-mismatch` for a value outside the documented set,
            `pattern-mismatch` for a string that fails its pattern,
            `unknown-property` for a property the endpoint does not declare,
            `malformed-json` for a body that is not JSON at all, and
            `constraint-<keyword>` for any other JSON Schema keyword the body
            tripped.
          example: missing-property
        pointer:
          type: string
          description: >
            Where it is wrong: an RFC 6901 JSON Pointer into the request body.
            The empty string points at the body itself, which is the answer when
            no single property is at fault.
          example: /additional_info
        schema_validation_error:
          type: array
          description: The validator's own specifics, where it produced any.
          items:
            type: string
          example:
            - 'minLength: got 3, want 12'
    QuoteRateDiscount:
      type: object
      description: >
        A volume discount the trade size earned. `rate` already includes it.
        Absent when no discount applied.
      required:
        - percentage
        - saved
        - tier
      properties:
        percentage:
          allOf:
            - $ref: '#/components/schemas/Decimal'
          description: Percent off the base rate. "0.10" is 0.10%.
          example: '0.10'
        saved:
          allOf:
            - $ref: '#/components/schemas/AmountWithCurrency'
          description: >
            What the discount is worth before fees: extra of the currency
            received, or less of the currency paid.
        tier:
          $ref: '#/components/schemas/QuoteRateDiscountTier'
    AmountWithCurrency:
      type: object
      description: Amount with currency
      required:
        - amount
        - currency
      properties:
        amount:
          $ref: '#/components/schemas/Decimal'
        currency:
          $ref: '#/components/schemas/Currency'
    FeeType:
      type: string
      enum:
        - FIXED
        - PERCENTAGE
        - TIERED
      example: FIXED
    RecipientDetails:
      type: object
      properties:
        account_name:
          type: string
        bank_name:
          type: string
        account_number:
          type: string
        country_code:
          type: string
          example: NG
        provider:
          type: string
        iban:
          type: string
          example: NG12345678901234567890
        currency:
          type: string
        phone_number:
          type: string
        name:
          type: string
        email:
          type: string
          example: recipient@example.com
        bank_code:
          type: string
          example: '100020'
    PayOutObj:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          example: address
          description: |
            The payout type. `sweep` is not available to API keys and is
            rejected on API-key requests.
          enum:
            - address
            - bank_transfer
            - mobile_money
            - paybill
            - till
            - payout_batch
            - balance
            - savings
            - direct_debit
            - sweep
            - internal
        recipient_id:
          type: string
          example: 64f00000000000000000000a
          description: >
            This represents the recipient ID, used for `mobile_money` and
            `bank_transfer` types.

            For `payout_batch`, this should contain the payout batch ID.
        address:
          type: string
          example: tb1qj4263506wyu8khrz2dwce0agk8lhyjgy269rxr
          description: >
            This could be the address, user email or username for type
            `address`. For type `sweep`, this is the email of the destination
            account. Required when the sender is the master (master -> sub);
            optional when the sender is a sub-account (the destination master is
            resolved automatically from the sub's parent business).

            For type `internal`, this is the destination Busha profile ID,
            destination email, or a public key that resolves to the owning
            business profile.
        network:
          type: string
          example: BTC
          description: >
            This specifies the blockchain network associated with the address
            receiving the payment, typically used with address type payouts.
        memo:
          type: string
          example: memo
          description: >
            This refers to the memo required for blockchain networks that
            mandate a memo for cryptocurrency transactions.
        narration:
          type: string
          example: Payment for services
          description: >
            A narration or description for the withdrawal. Required for USD bank
            transfer withdrawals.
        payment_invoice_url:
          type: string
          example: https://cdn.busha.co/invoices/INV-2026-001.pdf
          description: >
            URL of the payment invoice or supporting document, as issued by the
            platform's upload link

            (`POST /v1/files`). Required for business account USD withdrawals
            and personal account USD

            withdrawals exceeding $10,000.
    Timeline:
      type: object
      required:
        - step
        - done
        - status
        - title
        - description
      properties:
        step:
          type: integer
          example: 1
        done:
          type: boolean
          example: true
        status:
          type: string
          enum:
            - pending
            - processing
            - funds_converted
            - funds_received
            - outgoing_payment_sent
            - funds_delivered
            - reverse_fund_conversion
            - failed
            - completed
        title:
          type: string
          example: Transfer started
        description:
          type: string
          example: Transfer started
          description: Waiting for payment
        timestamp:
          type: string
          format: date-time
          example: '2023-10-15T12:15:30Z'
    OwnerApproval:
      type: object
      required:
        - policy_type
      properties:
        policy_type:
          type: string
          enum:
            - all
            - threshold
          example: threshold
          description: >-
            The policy that held the quote, all transfers or a threshold; a
            threshold carries the amount and currency it was at or above.
        amount:
          type: string
          format: decimal
          description: The threshold; only the threshold policy carries it.
          example: '1000'
        currency:
          type: string
          description: The threshold's currency; only the threshold policy carries it.
          example: USD
    QuoteRateDiscountTier:
      type: object
      description: The rung the trade reached.
      required:
        - from
        - currency
      properties:
        from:
          allOf:
            - $ref: '#/components/schemas/Decimal'
          description: The rung starts at trades of this size.
          example: '10000'
        currency:
          $ref: '#/components/schemas/Currency'
  responses:
    TransferResponse:
      description: Transfer Response
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/BaseSchema'
              - type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/Transfer'
    TransferError4XX:
      description: Default
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            default:
              $ref: '#/components/examples/DefaultError'
            not_found_error:
              $ref: '#/components/examples/NotFoundError'
            unauthorized_error:
              $ref: '#/components/examples/UnAuthorizedError'
            request_validation_error:
              $ref: '#/components/examples/RequestValidationError'
            schema_validation_error:
              $ref: '#/components/examples/SchemaValidationError'
    TransferError5XX:
      description: Server error when processing the transfer request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internal_server_error:
              $ref: '#/components/examples/InternalServerError'
            service_unavailable_error:
              $ref: '#/components/examples/ServiceUnavailableError'
  examples:
    DefaultError:
      description: Default error
      value:
        error:
          name: bad_request
          message: Invalid request
    NotFoundError:
      description: Not Found error
      value:
        error:
          name: resource_not_found
          message: Resource Not Found
    UnAuthorizedError:
      description: Unauthorized Error
      value:
        error:
          name: unauthorized
          message: Unauthorized request
    RequestValidationError:
      description: Request Validation error example
      value:
        error:
          name: request_validation
          message: Validation error
        fields:
          field1:
            - reason: One of target and source amount must be set
          field2:
            - reason: One of target and source amount must be set
    SchemaValidationError:
      description: >
        Schema validation error example. One entry per violation, each with its
        own `code` and `pointer` naming what is wrong and where; branch on those
        rather than on the prose beside them.
      value:
        error:
          name: schema_validation
          message: Error Validating Requests
        schema:
          - reason: Missing property 'market'
            fix: >-
              Ensure that the object being submitted, matches the schema
              correctly
            code: missing-property
            pointer: /market
            schema_validation_error:
              - missing property 'market'
          - reason: 'MinLength: got 3, want 12'
            fix: >-
              Ensure that the object being submitted, matches the schema
              correctly
            code: constraint-minlength
            pointer: /additional_info/name
            schema_validation_error:
              - 'minLength: got 3, want 12'
    InternalServerError:
      description: Internal Server Error
      value:
        error:
          name: internal_server_error
          message: Internal Server Error
    ServiceUnavailableError:
      description: Service Unavailable Error
      value:
        error:
          name: service_unavailable
          message: Service Unavailable
  securitySchemes:
    Auth:
      type: http
      scheme: bearer
      description: Bearer Authentication

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.