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

# Get Close User Account Instructions

> Generates raw Solana instructions for closing a user's fund account. Use this endpoint for advanced use cases where you need more control over transaction construction. Identify the account either by user_account (fund ID) or by user_pubkey + strategy_id + mint.



## OpenAPI

````yaml POST /close-user-account/ix
openapi: 3.1.0
info:
  title: Breeze API
  description: >-
    A comprehensive API for managing yield farming operations, funds, and user
    authentication
  contact:
    name: Breeze Team
    email: support@breeze.baby
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.breeze.baby
    description: Production server
security: []
tags:
  - name: Admin
    description: Administrative operations
  - name: Deposits
    description: Deposit operations
  - name: Withdrawals
    description: Withdrawal operations
  - name: User Data
    description: User balance and yield data
  - name: Funds
    description: Fund management operations
  - name: Organization API Keys
    description: Organization API key management
  - name: Organization Management
    description: Organization configuration and settings
  - name: Partner Stats
    description: Partner statistics and analytics
  - name: Global Config
    description: Global configuration and supported assets
  - name: Yield Sources
    description: Yield source information and statistics
  - name: Close User Account
    description: Close user fund account operations
  - name: External APIs
    description: External API integrations and health checks
paths:
  /close-user-account/ix:
    post:
      tags:
        - Close User Account
      summary: Generate close user account instructions
      description: >-
        Generates raw Solana instructions for closing a user's fund account. Use
        this endpoint for advanced use cases where you need more control over
        transaction construction. Identify the account either by user_account
        (fund ID) or by user_pubkey + strategy_id + mint.
      operationId: process_close_user_account_instruction
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StructuredInputForCloseUserFund'
        required: true
      responses:
        '200':
          description: Close user account instructions prepared successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloseUserFundInstructions'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - api_key: []
components:
  schemas:
    StructuredInputForCloseUserFund:
      type: object
      required:
        - params
      properties:
        params:
          $ref: '#/components/schemas/InputForCloseUserFund'
    CloseUserFundInstructions:
      type: object
      required:
        - close_user_fund_instructions
      properties:
        close_user_fund_instructions:
          type: array
          items:
            $ref: '#/components/schemas/SolanaInstruction'
          description: Array of Solana instructions for closing the user fund account
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: Error message description
    InputForCloseUserFund:
      type: object
      properties:
        user_account:
          type:
            - string
            - 'null'
          description: >-
            User fund account ID. Provide this OR user_pubkey + strategy_id +
            mint.
        user_pubkey:
          type:
            - string
            - 'null'
          description: >-
            User's public key. Used together with strategy_id and mint to
            identify the account.
        strategy_id:
          type:
            - string
            - 'null'
          description: Strategy identifier. Required when using user_pubkey.
        mint:
          type:
            - string
            - 'null'
          description: Token mint address. Required when using user_pubkey.
        payer:
          type:
            - string
            - 'null'
          description: Optional payer for the transaction (defaults to user)
        funds_recipient:
          type:
            - string
            - 'null'
          description: Optional paymaster to receive rent refunds (defaults to user)
        user_token_account:
          type:
            - string
            - 'null'
          description: Optional user token account to close (defaults to user's ATA)
    SolanaInstruction:
      type: object
      required:
        - program_id
        - accounts
        - data
      properties:
        program_id:
          type: array
          items:
            type: integer
            format: uint8
            minimum: 0
            maximum: 255
          minItems: 32
          maxItems: 32
          description: 32-byte program ID as an array of integers
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/SolanaAccountMeta'
          description: Array of account metadata for the instruction
        data:
          type: array
          items:
            type: integer
            format: uint8
            minimum: 0
            maximum: 255
          description: Instruction data as an array of bytes
    SolanaAccountMeta:
      type: object
      required:
        - pubkey
        - is_signer
        - is_writable
      properties:
        pubkey:
          type: array
          items:
            type: integer
            format: uint8
            minimum: 0
            maximum: 255
          minItems: 32
          maxItems: 32
          description: 32-byte public key as an array of integers
        is_signer:
          type: boolean
          description: Whether the account is a signer
        is_writable:
          type: boolean
          description: Whether the account is writable
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: x-api-key

````