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

# Archive Organization Tenant

> Archive a tenant: disable its identifiers, archive its reports and mark the tenant as archived and disabled. Refused when the tenant is the only tenant the caller belongs to. The response body is empty. Requires write permission on the tenants of the organization, or on the tenant itself when it is a demo tenant.

&#x20;Required API key permissions: **Write Organization Admin** and **Read Organization**


## OpenAPI

````yaml firework-v2-openapi post /firework/v2/tenants/{tenant_id}/archive
openapi: 3.0.1
info:
  description: >

    Manage and access Firework resources.


    Requests are authenticated with API tokens, which are obtained using an API
    key:


    1. Generate an API key from the [Profile
    page](https://app.flare.io/#/profile).

    2. Send a `POST` request to `https://api.flare.io/tokens/generate` with the
    `Authorization: <api-key>` header to get an API token. API tokens expire
    after 1 hour.

    3. Call the API endpoints with the `Authorization: Bearer <api-token>`
    header.


    See [Authentication](https://api.docs.flare.io/concepts/authentication) for
    details.
  title: Firework API
  version: v2
servers:
  - url: https://api.flare.io/
security:
  - BearerAuth: []
tags:
  - description: >-
      The authenticated user, its API keys, organizations, tenants, onboarding
      and usage.
    name: Account
  - description: >-
      Events collected by Flare: global search, tenant and identifier feeds,
      event details, actions and saved feed views.
    name: Events
  - description: >-
      Identifiers are the assets a tenant monitors, such as domains, keywords
      and email addresses. Includes recommendations and authorization of
      sensitive identifiers.
    name: Identifiers
  - description: Report groups, reports, their sections, schedules and delivery channels.
    name: Reports
paths:
  /firework/v2/tenants/{tenant_id}/archive:
    post:
      tags:
        - Account
      summary: Archive a tenant
      description: >-
        Archive a tenant: disable its identifiers, archive its reports and mark
        the tenant as archived and disabled. Refused when the tenant is the only
        tenant the caller belongs to. The response body is empty. Requires write
        permission on the tenants of the organization, or on the tenant itself
        when it is a demo tenant.
      operationId: post_tenant_archive_api
      parameters:
        - description: ID of the tenant.
          in: path
          name: tenant_id
          required: true
          schema:
            type: integer
      responses:
        '200':
          content: {}
          description: The tenant was archived; the response body is empty.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
          description: >-
            The tenant is the caller's last tenant (code
            `CANNOT_REMOVE_LAST_TENANT`).
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
          description: The caller cannot archive this tenant (code `FORBIDDEN`).
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
          description: >-
            The tenant does not exist (code `TENANT_NOT_FOUND`) or is not
            visible to the caller (code `NOT_FOUND`).
components:
  schemas:
    HttpError:
      properties:
        message:
          description: Human-readable description of the error.
          type: string
        code:
          description: Machine-readable error code.
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.