---
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`

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.
    - IbanFinancialAddress
      - `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, required — Bank Identifier Code, or null if not provided.
    - SortCodeFinancialAddress
      - `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.
    - AbaFinancialAddress
      - `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.

## Response `200`

The account program drain simulation acknowledgement

- AccountProgramSimulationResourceDto
  - `type` 'account_program_simulation', required — Resource type discriminator.
  - `success` boolean, required — Whether the simulation submission was successful.
  - `account_program_id` string, uuid, required — Account program whose lifecycle is being simulated.
  - `event` 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain', required — Account program lifecycle event submitted to the sandbox.
  - `payout_ids` string[], nullable, required — Payouts created by a drain event. Feed each id to `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.

## Changes

- **2026-08-27** `4549ed68144b` — 1 info
  - endpoint added

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

---

[API](https://skmtc.dev/augustus/apis/augustus-banking-api.md) · [All operations](https://skmtc.dev/augustus/apis/augustus-banking-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/augustus/augustus-banking-api/revisions/e0010b51834a/schema)
