---
title: "Generate close-account instructions"
method: POST
path: "/close-user-account/ix"
tags: ["Close User Account"]
---

# Generate close-account instructions

`POST /close-user-account/ix`

Generates raw Solana instructions for closing a Breeze user-fund account. Identify it by its user-fund account address or by the complete wallet + strategy + mint tuple.

## Request body

- StructuredInputForCloseUserFund
  - `params` union, required — Identify the user fund with exactly one of `user_account` or the complete `user_pubkey` + `strategy_id` + `mint` tuple.
    - object
      - `funds_recipient` string, nullable — Rent refund recipient; defaults to the user
      - `payer` string, nullable — Transaction payer; defaults to the user
      - `user_account` string, required — User fund account address
      - `user_token_account` string, nullable — Token account to close; defaults to the user's ATA
    - object
      - `funds_recipient` string, nullable — Rent refund recipient; defaults to the user
      - `mint` string, required — Asset mint address
      - `payer` string, nullable — Transaction payer; defaults to the user
      - `strategy_id` string, required — Strategy identifier
      - `user_pubkey` string, required — User wallet address
      - `user_token_account` string, nullable — Token account to close; defaults to the user's ATA

## Response `200`

Close-account instructions prepared successfully

- CloseUserFundInstructions
  - `close_user_fund_instructions` SolanaInstruction[], required
    - `accounts` SolanaAccountMeta[], required
      - `is_signer` boolean, required
      - `is_writable` boolean, required
      - `pubkey` integer[], required — 32-byte public key.
    - `data` integer[], required — Raw instruction data.
    - `program_id` integer[], required — 32-byte program ID.

## Other responses

- `400` — Invalid close-account request
- `401` — Missing API key
- `404` — Invalid, inactive, or expired API key
- `500` — Internal server error

---

[API](https://skmtc.net/breeze-baby/apis/breeze-api.md) · [All operations](https://skmtc.net/breeze-baby/apis/breeze-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/breeze-baby/breeze-api/revisions/d0a18846aa92/schema)
