---
title: "Drain an account program"
method: POST
path: "/v1/simulations/account_programs/{id}/drain"
tags: ["Simulations"]
---

# Drain an account program

`POST /v1/simulations/account_programs/{id}/drain`

## Request

- Base URL: `https://api.augustus.com`
- URL: `https://api.augustus.com/v1/simulations/account_programs/{id}/drain`
- Auth: HTTP bearer

Creates outbound payouts that drain the residual balance of every frozen account under the program to the provided destination. The program must be frozen. Every returned `payout_ids[i]` must be settled via `POST /v1/simulations/payouts/{id}/send` for the program balance to reach zero. This endpoint is unavailable in live production.

## Path parameters

- `id` string, uuid, required

## Headers

- `Idempotency-Key` string, required

## Request body

- DrainAccountProgramSimulationBodyDto
  - `destination` union, required: Fiat financial address to which the residual balance of every frozen account under the program is drained.
    - AbaFinancialAddressRequest
      - `type` 'aba', required: Discriminator for ABA wire financial address.
      - `routing_number` string, required: ABA routing number (9 digits).
      - `account_number` string, required: Bank account number.
      - `account_holder_name` string, required: Name of the account holder.
      - `account_type` 'checking' | 'savings' | 'null', nullable: Whether the account is a checking or a savings account. Optional; omit or send null if not provided. Some destination countries require it (for example the Dominican Republic, Honduras and Jamaica) and ACH uses it for the transaction code. A payment to an account without one is sent as checking.
    - IbanFinancialAddressRequest
      - `type` 'iban', required: Discriminator for IBAN financial address.
      - `iban` string, required: International Bank Account Number.
      - `account_holder_name` string, required: Name of the account holder.
      - `bic` string, nullable: Bank Identifier Code. Optional; omit or send null if not provided.
      - `account_type` 'checking' | 'savings' | 'null', nullable: Whether the account is a checking or a savings account. Optional; omit or send null if not provided. Some destination countries require it (for example the Dominican Republic, Honduras and Jamaica) and ACH uses it for the transaction code. A payment to an account without one is sent as checking.
    - SortCodeFinancialAddressRequest
      - `type` 'sort_code', required: Discriminator for UK sort code financial address.
      - `sort_code` string, required: UK sort code (6 digits).
      - `account_number` string, required: UK account number (8 digits).
      - `account_holder_name` string, required: Name of the account holder.

## Response `200`

The account program drain simulation acknowledgement

- AccountProgramDrainSimulationResourceDto
  - `type` 'account_program_simulation', required: Resource type discriminator.
  - `account_program_id` string, uuid, required: Account program whose lifecycle is being simulated.
  - `payout_ids` string[], required: Payouts created by the drain. Feed each id to `POST /v1/simulations/payouts/{id}/send` to settle.

## Changes

- **2026-10-16** `f7ded6c181ab`: 1 info
  - endpoint added
- **2026-08-27** `4549ed68144b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/augustus/apis/ivy-api/changes/v1/simulations/account_programs/:id/drain/post.md)

---

[API](https://skmtc.dev/augustus/apis/ivy-api.md) - [All operations](https://skmtc.dev/augustus/apis/ivy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/augustus/apis/ivy-api/revisions/e87bdcac11cc?raw)
