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

# Prompt-Ordner löschen

> Lösche einen Prompt-Ordner aus deinem Workspace

Löscht einen Prompt-Ordner dauerhaft aus deinem Workspace. Prompts in dem Ordner werden ebenfalls gelöscht. Diese Aktion kann nicht rückgängig gemacht werden.

## Basis-URL

```
https://api.langdock.com/prompts/v1/folders/{folderId}
```

<Warning>
  **Dedicated Deployments**

  Ersetze `api.langdock.com` durch `<your-deployment-url>/api/public` in allen Anfragen.
</Warning>

## Erforderliche Scopes

Dieser Endpoint erfordert den `PROMPT_API` Scope.

<Info>
  Private Ordner erfordern Zugriff als Ersteller. Workspace-geteilte Ordner erfordern Workspace-Editor-Zugriff. Gruppen-geteilte Ordner erfordern Gruppen-Editor-Zugriff oder Workspace-Editor-Zugriff.
</Info>

## Parameter

| Parameter  | Typ    | Erforderlich | Beschreibung                    |
| ---------- | ------ | ------------ | ------------------------------- |
| `folderId` | string | Ja           | UUID des zu löschenden Ordners. |

## Beispiel

```javascript theme={null}
const axios = require("axios");

async function deletePromptFolder(folderId) {
  const response = await axios.delete(
    `https://api.langdock.com/prompts/v1/folders/${folderId}`,
    {
      headers: {
        Authorization: "Bearer YOUR_API_KEY"
      }
    }
  );

  console.log("Deleted:", response.data.success);
}

deletePromptFolder("7c9e6679-7425-40de-944b-e07fc1f90ae7");
```

## Antwortformat

### Erfolgsantwort (200 OK)

```typescript theme={null}
{
  success: true;
}
```

## Fehlerbehandlung

| Statuscode | Beschreibung                                              |
| ---------- | --------------------------------------------------------- |
| 400        | Ungültiges Ordner-ID-Format                               |
| 401        | Ungültiger oder fehlender API Key                         |
| 403        | Fehlender `PROMPT_API` Scope oder kein Verwaltungszugriff |
| 404        | Prompt-Ordner nicht gefunden                              |
| 429        | Rate Limit überschritten                                  |
| 500        | Interner Serverfehler                                     |

<Warning>
  Das Löschen eines Ordners löscht auch jeden Prompt in diesem Ordner. Das kann nicht rückgängig gemacht werden.
</Warning>

<Info>
  Langdock blockiert bewusst Browser-basierte Anfragen, um deinen API-Schlüssel zu schützen und die Sicherheit deiner Anwendungen zu gewährleisten. Weitere Informationen findest du in unserem Guide zu [Best Practices für API-Schlüssel](/de/admin/ai-adoption-and-rollout/best-practices/api-key-best-practices).
</Info>


## OpenAPI

````yaml DELETE /prompts/v1/folders/{folderId}
openapi: 3.0.0
info:
  title: Langdock API
  version: 3.0.0
servers:
  - url: https://api.langdock.com
    description: Production
security:
  - bearerAuth: []
paths:
  /prompts/v1/folders/{folderId}:
    delete:
      tags:
        - Prompts
      summary: Delete a prompt folder
      description: Permanently deletes a prompt folder and the prompts in it.
      operationId: deletePromptFolder
      parameters:
        - $ref: '#/components/parameters/PromptFolderId'
      responses:
        '200':
          description: Prompt folder deleted successfully
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                properties:
                  success:
                    type: boolean
                    example: true
        '400':
          description: Invalid folder ID
        '401':
          description: Invalid or missing API key
        '403':
          description: Missing required scope or manage access
        '404':
          description: Prompt folder not found
        '429':
          description: Rate limit exceeded
        '500':
          description: Internal server error
components:
  parameters:
    PromptFolderId:
      name: folderId
      in: path
      required: true
      description: UUID of the prompt folder.
      schema:
        type: string
        format: uuid
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key as Bearer token. Format "Bearer YOUR_API_KEY"

````