---
title: "Generate a close-account transaction"
method: POST
path: "/close-user-account/tx"
tags: ["Close User Account"]
---

# Generate a close-account transaction

`POST /close-user-account/tx`

## Request

- Base URL: `https://api.breeze.baby`
- URL: `https://api.breeze.baby/close-user-account/tx`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/breeze-baby/apis/breeze-api/docs/close-user-account/tx/post.ts> (a function with typed inputs; its response is checked against the schema)

Generates a base64-encoded, serialized unsigned Solana versioned transaction 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`

Base64-encoded serialized transaction

- string

## 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.dev/breeze-baby/apis/breeze-api.md) - [All operations](https://skmtc.dev/breeze-baby/apis/breeze-api/llms.txt) - [OpenAPI document](https://skmtc.dev/breeze-baby/apis/breeze-api/revisions/d0a18846aa92?raw)
