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

# Delete Semantic Layer Folder

> Remove a folder; everything inside it moves up one level.

Deleting a folder deletes **no document**. Its subfolders and documents move up one level, into the
folder's parent, or to the root when it had none. If a subfolder's name already exists at the
destination, the request answers `400` and nothing changes: rename the subfolder first.

```bash theme={null}
curl --request DELETE \
  --url "https://api.nekt.ai/api/v1/semantic-layer/folders/FOLDER_ID/" \
  --header "x-api-key: YOUR_API_KEY"
```

A personal API token needs what its creator needs: on Growth and Custom, **manager** on the folder
(owners and admins always have it); on Free and Starter, any member may. A service account needs
the **Write the Semantic Layer** capability and the folder in its scope. A folder the key cannot see
answers `404`.

> [!NOTE]
>
> Deleting a document is still not available to API keys or service accounts and returns `403`.
> Remove documents from the app.

## Related

* [Create a folder](https://docs.nekt.com/platform-api/semantic-layer/create-folder.md) and [Update a folder](https://docs.nekt.com/platform-api/semantic-layer/update-folder.md).


## OpenAPI

````yaml DELETE /api/v1/semantic-layer/folders/{id}/
openapi: 3.0.3
info:
  title: Nekt API
  version: v1
  description: Nekt API Documentation
  contact:
    email: support@nekt.ai
servers:
  - url: https://api.nekt.ai
security: []
paths:
  /api/v1/semantic-layer/folders/{id}/:
    delete:
      tags:
        - v1
      summary: Delete a Semantic Layer folder
      description: >-
        Deletes the folder and moves everything inside it up one level; no
        document is deleted. Requires manager access on the folder.
      operationId: v1_semantic_layer_folders_destroy
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          description: A UUID string identifying this Semantic Layer Folder.
          required: true
      responses:
        '204':
          description: No response body
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: 'API Key authentication. Format: ''x-api-key: api_key'''

````

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