Bots API
Alle Bots auflisten und Bot-Details abrufen über den Bots-Endpunkt.
Übersicht
Die Bots API gibt dir Zugriff auf alle Bots deines Tenants. Du kannst die Liste der Bots abrufen, um z. B. Bot-IDs für andere API-Aufrufe zu ermitteln oder den Status deiner Bots zu überwachen.
BerechtigungBenötigter Scope: bots:read
Bots auflisten
GET /api/v1/bots
Beispiel-Request
curl -X GET "https://app.lymbe.ai/api/v1/bots" \
-H "X-API-Key: lymbe_sk_dein_api_key"
Beispiel-Response
bots-response.jsonjson
{
"bots": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Support-Bot",
"isActive": true,
"avatarUrl": "https://app.lymbe.ai/avatars/bot_abc.png",
"primaryColor": "#09CC78",
"language": "de",
"messageCount": 4521,
"conversationCount": 312,
"knowledgeBaseSize": 24,
"createdAt": "2026-01-10T08:00:00Z",
"updatedAt": "2026-03-15T16:20:00Z"
},
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Sales-Bot",
"isActive": true,
"avatarUrl": null,
"primaryColor": "#3B82F6",
"language": "de",
"messageCount": 1890,
"conversationCount": 145,
"knowledgeBaseSize": 12,
"createdAt": "2026-02-05T12:00:00Z",
"updatedAt": "2026-03-14T09:15:00Z"
},
{
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"name": "FAQ-Bot (Test)",
"isActive": false,
"avatarUrl": null,
"primaryColor": "#8B5CF6",
"language": "en",
"messageCount": 42,
"conversationCount": 8,
"knowledgeBaseSize": 3,
"createdAt": "2026-03-01T14:30:00Z",
"updatedAt": "2026-03-01T15:00:00Z"
}
]
}
Response-Felder
| Feld | Typ | Beschreibung |
|---|---|---|
| id | string (UUID) | Eindeutige Bot-ID – benötigt für Widget und andere API-Aufrufe |
| name | string | Name des Bots |
| isActive | boolean | Ob der Bot aktiv und erreichbar ist |
| avatarUrl | string | null | URL zum Avatar-Bild (null wenn keins gesetzt) |
| primaryColor | string | Primärfarbe als Hex-Wert |
| language | string | Sprache des Bots (ISO 639-1) |
| messageCount | number | Gesamtanzahl der Nachrichten |
| conversationCount | number | Gesamtanzahl der Gespräche |
| knowledgeBaseSize | number | Anzahl der Dokumente in der Wissensdatenbank |
| createdAt | string | Erstellungsdatum (ISO-8601) |
| updatedAt | string | Letztes Änderungsdatum (ISO-8601) |
Bot-Status
Das Feld isActive gibt an, ob der Bot aktuell für Besucher erreichbar ist. Ein deaktivierter Bot zeigt das Widget nicht an und beantwortet keine Nachrichten. Du kannst den Status im Dashboard unter Bots → Einstellungen umschalten.
| Status | isActive | Verhalten |
|---|---|---|
| Aktiv | true | Widget wird angezeigt, Bot antwortet auf Nachrichten |
| Inaktiv | false | Widget wird nicht geladen, API-Aufrufe geben weiterhin Bot-Details zurück |
Monitoring-Beispiel
bot-monitoring.tstypescript
const API_KEY = process.env.LYMBE_API_KEY!;
// Bot-Status überwachen und bei Inaktivität benachrichtigen
async function checkBotStatus() {
const res = await fetch('https://app.lymbe.ai/api/v1/bots', {
headers: { 'X-API-Key': API_KEY },
});
const { bots } = await res.json();
const inactiveBots = bots.filter((bot: any) => !bot.isActive);
if (inactiveBots.length > 0) {
console.warn('Inaktive Bots gefunden:');
inactiveBots.forEach((bot: any) => {
console.warn(` - ${bot.name} (${bot.id})`);
});
// Slack-Benachrichtigung oder E-Mail senden
}
return bots;
}