Webhooks

Message Events

LifeLoop emits message events — a message was posted, edited, or deleted. Shared schema for message.created, message.updated, and message.deleted. resourceId's meaning depends on which of the three fired — see each operation's own description, not this shared text: message.created's resourceId is the thread ID; message.updated/message.deleted's resourceId is the message ID. message.created also carries messageId, the ID of the new message.

Events

Event typeTriggered when
message.createdFired when a new message is posted to a thread involving a resident or connection.
message.updatedFired when a message body is edited by the original sender.
message.deletedFired when a message is soft-deleted by the original sender.

What to do after receiving this event

  1. Check the X-API-KEY header.
  2. Read resourceId from the payload — this is the messageId.
  3. Call GET /api/v1/{tenant}/messages/{resourceId} to fetch the full object.
  4. Update your local data store.
  5. Return HTTP 200.
Sample payloadmessage.created.json
{
  "messageId": "msg-001",
  "eventType": "message.created",
  "eventId": "f3a91bc2-4d12-4e88-a1c3-8f2901dd7c94",
  "tenant": "sunrise-001",
  "aggregateType": "message",
  "resourceId": "msg-001",
  "occurredAt": "2026-06-18T10:30:00Z"
}
Fetch the full objectbash
curl https://api.lifeloop.com/api/v1/sunrise-001/messages/msg-001 \
  -H "Authorization: Bearer YOUR_SERVICE_TOKEN" \
  -H "X-Acting-User-Id: ACTING_USER_ID" \
  -H "X-Acting-User-Tenant: sunrise-001"