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

# Archive custom account

> Archives a custom account for a business. This action will prevent the account from syncing new transactions and will remove the account from the Layer dashboard. Previously imported transactions will remain. Archiving can be reversed with the `reactivate` endpoint.



## OpenAPI

````yaml post /v1/businesses/{businessId}/custom-accounts/{customAccountId}/archive
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/custom-accounts/{customAccountId}/archive:
    post:
      tags: []
      summary: Archive custom account
      description: >-
        Archives a custom account for a business. This action will prevent the
        account from syncing new transactions and will remove the account from
        the Layer dashboard. Previously imported transactions will remain.
        Archiving can be reversed with the `reactivate` endpoint.
      operationId: business.custom-accounts.archive.post
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business to archive custom account for.
          required: true
          schema:
            type: string
        - name: customAccountId
          in: path
          description: The UUID of the custom account to archive.
          required: true
          schema:
            type: string
        - name: Content-Type
          in: header
          description: Content-Type must be set to application/json
          schema:
            type: string
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiCustomAccount'
        '404':
          description: >-
            Business id or custom account id is not found. This indicates the
            business id is invalid or the business has been archived, or the
            custom account id is invalid or the custom account has been deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
components:
  schemas:
    ApiCustomAccount:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique ID for the custom account
        external_id:
          type: string
          description: >-
            Unique ID of the custom account in an external system for linking
            and idempotency.
          example: ww9wwLgkrbU3jkg3J4J7ckBR3zKQV6sLPQevK
        mask:
          type: string
          nullable: true
          description: Last 4 digits of the custom account number
          example: '4321'
        account_name:
          type: string
          description: Name of the account
          example: My custom account
        institution_name:
          type: string
          description: Name of the institution for the custom account
          example: My custom account institution
        account_type:
          type: string
          enum:
            - DEPOSITORY
            - CREDIT
            - LOAN
          nullable: true
          description: The type of the custom account
          example: DEPOSITORY
        account_subtype:
          type: string
          enum:
            - CHECKING
            - SAVINGS
            - CREDIT CARD
            - LOAN
          nullable: true
          description: The subtype of the custom account
          example: checking
        created_at:
          type: string
          format: date-time
          nullable: true
          description: Timestamp of when the custom account was created
        updated_at:
          type: string
          format: date-time
          nullable: true
          description: Timestamp of when the custom account was last created
        archived_at:
          type: string
          format: date-time
          nullable: true
          description: Timestamp of when the custom account was archived
        ledger_account_id:
          type: string
          format: uuid
          nullable: true
          description: >-
            The ID of the [ledger
            account](https://docs.layerfi.com/api-reference/ledger/chart#ledger-account-object)
            associated with the custom account
    ApiError:
      type: object
      properties: {}
      example: ''
      description: ''
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````