REST-API: Webhooks verwalten
Diese Seite gehört zur REST-API-Referenz. Dort stehen Adresse, Anmeldung, Scopes, Paginierung und Fehler. Alle Pfade hängen an https://api.litelog.de/api. In den Beispielen steht $KEY für Ihren API-Schlüssel; die Beispielwerte sind erfunden.
Diese Aufrufe verwalten ausgehende Webhooks: Adresse, Ereignisse, Pause, Geheimnis, Test und Zustellprotokoll. Welche Ereignisse es gibt, wie die Nutzlast aussieht und wie Sie die Signatur prüfen, steht auf der Seite Webhooks. Je Firma sind höchstens 5 Webhooks möglich.
Übersicht
| Aufruf | Zweck | Scope |
|---|---|---|
GET /v1/webhooks |
Ausgehende Webhooks auflisten | webhooks:read |
POST /v1/webhooks |
Ausgehenden Webhook anlegen | webhooks:write |
GET /v1/webhooks/{id} |
Einen ausgehenden Webhook lesen | webhooks:read |
PATCH /v1/webhooks/{id} |
Webhook ändern, pausieren, wieder aktivieren oder das Geheimnis erneuern | webhooks:write |
DELETE /v1/webhooks/{id} |
Ausgehenden Webhook löschen | webhooks:write |
POST /v1/webhooks/{id}/test |
Test-Zustellung sofort senden | webhooks:write |
GET /v1/webhooks/{id}/deliveries |
Zustellprotokoll eines Webhooks lesen (letzte 30 Tage) | webhooks:read |
GET /v1/webhooks
Ausgehende Webhooks auflisten.
Berechtigung (Scope): webhooks:read
Beispielaufruf
curl "https://api.litelog.de/api/v1/webhooks" \
-H "X-Api-Key: $KEY"
Beispielantwort (200)
{
"data": [
{
"id": "b84d1f6a-2c3e-4a59-8d70-1e9f5c7a3b26",
"name": "Zeiterfassung Lohnbüro",
"url": "https://lohn.example.com/webhooks/litelog",
"events": [
"time_entry.started",
"time_entry.stopped"
],
"status": "paused",
"disabled_reason": null,
"secret_prefix": "whsec_DEMO_2",
"previous_secret_expires_at": null,
"consecutive_failures": 0,
"last_success_at": "2026-12-02T13:58:41.000Z",
"last_failure_at": null,
"created_at": "2026-12-02T09:00:00.000Z",
"updated_at": "2026-12-02T14:05:00.000Z"
},
{
"id": "3f2b8c1e-5a4d-4e7b-9c1a-6d2f8e0b4a17",
"name": "PMS-Anbindung",
"url": "https://pms.example.com/hooks/litelog",
"events": [
"incident.created",
"task.completed",
"patrol.missed"
],
"status": "active",
"disabled_reason": null,
"secret_prefix": "whsec_BEISPI",
"previous_secret_expires_at": null,
"consecutive_failures": 0,
"last_success_at": "2026-12-01T10:42:07.000Z",
"last_failure_at": null,
"created_at": "2026-12-01T08:15:00.000Z",
"updated_at": "2026-12-01T08:15:00.000Z"
}
]
}
POST /v1/webhooks
Ausgehenden Webhook anlegen.
Berechtigung (Scope): webhooks:write
Felder im Rumpf (JSON)
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
name |
string | ja | Höchstens 120 Zeichen. |
url |
string | ja | Höchstens 2000 Zeichen. |
events |
array (string) | ja | Werte: form_response.submitted, incident.created, task.completed, task.completion.cancelled, task.completion.reassigned, patrol.completed, patrol.missed, time_entry.started, time_entry.stopped. |
Beispielaufruf
curl -X POST "https://api.litelog.de/api/v1/webhooks" \
-H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
-d '{
"name": "PMS-Anbindung",
"url": "https://pms.example.com/hooks/litelog",
"events": [
"incident.created",
"task.completed",
"patrol.missed"
]
}'
Beispielantwort (201)
{
"data": {
"id": "3f2b8c1e-5a4d-4e7b-9c1a-6d2f8e0b4a17",
"name": "PMS-Anbindung",
"url": "https://pms.example.com/hooks/litelog",
"events": [
"incident.created",
"task.completed",
"patrol.missed"
],
"status": "active",
"disabled_reason": null,
"secret_prefix": "whsec_BEISPI",
"previous_secret_expires_at": null,
"consecutive_failures": 0,
"last_success_at": null,
"last_failure_at": null,
"created_at": "2026-12-01T08:15:00.000Z",
"updated_at": "2026-12-01T08:15:00.000Z",
"secret": "whsec_BEISPIEL_NICHT_VERWENDEN_000000000000000000"
}
}
GET /v1/webhooks/{id}
Einen ausgehenden Webhook lesen.
Berechtigung (Scope): webhooks:read
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
id |
Pfad | string (uuid) | ja | — |
Beispielaufruf
curl "https://api.litelog.de/api/v1/webhooks/3f2b8c1e-5a4d-4e7b-9c1a-6d2f8e0b4a17" \
-H "X-Api-Key: $KEY"
Beispielantwort (200)
{
"data": {
"id": "3f2b8c1e-5a4d-4e7b-9c1a-6d2f8e0b4a17",
"name": "PMS-Anbindung",
"url": "https://pms.example.com/hooks/litelog",
"events": [
"incident.created",
"task.completed",
"patrol.missed"
],
"status": "active",
"disabled_reason": null,
"secret_prefix": "whsec_BEISPI",
"previous_secret_expires_at": null,
"consecutive_failures": 0,
"last_success_at": "2026-12-01T10:42:07.000Z",
"last_failure_at": null,
"created_at": "2026-12-01T08:15:00.000Z",
"updated_at": "2026-12-01T08:15:00.000Z"
}
}
PATCH /v1/webhooks/{id}
Webhook ändern, pausieren, wieder aktivieren oder das Geheimnis erneuern.
Berechtigung (Scope): webhooks:write
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
id |
Pfad | string (uuid) | ja | — |
Felder im Rumpf (JSON)
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
name |
string | nein | Höchstens 120 Zeichen. |
url |
string | nein | Höchstens 2000 Zeichen. |
events |
array (string) | nein | Werte: form_response.submitted, incident.created, task.completed, task.completion.cancelled, task.completion.reassigned, patrol.completed, patrol.missed, time_entry.started, time_entry.stopped. |
status |
string | nein | Werte: active, paused. |
rotate_secret |
boolean | nein | Werte: true. |
grace_hours |
integer | nein | Nur mit rotate_secret. Stunden, in denen das bisherige Geheimnis weiter X-LiteLog-Signature-Previous signiert. Standard: 24; 0 – 168. |
Beispielaufruf
curl -X PATCH "https://api.litelog.de/api/v1/webhooks/3f2b8c1e-5a4d-4e7b-9c1a-6d2f8e0b4a17" \
-H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
-d '{
"rotate_secret": true,
"grace_hours": 24
}'
Beispielantwort (200)
{
"data": {
"id": "3f2b8c1e-5a4d-4e7b-9c1a-6d2f8e0b4a17",
"name": "PMS-Anbindung",
"url": "https://pms.example.com/hooks/litelog",
"events": [
"incident.created",
"task.completed",
"patrol.missed"
],
"status": "active",
"disabled_reason": null,
"secret_prefix": "whsec_MUSTER",
"previous_secret_expires_at": "2026-12-03T09:30:00.000Z",
"consecutive_failures": 0,
"last_success_at": "2026-12-01T10:42:07.000Z",
"last_failure_at": null,
"created_at": "2026-12-01T08:15:00.000Z",
"updated_at": "2026-12-02T09:30:00.000Z",
"secret": "whsec_MUSTER_NICHT_VERWENDEN_00000000000000000000"
}
}
DELETE /v1/webhooks/{id}
Ausgehenden Webhook löschen.
Berechtigung (Scope): webhooks:write
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
id |
Pfad | string (uuid) | ja | — |
Beispielaufruf
curl -X DELETE "https://api.litelog.de/api/v1/webhooks/3f2b8c1e-5a4d-4e7b-9c1a-6d2f8e0b4a17" \
-H "X-Api-Key: $KEY"
Beispielantwort: 204, ohne Rumpf.
POST /v1/webhooks/{id}/test
Test-Zustellung sofort senden.
Berechtigung (Scope): webhooks:write
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
id |
Pfad | string (uuid) | ja | — |
Beispielaufruf
curl -X POST "https://api.litelog.de/api/v1/webhooks/3f2b8c1e-5a4d-4e7b-9c1a-6d2f8e0b4a17/test" \
-H "X-Api-Key: $KEY"
Beispielantwort (200)
{
"data": {
"ok": true,
"status_code": 200,
"duration_ms": 184,
"error_code": null
}
}
GET /v1/webhooks/{id}/deliveries
Zustellprotokoll eines Webhooks lesen (letzte 30 Tage).
Berechtigung (Scope): webhooks:read
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
id |
Pfad | string (uuid) | ja | — |
page |
Query | integer | nein | Standard: 1; mindestens 1. |
pageSize |
Query | integer | nein | Standard: 50; 1 – 100. |
status |
Query | string | nein | Werte: pending, running, delivered, failed, dead, skipped. |
Beispielaufruf
curl "https://api.litelog.de/api/v1/webhooks/3f2b8c1e-5a4d-4e7b-9c1a-6d2f8e0b4a17/deliveries?page=1&pageSize=50" \
-H "X-Api-Key: $KEY"
Beispielantwort (200)
{
"data": [
{
"id": "90214",
"event_id": "c5d81e3a-7b42-4f09-a6e1-3d9b2f8c0a65",
"event_type": "task.completed",
"is_test": false,
"status": "pending",
"attempts": 1,
"last_status_code": 503,
"last_error": "http_status",
"duration_ms": 2310,
"next_attempt_at": "2026-12-01T11:20:00.000Z",
"delivered_at": null,
"created_at": "2026-12-01T11:15:02.000Z"
},
{
"id": "90211",
"event_id": "0a6f4c2e-1d83-4b57-9e20-8c7b5a3d1f94",
"event_type": "incident.created",
"is_test": false,
"status": "delivered",
"attempts": 1,
"last_status_code": 200,
"last_error": null,
"duration_ms": 184,
"next_attempt_at": null,
"delivered_at": "2026-12-01T10:42:07.000Z",
"created_at": "2026-12-01T10:42:06.000Z"
}
],
"total": 2,
"page": 1,
"pageSize": 50
}
