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

# Request a withdrawal

> Provider automation path for withdrawals. With signing disabled this creates an idempotent dry-run operation. With signing enabled it plans a native EVM transaction from trusted wallet metadata and persists a signing request. Signing, signing result persistence, EVM broadcast, and receipt reconciliation are opt-in operational paths. Stale signing requests can be failed by operator-configured timeout without allowing late success results to overwrite that terminal state. Receipt reconciliation can wait for an operator-configured minimum confirmation depth before finalizing submitted withdrawals, and can optionally rebroadcast stored signed transactions or fail old submitted transactions whose receipts never appear. Gas-bumped replacement transaction handling is the next implementation milestone.




## OpenAPI

````yaml /api-reference/openapi.yaml post /api/v1/wallets/{wallet_id}/request-withdrawal
openapi: 3.0.3
info:
  title: Blockops Wallet API
  version: 0.1.0
  description: >
    The Blockops Wallet API: create MPC wallets, attach assets and read deposit
    addresses and balances, request withdrawals and signing, and manage webhooks
    and API keys.
servers:
  - url: https://wallet-sandbox.blockops.network
security:
  - AccessApiKey: []
    AccessTimestamp: []
    AccessSign: []
tags:
  - name: catalog
  - name: wallets
  - name: balances
  - name: withdrawals
  - name: transactions
  - name: signing
  - name: webhooks
  - name: api-keys
  - name: audit
  - name: observability
paths:
  /api/v1/wallets/{wallet_id}/request-withdrawal:
    post:
      tags:
        - withdrawals
      summary: Request a withdrawal
      description: >
        Provider automation path for withdrawals. With signing disabled this
        creates an idempotent dry-run operation. With signing enabled it plans a
        native EVM transaction from trusted wallet metadata and persists a
        signing request. Signing, signing result persistence, EVM broadcast, and
        receipt reconciliation are opt-in operational paths. Stale signing
        requests can be failed by operator-configured timeout without allowing
        late success results to overwrite that terminal state. Receipt
        reconciliation can wait for an operator-configured minimum confirmation
        depth before finalizing submitted withdrawals, and can optionally
        rebroadcast stored signed transactions or fail old submitted
        transactions whose receipts never appear. Gas-bumped replacement
        transaction handling is the next implementation milestone.
      parameters:
        - $ref: '#/components/parameters/WalletID'
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWithdrawalRequest'
            examples:
              snakeCase:
                value:
                  asset_id: 00000000-0000-4000-8000-000000000002
                  amount: '0.01'
                  recipient_address: '0x1111111111111111111111111111111111111111'
              camelCase:
                value:
                  assetId: 00000000-0000-4000-8000-000000000002
                  amount: '0.01'
                  recipientAddress: '0x1111111111111111111111111111111111111111'
      responses:
        '200':
          description: Existing idempotent withdrawal or signing response.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/WithdrawalOperationEnvelope'
                  - $ref: '#/components/schemas/WithdrawalSigningResponseEnvelope'
        '202':
          description: New withdrawal or signing response accepted.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/WithdrawalOperationEnvelope'
                  - $ref: '#/components/schemas/WithdrawalSigningResponseEnvelope'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          $ref: '#/components/responses/Conflict'
        '503':
          $ref: '#/components/responses/RouteUnavailable'
