Events
Setup
1
Add a webhook endpoint
In your project, go to Settings → Developer → Webhooks and click Add endpoint.Enter a publicly accessible HTTPS URL and select the events you want to receive.
2
Save your signing secret
After creating the endpoint, Lemma shows your signing secret once. Copy it immediately and store it securely — you won’t be able to retrieve it again.If you lose it, you can regenerate a new secret from the endpoint’s edit dialog.
3
Verify signatures
Every request includes an
X-Lemma-Signature header containing sha256=<hex>. Verify it before processing the payload to ensure the request came from Lemma.- Node.js
- Python
Payload shape
All events share a common envelope:incident object is present on all event types. The rootCause field is only populated on incident.analyzed.
Delivery and retries
Lemma considers a delivery successful if your endpoint responds with a2xx status within 10 seconds. Failed deliveries are retried with exponential backoff.
You can view the full delivery history — including request bodies, response codes, and latency — for each endpoint in Settings → Developer → Webhooks → Delivery log.
Testing
Use the Send test ping button (paper plane icon) next to any endpoint to send a syntheticincident.analyzed payload. This is useful for verifying your endpoint is reachable and your signature verification is working before you receive real events.
Security checklist
- Always verify the
X-Lemma-Signatureheader before processing - Use HTTPS endpoints only
- Store your signing secret in an environment variable, never in source code
- Return
2xxquickly — offload any slow processing to a background job to avoid timeouts