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

# Delete a workspace

> Delete a workspace. The workspace is soft-deleted (archived) and no longer appears in reads;
the response returns the archived workspace. The workspace is identified by the
`workspace_id` path parameter alone; the `x-hh-workspace-id` header does not participate.

**Deleting a workspace also archives every project inside it**, so the events, datasets,
and evaluations in those projects are no longer reachable. Because that reaches well
beyond the resource named in the URL, a workspace that still has active projects is
rejected with a 409 unless the request sets `dangerously_delete_child_scopes=true`.
Projects that were already archived do not count, so a workspace emptied one project at a
time deletes without the flag.

The response describes only the workspace. It does not enumerate the projects archived
alongside it, so read them first if you need that list.




## OpenAPI

````yaml https://raw.githubusercontent.com/honeyhiveai/honeyhive-openapi/main/control_plane_openapi.yaml delete /v1/workspaces/{workspace_id}
openapi: 3.1.0
info:
  title: HoneyHive Control Plane API
  description: >
    Manage HoneyHive control-plane resources: workspaces, projects and alerts.


    Authentication requires a fine-grained control-plane API key (values

    start with `hh_fgcp_`), sent as `Authorization: Bearer <api-key>`.

    Project API keys used with the Data Plane API will not work here. Create

    a key in the HoneyHive app under an organization's or workspace's

    **Settings → API Keys**, or see

    [Authorization](https://docs.honeyhive.ai/v2/control-plane-sdk-reference/typescript#authorization)

    for details.
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: 1.9.0
servers:
  - url: https://api.cp.us.honeyhive.ai
security:
  - BearerAuth: []
tags:
  - name: Alerts
    description: >
      Define and manage alerts. Alerts evaluate event metrics on a schedule and
      trigger notifications when configured thresholds are crossed.
  - name: Projects
    description: >
      Create and manage projects within a workspace. A project is the container
      for the events, datasets, evaluations, and alerts logged against it.
  - name: Virtual Dataplanes
    description: >
      Create and manage virtual data planes. A virtual data plane is a logical
      tenant boundary inside an organization, hosted on a physical cluster;
      several virtual data planes commonly share one cluster. Workspaces live
      inside a virtual data plane.
  - name: Workspaces
    description: >
      Read and manage workspaces. A workspace groups the projects belonging to
      one team or environment, and owns the API keys and AI provider secrets its
      projects share.
paths:
  /v1/workspaces/{workspace_id}:
    delete:
      tags:
        - Workspaces
      summary: Delete a workspace
      description: >
        Delete a workspace. The workspace is soft-deleted (archived) and no
        longer appears in reads;

        the response returns the archived workspace. The workspace is identified
        by the

        `workspace_id` path parameter alone; the `x-hh-workspace-id` header does
        not participate.


        **Deleting a workspace also archives every project inside it**, so the
        events, datasets,

        and evaluations in those projects are no longer reachable. Because that
        reaches well

        beyond the resource named in the URL, a workspace that still has active
        projects is

        rejected with a 409 unless the request sets
        `dangerously_delete_child_scopes=true`.

        Projects that were already archived do not count, so a workspace emptied
        one project at a

        time deletes without the flag.


        The response describes only the workspace. It does not enumerate the
        projects archived

        alongside it, so read them first if you need that list.
      operationId: deleteWorkspace
      parameters:
        - in: path
          name: workspace_id
          required: true
          schema:
            type: string
          description: The unique identifier of the workspace to delete
        - in: query
          name: dangerously_delete_child_scopes
          required: false
          schema:
            type: boolean
            default: false
          description: >
            Archive the workspace even when it still has active projects,
            archiving those projects

            too. Without it, such a request fails with a 409 and no changes are
            made.
      responses:
        '200':
          description: Workspace deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteWorkspaceResponse'
        '400':
          description: '`dangerously_delete_child_scopes` is not `true` or `false`'
        '404':
          description: Workspace not found
        '409':
          description: >-
            The workspace still has active projects and
            `dangerously_delete_child_scopes` was not set
components:
  schemas:
    DeleteWorkspaceResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/WorkspaceItem'
      required:
        - success
        - data
      additionalProperties: false
      description: >-
        The deleted (archived) workspace. Descendants archived by the cascade
        are not listed.
    WorkspaceItem:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
          description: Workspace display name
        description:
          type: string
          description: Workspace description
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: string
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: string
            - type: 'null'
      required:
        - id
        - name
        - description
        - created_at
      additionalProperties: false
      description: Workspace object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

## Related topics

- [Workspaces](/v2/cli-reference/ref/workspaces.md)
- [DeleteWorkspaceRequest](/v2/control-plane-sdk-reference/typescript/ref/workspaces/DeleteWorkspaceRequest.md)
- [Workspaces Methods](/v2/control-plane-sdk-reference/typescript/ref/workspaces/index.md)
