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

# Integrations API Übersicht

> Erstelle und verwalte benutzerdefinierte Integrationen in deinem Langdock Workspace programmatisch

<Info>
  **Nutzt du unsere API über ein Dedicated Deployment?** Ersetze einfach `api.langdock.com` mit der Basis-URL deines Deployments: **`<deployment-url>/api/public`**
</Info>

Die Integrations API ermöglicht es dir, benutzerdefinierte Integrationen in deinem Langdock Workspace programmatisch zu erstellen und zu verwalten. Baue Integrationen, die sich mit deinen internen Tools, APIs und Services verbinden.

## API Key Scopes

Die Integrations API erfordert bestimmte API Key Scopes:

| Scope                                  | Endpoints                                            |
| -------------------------------------- | ---------------------------------------------------- |
| `ASSISTANT_API` oder `INTEGRATION_API` | Integrationen auflisten (`GET /integrations/v1/get`) |
| `INTEGRATION_API`                      | Alle anderen Integration-Endpoints                   |

<Tip>
  Erstelle einen API Key mit dem `INTEGRATION_API` Scope in deinen [Workspace-Einstellungen](https://app.langdock.com/settings/workspace/api-keys), um auf die vollständige Integrations API zuzugreifen.
</Tip>

## Verfügbare Endpoints

### Integrationen

| Methode | Endpoint                                | Beschreibung                                                                     |
| ------- | --------------------------------------- | -------------------------------------------------------------------------------- |
| `GET`   | `/integrations/v1/get`                  | [Alle Integrationen auflisten](/de/developer/integrations-api/list-integrations) |
| `POST`  | `/integrations/v1/create`               | [Neue Integration erstellen](/de/developer/integrations-api/create-integration)  |
| `GET`   | `/integrations/v1/{integrationId}`      | [Integration-Details abrufen](/de/developer/integrations-api/get-integration)    |
| `PATCH` | `/integrations/v1/{integrationId}`      | [Integration aktualisieren](/de/developer/integrations-api/update-integration)   |
| `PATCH` | `/integrations/v1/{integrationId}/auth` | [Auth-Konfiguration aktualisieren](/de/developer/integrations-api/update-auth)   |

### Actions

Actions sind Fähigkeiten, die du zu Integrationen hinzufügen kannst und die Agents ausführen können. Jede Action hat ein `requiresConfirmation`-Flag, das steuert, ob der User sie vor der Ausführung bestätigen muss.

| Methode  | Endpoint                                              | Beschreibung                                                         |
| -------- | ----------------------------------------------------- | -------------------------------------------------------------------- |
| `POST`   | `/integrations/v1/{integrationId}/actions/create`     | [Action erstellen](/de/developer/integrations-api/create-action)     |
| `PUT`    | `/integrations/v1/{integrationId}/actions/{actionId}` | [Action aktualisieren](/de/developer/integrations-api/update-action) |
| `DELETE` | `/integrations/v1/{integrationId}/actions/{actionId}` | [Action löschen](/de/developer/integrations-api/delete-action)       |

### Triggers

Triggers ermöglichen es Integrationen, Workflows oder Agent-Konversationen basierend auf externen Events zu starten.

| Methode  | Endpoint                                                | Beschreibung                                                           |
| -------- | ------------------------------------------------------- | ---------------------------------------------------------------------- |
| `POST`   | `/integrations/v1/{integrationId}/triggers/create`      | [Trigger erstellen](/de/developer/integrations-api/create-trigger)     |
| `PUT`    | `/integrations/v1/{integrationId}/triggers/{triggerId}` | [Trigger aktualisieren](/de/developer/integrations-api/update-trigger) |
| `DELETE` | `/integrations/v1/{integrationId}/triggers/{triggerId}` | [Trigger löschen](/de/developer/integrations-api/delete-trigger)       |

## Schnellstart

So erstellst du eine einfache Integration mit einer Action:

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

const API_KEY = "YOUR_API_KEY";
const BASE_URL = "https://api.langdock.com";

// 1. Create an integration
const integrationResponse = await axios.post(
  `${BASE_URL}/integrations/v1/create`,
  {
    name: "My Custom Integration",
    description: "Connects to my internal API"
  },
  {
    headers: {
      Authorization: `Bearer ${API_KEY}`,
      "Content-Type": "application/json"
    }
  }
);

const integrationId = integrationResponse.data.integration.id;

// 2. Add an action to the integration
const actionResponse = await axios.post(
  `${BASE_URL}/integrations/v1/${integrationId}/actions/create`,
  {
    name: "Get User Data",
    description: "Retrieves user information from the internal API",
    code: `
      const response = await fetch('https://my-api.example.com/users/' + inputs.userId);
      return await response.json();
    `,
    inputFields: [
      {
        label: "User ID",
        type: "TEXT",
        description: "The ID of the user to retrieve",
        required: true
      }
    ]
  },
  {
    headers: {
      Authorization: `Bearer ${API_KEY}`,
      "Content-Type": "application/json"
    }
  }
);

console.log("Action created:", actionResponse.data.action);
```

## Anwendungsfälle

* **Interne Tools anbinden**: Verbinde Agents mit den internen APIs, Datenbanken oder Services deines Unternehmens
* **Benutzerdefinierte Workflows**: Baue Integrationen, die Workflows basierend auf externen Events auslösen
* **Datenanreicherung**: Erstelle Actions, die Daten aus mehreren Quellen abrufen und anreichern
* **Automatisiertes Reporting**: Baue Integrationen, die Berichte generieren und verteilen

## Rate Limits

Die Integrations API folgt den Standard-Rate-Limits. Wenn du das Limit überschreitest, erhältst du eine `429`-Antwort. Warte und versuche es mit exponentiellem Backoff erneut.

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