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

# Delete Workspace

> Permanently deletes a client workspace and cleans up all associated resources. Agency plan required.

<Note>
  **Agency Plan Required** - This endpoint is only available for teams on the Agency plan.
</Note>

## Endpoint

```
DELETE https://api.kakiyo.com/v1/workspaces/:workspaceId
```

## Path Parameters

| Parameter     | Type   | Required | Description                |
| ------------- | ------ | -------- | -------------------------- |
| `workspaceId` | string | Yes      | The workspace ID to delete |

## Response

```json theme={null}
{
  "message": "Workspace deleted successfully",
  "stats": {
    "agentsUnassigned": 3,
    "campaignsUpdated": 5,
    "chatsUpdated": 150
  }
}
```

## Example Request

```bash theme={null}
curl -X DELETE "https://api.kakiyo.com/v1/workspaces/69724d900007cfde1d88" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

<Warning>
  This is a destructive operation. Deleting a workspace permanently removes client access and unassigns all agents.
</Warning>


## OpenAPI

````yaml DELETE /workspaces/{id}
openapi: 3.1.0
info:
  title: Kakiyo API
  description: API for automating LinkedIn outreach campaigns with AI-powered conversations
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.kakiyo.com/v1
security:
  - bearerAuth: []
paths:
  /workspaces/{id}:
    delete:
      tags:
        - Workspaces
      summary: Delete Workspace
      description: >-
        Permanently deletes a client workspace and cleans up all associated
        resources. Agency plan required.
      operationId: deleteWorkspace
      parameters:
        - name: id
          in: path
          required: true
          description: Workspace ID
          schema:
            type: string
      responses:
        '200':
          description: Workspace deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Workspace deleted successfully
                  stats:
                    type: object
                    properties:
                      agentsUnassigned:
                        type: integer
                        example: 3
                      campaignsUpdated:
                        type: integer
                        example: 5
                      chatsUpdated:
                        type: integer
                        example: 150
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Workspace does not belong to this team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Workspace not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          example: validation_error
        message:
          type: string
          example: The request parameters failed validation
        details:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
                example: name
              message:
                type: string
                example: The name field is required
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````