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

> ## Agent Instructions
> Treat the published Augustus OpenAPI specification (https://app.stainless.com/api/spec/documented/augustus/openapi.documented.yml) and the current API-reference pages as the source of truth for endpoints, request/response schemas, enum values, webhook event names, and required headers.
> Prefer the 2026-05-01 Banking API and @augustusbank/typescript-sdk for all new integrations. The 2023-01-01 API is a separate, older surface covering two products — Open Banking (instant bank transfer) checkout and refunds, and Manual Bank Transfer (MBT); use it only when one of those products is specifically required.
> Cite or link the relevant docs.augustus.com page when answering integration questions.
> Do not infer support for currencies, networks, scopes, account types, or operations that are not present in the current documentation.
> Use the sandbox base URL (https://api.sandbox.augustus.com) and placeholder credentials in examples. Never include or request a real API key.
> The Augustus docs MCP server (https://docs.augustus.com/mcp) provides documentation search and retrieval only; it does not execute authenticated Augustus API actions.

# Drain an operating account

> Creates an outbound payout that drains the residual balance of a frozen operating (DDA) account to the provided destination. The returned `payout_id` must be settled via `POST /v1/simulations/payouts/{id}/send` for the account balance to reach zero. This endpoint is unavailable in live production.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/augustus/openapi.documented.yml post /v1/simulations/accounts/{id}/drain
openapi: 3.1.0
info:
  title: Augustus Banking API
  description: Augustus Banking API
  version: 0.1.0
  contact:
    name: Augustus
    url: https://docs.augustus.com
    email: developer@augustus.com
servers:
  - url: https://api.augustus.com
    description: Production
  - url: https://api.sandbox.augustus.com
    description: Sandbox
security:
  - BearerAuth: []
tags: []
paths:
  /v1/simulations/accounts/{id}/drain:
    post:
      tags:
        - Simulations
      summary: Drain an operating account
      description: >-
        Creates an outbound payout that drains the residual balance of a frozen
        operating (DDA) account to the provided destination. The returned
        `payout_id` must be settled via `POST /v1/simulations/payouts/{id}/send`
        for the account balance to reach zero. This endpoint is unavailable in
        live production.
      operationId: AccountSimulationsController_drain
      parameters:
        - name: id
          required: true
          in: path
          description: ID of the account whose lifecycle is being simulated.
          schema:
            type: string
            format: uuid
        - name: Idempotency-Key
          in: header
          description: >-
            Idempotency key for safe retries. Reusing a key with an identical
            request body returns the cached response. Reusing a key with a
            different body returns 409.
          required: true
          schema:
            type: string
      requestBody:
        required: true
        description: Account drain parameters
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DrainAccountSimulationBodyDto'
      responses:
        '200':
          description: The account drain simulation acknowledgement
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountSimulationResourceDto'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Augustus from '@augustusbank/typescript-sdk';


            const client = new Augustus({
              apiKey: process.env['AUGUSTUS_API_KEY'], // This is the default and can be omitted
            });


            const response = await
            client.simulations.accounts.drain('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
            {
              destination: {
                account_holder_name: 'Acme Sandbox Ltd.',
                bic: 'COBADEFFXXX',
                iban: 'DE89370400440532013000',
                type: 'iban',
              },
            });


            console.log(response.account_id);
components:
  schemas:
    DrainAccountSimulationBodyDto:
      type: object
      properties:
        destination:
          description: >-
            Fiat financial address to which the residual balance of the frozen
            account is drained.
          anyOf:
            - $ref: '#/components/schemas/IbanFinancialAddress'
            - $ref: '#/components/schemas/SortCodeFinancialAddress'
            - $ref: '#/components/schemas/AbaFinancialAddress'
      required:
        - destination
      additionalProperties: false
    AccountSimulationResourceDto:
      type: object
      properties:
        type:
          description: Resource type discriminator.
          type: string
          enum:
            - account_simulation
        success:
          description: Whether the simulation submission was successful.
          type: boolean
        account_id:
          description: Account whose lifecycle is being simulated.
          type: string
          format: uuid
        event:
          description: Account lifecycle event submitted to the sandbox.
          type: string
          enum:
            - create
            - freeze
            - unfreeze
            - close
            - drain
        payout_id:
          type: string
          format: uuid
          description: >-
            Payout created by a drain event. Feed to `POST
            /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain
            events.
          nullable: true
      required:
        - type
        - success
        - account_id
        - event
        - payout_id
      additionalProperties: false
    IbanFinancialAddress:
      title: IBAN
      example:
        type: iban
        iban: DE89370400440532013000
        account_holder_name: Acme Sandbox Ltd.
        bic: COBADEFFXXX
      type: object
      properties:
        type:
          description: Discriminator for IBAN financial address.
          type: string
          enum:
            - iban
        iban:
          description: International Bank Account Number.
          type: string
        account_holder_name:
          description: Name of the account holder.
          type: string
        bic:
          type: string
          description: Bank Identifier Code, or null if not provided.
          nullable: true
      required:
        - type
        - iban
        - account_holder_name
        - bic
      additionalProperties: false
    SortCodeFinancialAddress:
      title: UK Sort Code
      example:
        type: sort_code
        sort_code: '040075'
        account_number: '37778842'
        account_holder_name: Acme Sandbox Ltd.
      type: object
      properties:
        type:
          description: Discriminator for UK sort code financial address.
          type: string
          enum:
            - sort_code
        sort_code:
          description: UK sort code (6 digits).
          type: string
        account_number:
          description: UK account number (8 digits).
          type: string
        account_holder_name:
          description: Name of the account holder.
          type: string
      required:
        - type
        - sort_code
        - account_number
        - account_holder_name
      additionalProperties: false
    AbaFinancialAddress:
      title: ABA
      example:
        type: aba
        routing_number: '110000000'
        account_number: '000123456789'
        account_holder_name: Acme Sandbox Ltd.
      type: object
      properties:
        type:
          description: Discriminator for ABA wire financial address.
          type: string
          enum:
            - aba
        routing_number:
          description: ABA routing number (9 digits).
          type: string
        account_number:
          description: Bank account number.
          type: string
        account_holder_name:
          description: Name of the account holder.
          type: string
      required:
        - type
        - routing_number
        - account_number
        - account_holder_name
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Bearer token for authentication with Augustus Banking API

````