components:
  parameters:
    WalletID:
      name: wallet_id
      in: path
      required: true
      schema:
        type: string
    IdempotencyKey:
      name: X-Idempotency-Key
      in: header
      required: false
      schema:
        type: string
        maxLength: 128
      description: Idempotency key for write operations.
  schemas:
    CreateWithdrawalRequest:
      type: object
      description: Accepts snake_case fields and camelCase aliases.
      properties:
        asset_id:
          type: string
        assetId:
          type: string
        amount:
          type: string
        recipient_address:
          type: string
        recipientAddress:
          type: string
        to_address:
          type: string
        toAddress:
          type: string
        address:
          type: string
      required:
        - amount
      anyOf:
        - required:
            - asset_id
        - required:
            - assetId
      oneOf:
        - required:
            - recipient_address
        - required:
            - recipientAddress
        - required:
            - to_address
        - required:
            - toAddress
        - required:
            - address
    WithdrawalOperationEnvelope:
      allOf:
        - $ref: '#/components/schemas/EnvelopeBase'
        - type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/WithdrawalOperation'
    WithdrawalSigningResponseEnvelope:
      allOf:
        - $ref: '#/components/schemas/EnvelopeBase'
        - type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/WithdrawalSigningResponse'
    EnvelopeBase:
      type: object
      required:
        - success
        - message
        - code
      properties:
        success:
          type: boolean
        message:
          type: string
          example: success
        code:
          oneOf:
            - type: integer
            - type: string
          example: 0
    WithdrawalOperation:
      type: object
      required:
        - id
        - withdrawal_id
        - wallet_id
        - asset_id
        - amount
        - recipient_address
        - status
      properties:
        id:
          type: string
        withdrawal_id:
          type: string
        wallet_id:
          type: string
        asset_id:
          type: string
        network_id:
          type: string
        amount:
          type: string
        amount_base_units:
          type: string
        recipient_address:
          type: string
        from_address:
          type: string
        status:
          type: string
          enum:
            - dry_run
            - pending
            - submitted
            - failed
            - success
        status_reason:
          type: string
        tx_id:
          type: string
        tx_hash:
          type: string
        chain_id:
          type: integer
          format: int64
        block_number:
          type: integer
          format: int64
        block_hash:
          type: string
        gas_used:
          type: string
        effective_gas_price_wei:
          type: string
        confirmed_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        completed_at:
          type: string
          format: date-time
    WithdrawalSigningResponse:
      type: object
      required:
        - withdrawal
        - signing_request
      properties:
        withdrawal:
          $ref: '#/components/schemas/WithdrawalOperation'
        signing_request:
          $ref: '#/components/schemas/SigningOperation'
    ErrorEnvelope:
      allOf:
        - $ref: '#/components/schemas/EnvelopeBase'
        - type: object
          required:
            - data
          properties:
            success:
              type: boolean
              example: false
            data:
              nullable: true
    SigningOperation:
      type: object
      required:
        - id
        - signing_id
        - operation_type
        - wallet_id
        - network_internal_code
        - key_type
        - signing_hash
        - derivation_path
        - status
      properties:
        id:
          type: string
        signing_id:
          type: string
        operation_type:
          type: string
          enum:
            - withdrawal
            - generic
          default: withdrawal
        withdrawal_id:
          type: string
          nullable: true
        wallet_id:
          type: string
        network_internal_code:
          type: string
        key_type:
          type: string
          enum:
            - secp256k1
            - ed25519
        signing_hash:
          type: string
        derivation_path:
          type: string
        status:
          type: string
          enum:
            - pending
            - submitted
            - failed
            - success
        status_reason:
          type: string
        mpc_correlation_id:
          type: string
        error_code:
          type: string
        error_reason:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        completed_at:
          type: string
          format: date-time
  responses:
    BadRequest:
      description: Invalid request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Unauthorized:
      description: Authentication failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            success: false
            message: invalid api signature
            code: unauthorized
            data: null
    Conflict:
      description: Idempotency or state conflict.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    RouteUnavailable:
      description: Route disabled, upstream missing, or dependency unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    AccessApiKey:
      type: apiKey
      in: header
      name: ACCESS-API-KEY
      description: HMAC API-key identifier.
    AccessTimestamp:
      type: apiKey
      in: header
      name: ACCESS-TIMESTAMP
      description: Unix timestamp in seconds.
    AccessSign:
      type: apiKey
      in: header
      name: ACCESS-SIGN
      description: Base64-encoded hex HMAC signature.

````