Webhook Events
Events pushed to consumer webhooks on thread and message state changes.
PlatformXe pushes events to your registered webhook endpoints when thread state changes occur. These follow the same delivery and retry patterns as all PlatformXe webhooks.
Event Types
| Event | Trigger | Payload |
|---|---|---|
thread.created | New thread opened | Thread + participants |
thread.closed | Thread closed (manual or lifecycle) | Thread + reason |
thread.reopened | Closed thread reopened | Thread |
message.created | New message posted | Message + sender + thread |
message.edited | Message content changed | Message (before + after) |
message.deleted | Message soft-deleted | Message ID + thread |
participant.joined | New participant added | Participant + thread |
participant.left | Participant removed | Participant + thread |
read.updated | Participant read state changed | ReadState + thread |
Subscribing
Register a webhook subscription with the relevant event types:
POST /api/v1/webhooks
{
"name": "Thread notifications",
"url": "https://your-app.com/webhooks/threads",
"events": ["thread.created", "message.created", "thread.closed"]
}
Payload Format
All webhook payloads follow the standard PlatformXe envelope:
{
"event": "message.created",
"event_id": "evt_abc123",
"timestamp": 1712937600,
"data": {
"threadId": "th-001",
"messageId": "msg-005",
"senderRole": "GUEST",
"senderExternalId": "usr-abc",
"type": "TEXT",
"content": "What time can I check in?"
}
}
Payloads are signed with HMAC-SHA256. Verify the X-Webhook-Signature header using your webhook secret.