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

# Withdraw to a settlement account



## OpenAPI

````yaml https://api.withacclaim.com/openapi.yaml post /treasury_accounts/{treasury_account_id}/withdrawals
openapi: 3.1.0
info:
  title: Acclaim API
  version: 1.0.0
  description: >
    Payments infrastructure built for the insurance industry. This specification
    describes

    the core resources and operations for treasury accounts, payouts, funding,
    and more.


    Authentication uses a secret API key passed as a Bearer token. The API is
    JSON-only

    and available via HTTPS only.
servers:
  - url: https://api.withacclaim.com/v1
security:
  - bearerAuth: []
tags:
  - name: Treasury / Treasury Accounts
    description: Manage treasury accounts and balances.
  - name: Payees
    description: Manage recipients of payouts.
  - name: Payout Methods
    description: Manage payout methods (e.g. bank accounts) for a payee.
  - name: Payouts
    description: Create and track individual payouts.
  - name: Payout Batches
    description: Create and track groups of payouts.
  - name: Treasury / Funding
    description: Move funds between settlement accounts and treasury accounts.
  - name: Payment Requests
    description: Create and manage payment requests for collecting payments.
  - name: Setup Requests
    description: Create and manage setup requests for securely storing payment methods.
  - name: Refunds
    description: Create and manage refunds for payments.
  - name: Payers
    description: Create and manage payers for payment collection.
  - name: Payment Methods
    description: Manage payment methods (e.g. cards, bank accounts) for a payer.
paths:
  /treasury_accounts/{treasury_account_id}/withdrawals:
    post:
      tags:
        - Treasury / Funding
      summary: Withdraw to a settlement account
      parameters:
        - $ref: '#/components/parameters/TreasuryAccountId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWithdrawalRequest'
      responses:
        '201':
          description: Withdrawal created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WithdrawalTransfer'
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  parameters:
    TreasuryAccountId:
      name: treasury_account_id
      in: path
      required: true
      schema:
        type: string
      description: ID of the treasury account.
  schemas:
    CreateWithdrawalRequest:
      type: object
      properties:
        settlement_account_id:
          type: string
          description: Destination settlement account ID
        amount:
          type: integer
          description: Amount in smallest currency unit
        reference:
          type: string
        description:
          type: string
      required:
        - settlement_account_id
        - amount
    WithdrawalTransfer:
      type: object
      properties:
        id:
          type: string
          example: wd_P8LmNo23Qr
        treasury_account_id:
          type: string
          example: tac_b0TrsSg91h
          description: ID of the treasury account
        settlement_account_id:
          type: string
          example: sa_M9q4eR20Kx
        amount:
          type: integer
        currency:
          type: string
        status:
          type: string
          enum:
            - Pending
            - Completed
            - Voided
        created_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: invalid_request
            message:
              type: string
              example: 'Missing required field: amount'
            details:
              type: object
              additionalProperties: true
            request_id:
              type: string
              example: req_7lYt4o2x
  responses:
    ErrorResponse:
      description: Error payload.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````