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

# Delete a Workspace

> Deletes a Workspace and moves every object it owns to the Default workspace. Refused (409 default_workspace_locked) for the Default, and (409 workspace_in_use) while a role is assigned within it. Enterprise Edition.



## OpenAPI

````yaml /swagger/5.16/ai-studio-swagger.yml delete /workspaces/{id}
openapi: 3.0.1
info:
  title: Midsommar API
  description: This is the API for the Midsommar user and group management system.
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    url: http://www.swagger.io/support
    email: support@swagger.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: //localhost:8080/api/v1
security: []
paths:
  /workspaces/{id}:
    delete:
      tags:
        - workspaces
      summary: Delete a Workspace
      description: >-
        Deletes a Workspace and moves every object it owns to the Default
        workspace. Refused (409 default_workspace_locked) for the Default, and
        (409 workspace_in_use) while a role is assigned within it. Enterprise
        Edition.
      parameters:
        - name: id
          in: path
          description: Workspace ID
          required: true
          schema:
            type: integer
      responses:
        '204':
          description: No Content
          content: {}
        '402':
          description: Payment Required
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/authz.ErrorBody'
        '404':
          description: Not Found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/authz.ErrorBody'
        '409':
          description: Conflict
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/authz.ErrorBody'
      security:
        - BearerAuth: []
components:
  schemas:
    authz.ErrorBody:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/authz.Error'
    authz.Error:
      type: object
      properties:
        code:
          type: string
        detail:
          type: string
        permission:
          type: string
        title:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````