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

# Delete a workspace

> Accept the request for workspace deletion within the scope of an authorized organization and initiate an asynchronous flow. The response returns the created operation, which can be checked later in the operations endpoints.



## OpenAPI

````yaml /en/api-reference/openapi.en-v1.json delete /v1/organizations/{organization_id}/workspaces/{workspace_id}
openapi: 3.0.3
info:
  title: Public Portal API
  version: 1.0.0
  description: Public REST API for portal
servers:
  - url: https://api.staging.flxwvdexternal.com
    description: Staging API server.
security:
  - bearerAuth: []
tags: []
paths:
  /v1/organizations/{organization_id}/workspaces/{workspace_id}:
    delete:
      tags:
        - Workspaces
      summary: Delete a workspace
      description: >-
        Accept the request for workspace deletion within the scope of an
        authorized organization and initiate an asynchronous flow. The response
        returns the created operation, which can be checked later in the
        operations endpoints.
      operationId: delete_workspace_by_id
      parameters:
        - name: organization id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-f]{24}$
            minLength: 24
            maxLength: 24
          description: Organization identifier.
          example: 507f1f77bcf86cd799439011
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-f]{24}$
            minLength: 24
            maxLength: 24
          description: Workspace identifier.
          example: 64f0c2a1b2d3e4f506070801
      responses:
        '202':
          description: >-
            Request accepted. Operation is returned for tracking in operations
            endpoints.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOperationByIdResponseV1'
              examples:
                operation_created:
                  summary: Operation created for asynchronous deletion
                  value:
                    id: 64f0c2a1b2d3e4f506070811
                    organization_id: 507f1f77bcf86cd799439011
                    name: delete_workspace
                    description: Workspace Deletion Operation
                    status: pending
                    created_at: '2026-06-05T14:12:00Z'
                    started_at: null
                    ended_at: null
                    microservice_id: null
                    flow_id: null
                    remote_support: null
        '400':
          description: Invalid request parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_workspace_id:
                  summary: Invalid workspace_id format
                  value:
                    error:
                      message: Invalid workspace_id format
                      code: bad_request
                      details: >-
                        workspace_id must be a lowercase hexadecimal string of
                        24 characters
        '401':
          description: Not authorized or organization not accessible.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                organization_not_authorized:
                  summary: Organization access failure
                  value:
                    error:
                      message: Unauthorized
                      code: unauthorized
        '404':
          description: Workspace not found within the organization's authorized scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                workspace_not_found:
                  summary: The requested workspace was not found
                  value:
                    error:
                      message: Workspace not found
                      code: not_found
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unexpected_error:
                  summary: Unhandled failure
                  value:
                    error:
                      message: Internal Server Error
                      code: internal_error
components:
  schemas:
    GetOperationByIdResponseV1:
      type: object
      properties:
        id:
          type: string
          pattern: ^[0-9a-f]{24}$
          minLength: 24
          maxLength: 24
          description: Operation execution identifier.
        name:
          type: string
          description: Operation name.
        organization_id:
          type: string
          pattern: ^[0-9a-f]{24}$
          minLength: 24
          maxLength: 24
          description: Identifier of the organization owning the operation.
        description:
          type: string
          description: >-
            Operation description. An empty string is returned when it doesn't
            exist at source.
        status:
          type: string
          enum:
            - finished
            - unknown
            - error
            - pending
            - in-progress
            - timeout
            - cancelled
            - scheduled
          description: Current operation status.
        created_at:
          type: string
          format: date-time
          description: Creation timestamp.
        started_at:
          type: string
          format: date-time
          nullable: true
          description: Start timestamp.
        ended_at:
          type: string
          format: date-time
          nullable: true
          description: Completion timestamp.
        microservice_id:
          type: string
          nullable: true
          pattern: ^[0-9a-f]{24}$
          minLength: 24
          maxLength: 24
          description: Related microservice identifier, when it exists.
        flow_id:
          type: string
          nullable: true
          pattern: ^[0-9a-f]{24}$
          minLength: 24
          maxLength: 24
          description: Related flow identifier, when it exists.
        remote_support:
          $ref: '#/components/schemas/GetOperationByIdRemoteSupportV1'
      required:
        - id
        - organization id
        - name
        - description
        - status
        - created_at
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
            details:
              type: string
          required:
            - message
            - code
      required:
        - error
    GetOperationByIdRemoteSupportV1:
      type: object
      nullable: true
      properties:
        start_date:
          type: string
          format: date-time
          nullable: true
          description: Remote support start date.
        end_date:
          type: string
          format: date-time
          nullable: true
          description: Remote support end date.
        type:
          type: string
          nullable: true
          description: Type of remote support session.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````