> ## 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-Icon ersetzen

> Lade ein neues Icon für eine Integration hoch

Ersetzt das Icon einer Integration. Sende das Bild als `multipart/form-data` im Dateifeld `icon`.

## Basis-URL

```
https://api.langdock.com/integrations/v1/{integrationId}/icon
```

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

## Erforderliche Scopes

Dieser Endpoint erfordert den `INTEGRATION_API` Scope.

## Parameter

| Parameter | Typ | Erforderlich | Beschreibung |
| - | - | - | - |
| `integrationId` | string | Ja | UUID der Integration |

Der Request Body ist `multipart/form-data` mit einem Dateifeld `icon`. Lade ein Bild hoch, zum Beispiel PNG, JPEG oder WebP. Das skalierte Icon darf 20 MB nicht überschreiten.

## Beispiel

```javascript theme={null}
const axios = require("axios");
const FormData = require("form-data");
const fs = require("fs");

async function replaceIcon(integrationId) {
  const form = new FormData();
  form.append("icon", fs.createReadStream("icon.png"));

  const response = await axios.put(
    `https://api.langdock.com/integrations/v1/${integrationId}/icon`,
    form,
    {
      headers: {
        Authorization: "Bearer YOUR_API_KEY",
        ...form.getHeaders()
      }
    }
  );

  console.log("Icon URL:", response.data.iconUrl);
}

replaceIcon("550e8400-e29b-41d4-a716-446655440000");
```

## Antwortformat

### Erfolgreiche Antwort (200 OK)

```typescript theme={null}
{
  iconUrl: string;
}
```

## Fehlerbehandlung

| Status Code | Beschreibung |
| - | - |
| 400 | Ungültige Integration-ID, fehlende `icon`-Datei, nicht unterstützter Bildtyp oder Datei zu groß |
| 401 | Ungültiger oder fehlender API-Schlüssel |
| 403 | Kein Zugriff auf diese Integration |
| 404 | Integration nicht gefunden |
| 429 | Rate Limit überschritten |

> [!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.