> ## 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.

# Prompts auflisten

> Rufe Prompts in deinem Workspace ab

Gibt Prompts zurück, auf die du in deinem Workspace Zugriff hast. Nutze Query-Parameter zum Paginieren, Suchen oder Filtern nach Ordner und Workspace-Freigabe.

## Basis-URL

```
https://api.langdock.com/prompts/v1
```

> [!WARNING]
>
> **Dedicated Deployments**
>
> Ersetze `api.langdock.com` durch `<your-deployment-url>/api/public` in allen Anfragen.

## Erforderliche Scopes

Dieser Endpoint erfordert den `PROMPT_API` Scope.

## Parameter

| Parameter | Typ | Erforderlich | Beschreibung |
| - | - | - | - |
| `limit` | integer | Nein | Anzahl der zurückzugebenden Prompts. Standard: `50`. Maximum: `250`. |
| `cursor` | string | Nein | Cursor aus der vorherigen Antwort für die Pagination. |
| `query` | string | Nein | Suchanfrage, die gegen Titel und Inhalt des Prompts geprüft wird. |
| `promptFolderId` | string | Nein | Nach Prompt-Ordner-UUID filtern. |
| `sharedWithWorkspace` | string | Nein | Nach Workspace-Freigabe filtern. Erlaubte Werte: `true`, `false`. |

## Beispiel

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

async function listPrompts() {
  const response = await axios.get("https://api.langdock.com/prompts/v1", {
    params: {
      limit: 25,
      query: "support"
    },
    headers: {
      Authorization: "Bearer YOUR_API_KEY"
    }
  });

  console.log("Prompts:", response.data.prompts);
  return response.data.nextCursor;
}

listPrompts();
```

## Antwortformat

### Erfolgsantwort (200 OK)

```typescript theme={null}
{
  prompts: Array<{
    id: string;
    title: string;
    prompt: string;
    createdBy: string | null;
    promptFolderId: string | null;
    sharedWithWorkspace: boolean;
    createdAt: string | null;
    updatedAt: string | null;
  }>;
  nextCursor?: string;
}
```

## Beispielantwort

```json theme={null}
{
  "prompts": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "title": "Support Reply",
      "prompt": "Write a concise customer reply. Include the next best action.",
      "createdBy": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "promptFolderId": null,
      "sharedWithWorkspace": true,
      "createdAt": "2026-07-28T10:30:00.000Z",
      "updatedAt": "2026-07-28T10:30:00.000Z"
    }
  ],
  "nextCursor": "550e8400-e29b-41d4-a716-446655440000"
}
```

## Fehlerbehandlung

| Statuscode | Beschreibung |
| - | - |
| 400 | Ungültiger Query-Parameter |
| 401 | Ungültiger oder fehlender API Key |
| 403 | Fehlender `PROMPT_API` Scope oder kein Workspace-Zugriff |
| 429 | Rate Limit überschritten |
| 500 | Interner Serverfehler |

> [!NOTE]
>
> 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](https://docs.langdock.com/de/admin/ai-adoption-and-rollout/best-practices/api-key-best-practices.md).


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