Setting up Webhook Notifications
In this guide, you'll register a webhook endpoint, authenticate deliveries, and handle real-time events from LifeLoop.
- LifeLoop API service token
- A publicly accessible HTTPS endpoint
- Webhook signing secret (provided after registration)
Register your webhook endpoint
Contact LifeLoop support to register your webhook URL and receive your signing secret. You'll subscribe to specific event types like resident.updated, message.created, photo.uploaded.
Receive a webhook event
When an event occurs, LifeLoop sends a POST request to your endpoint with this envelope:
{
"eventId": "evt_1a2b3c4d",
"eventType": "message.created",
"tenant": "sunrise-001",
"occurredAt": "2026-06-22T15:30:00Z",
"resourceId": "msg-042"
}Check the X-API-KEY header
Every delivery carries your integration's configured key in the X-API-KEY header. Check it before trusting the request, using a constant-time comparison.
# Simulate a delivery to your endpoint
curl -X POST https://your-app.example.com/lifeloop/webhook \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_WEBHOOK_KEY" \
-d '{"eventId":"evt_1a2b3c4d","eventType":"message.created","aggregateType":"message","tenant":"sunrise-001","occurredAt":"2026-06-22T15:30:00Z","resourceId":"msg-042"}'Fetch the full resource
Webhook payloads are intentionally lightweight — fetch the full resource using resourceId.
curl https://api.lifeloop.com/api/v1/sunrise-001/messages/msg-042 \
-H "Authorization: Bearer YOUR_SERVICE_TOKEN" \
-H "X-Acting-User-Id: ACTING_USER_ID" \
-H "X-Acting-User-Tenant: sunrise-001"{
"id": "msg-042",
"residentId": "res-001",
"subject": "Had a wonderful day!",
"body": "Aileen participated in art class today.",
"createdAt": "2026-06-22T15:30:00Z"
}Return a 200 response
Respond with any 2xx quickly — LifeLoop waits up to 5 seconds to connect and 10 seconds for a response. No response, 5xx, 408 or 429 is retried up to 4 times (~30s, 1m, 2m, 4m apart); other responses are final.
Next steps
- Handle every event type (see Webhooks > Event Catalog)
- Implement idempotency using eventId
- Set up monitoring and alerting for failed webhook deliveries