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

# Get account closure by ID

> Retrieve an account closure by its identifier. The status may have changed since creation.



## OpenAPI

````yaml GET /account-closures/{accountClosureId}
openapi: 3.0.3
info:
  title: Wealthyhood Account Closures API
  version: 1.0.0
  description: >
    Endpoints to create and retrieve account closure requests for B2B users.


    Account closure initiates a disassociation process. The status may change
    from "Created" to "Completed"

    as the closure is processed asynchronously. Use the GET endpoint to retrieve
    the current status.


    All requests require a bearer token and the `x-user-id` header.
servers:
  - url: https://{host}
    variables:
      host:
        default: api.wealthyhood.com
        description: Wealthyhood API host name.
security:
  - bearerAuth: []
tags:
  - name: Account Closures
    description: Create and retrieve account closure requests.
paths:
  /account-closures/{accountClosureId}:
    get:
      tags:
        - Account Closures
      summary: Get account closure by ID
      description: >
        Retrieve an account closure by its identifier. The status may have
        changed since

        creation (e.g., from "Created" to "Completed") as the closure is
        processed asynchronously.
      parameters:
        - $ref: '#/components/parameters/ExternalUserId'
        - name: accountClosureId
          in: path
          required: true
          description: Unique identifier of the account closure (MongoDB ObjectId)
          schema:
            type: string
            pattern: ^[a-f0-9]{24}$
            example: 64f0c51e7fb3fc001234a001
      responses:
        '200':
          description: Account closure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountClosure'
              example:
                id: 64f0c51e7fb3fc001234a001
                userId: 64f0c51e7fb3fc001234a002
                bankAccountId: 64f0c51e7fb3fc001234abcd
                status: Completed
                createdAt: '2024-10-03T10:30:00Z'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Account closure not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                status: 404
                error:
                  message: Account closure not found
                responseId: 3f0fd3bf-a2ff-4c0e-9b1d-5d7055dbf6cd
components:
  parameters:
    ExternalUserId:
      name: x-user-id
      in: header
      description: The external user identifier of the acting customer.
      required: true
      schema:
        type: string
        pattern: ^[a-f0-9]{24}$
        example: 64f0c51e7fb3fc001234a002
  schemas:
    AccountClosure:
      type: object
      required:
        - id
        - userId
        - status
        - createdAt
      properties:
        id:
          type: string
          pattern: ^[a-f0-9]{24}$
          description: Unique identifier of the account closure (MongoDB ObjectId)
          example: 64f0c51e7fb3fc001234a001
        userId:
          type: string
          pattern: ^[a-f0-9]{24}$
          description: Identifier of the user who owns this account closure
          example: 64f0c51e7fb3fc001234a002
        bankAccountId:
          type: string
          pattern: ^[a-f0-9]{24}$
          description: >-
            Identifier of the bank account to receive withdrawn cash, if
            provided at creation
          example: 64f0c51e7fb3fc001234abcd
        status:
          type: string
          enum:
            - Created
            - Completed
          description: >
            Current status of the account closure.

            - **Created**: Closure request has been submitted and is being
            processed.

            - **Completed**: Closure has been fully processed.
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the account closure was created
          example: '2024-10-03T10:30:00Z'
      additionalProperties: false
    ApiErrorResponse:
      type: object
      properties:
        status:
          type: integer
          description: HTTP status code
        error:
          type: object
          properties:
            message:
              type: string
              description: Error message
            description:
              type: string
              description: Additional error details
              nullable: true
        responseId:
          type: string
          format: uuid
          description: Unique identifier for this error response
      additionalProperties: false
  responses:
    BadRequestError:
      description: Bad request – invalid parameters or malformed request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            status: 400
            error:
              message: User already has a user data request
              description: Validation failed
            responseId: 7c91c5fe-d5a8-4b82-8e3f-5af2e30e43c2
    UnauthorizedError:
      description: Unauthorized – missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            status: 401
            error:
              message: invalid_token
              description: User not found
            responseId: 145f2b0d-1d5b-4e91-8d0d-7af0ae9ad13a
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````