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

# Create withdrawal

> Create a withdrawal from a specified bank account.



## OpenAPI

````yaml POST /withdrawals
openapi: 3.0.3
info:
  title: Wealthyhood Withdrawals API
  version: 1.0.0
  description: |
    Endpoints to create and retrieve user withdrawals.

    All requests require a bearer token and the `x-user-id` header.
servers:
  - url: https://{host}
    variables:
      host:
        default: api.wealthyhood.com
        description: Wealthyhood API host name.
security:
  - bearerAuth: []
tags:
  - name: Withdrawals
    description: Create and manage user withdrawals.
paths:
  /withdrawals:
    post:
      tags:
        - Withdrawals
      summary: Create withdrawal
      description: >-
        Create a withdrawal for a specified bank account id, amount, and
        currency.
      parameters:
        - $ref: '#/components/parameters/ExternalUserId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WithdrawalCreateRequest'
            examples:
              basic:
                value:
                  bankAccountId: ba_64f0c51e7fb3fc001234abcd
                  amount: 50
                  currency: EUR
                  reference: Withdraw to bank
      responses:
        '201':
          description: Withdrawal created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Withdrawal'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
components:
  parameters:
    ExternalUserId:
      name: x-user-id
      in: header
      description: The external user identifier of the acting customer.
      required: true
      schema:
        type: string
        example: bank-user-12345
  schemas:
    WithdrawalCreateRequest:
      type: object
      required:
        - bankAccountId
        - amount
        - currency
      properties:
        bankAccountId:
          type: string
          example: ba_64f0c51e7fb3fc001234abcd
        amount:
          type: number
          description: Amount as a positive number
          example: 50
          minimum: 0
          exclusiveMinimum: true
        currency:
          type: string
          description: ISO 4217 currency code
          example: EUR
          enum:
            - GBP
            - EUR
            - USD
        reference:
          type: string
          example: Withdraw to bank
    Withdrawal:
      type: object
      required:
        - id
        - ownerId
        - bankAccountId
        - amount
        - currency
        - status
      properties:
        id:
          type: string
          example: wd_64f0c51e7fb3fc001234abcd
        ownerId:
          type: string
          example: bank-user-12345
        bankAccountId:
          type: string
          example: ba_64f0c51e7fb3fc001234abcd
        amount:
          type: number
          description: Withdrawal amount as a number
          example: 50
          minimum: 0.01
        currency:
          type: string
          description: ISO 4217 currency code
          example: EUR
          enum:
            - GBP
            - EUR
            - USD
        consideration:
          type: object
          description: Withdrawal consideration with currency and amount
          properties:
            currency:
              type: string
              description: ISO 4217 currency code
              example: EUR
              enum:
                - GBP
                - EUR
                - USD
            amount:
              type: number
              description: Withdrawal amount in major units
              example: 50
              minimum: 0
        reference:
          type: string
          example: Withdraw to bank
        status:
          $ref: '#/components/schemas/WithdrawalStatus'
        createdAt:
          type: string
          format: date-time
    WithdrawalStatus:
      type: string
      description: Status of the withdrawal
      enum:
        - pending
        - completed
        - failed
      example: pending
    Error:
      type: object
      required:
        - message
        - code
      properties:
        message:
          type: string
          example: Invalid amount
        code:
          type: string
          example: INVALID_AMOUNT
  responses:
    BadRequestError:
      description: Bad request – invalid parameters or malformed request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Invalid amount
            code: INVALID_AMOUNT
    UnauthorizedError:
      description: Unauthorized – missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Authentication required
            code: UNAUTHORIZED
    ForbiddenError:
      description: Forbidden – valid credentials but insufficient permissions.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Access denied
            code: FORBIDDEN
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````