FluxyChat

Webhooks

Webhook event catalog

Outbound webhook types, payload shape, HMAC signing, retries, and batch verify.

FluxyChat delivers project events to HTTPS endpoints you register in the dashboard Admin tab or via POST /webhooks/register.

Discover types

curl "$WORKER_URL/webhooks/event-types"

Returns the canonical events[] list (same as this page).

Event types

EventWhen it firesPayload highlights
message.createdNew message persistedroomId, messageId, userId, content
mentionUser @mentionedroomId, messageId, mentionedUserId
report.createdModeration report filedroomId, messageId, reporterId
moderation.auto_flagAutomation flagged contentroomId, messageId, reason
room.occupiedFirst subscriber connectsroomId, at
room.vacatedLast subscriber disconnectsroomId, at
member_joinedPresence joinroomId, userId, subscriptionCount
member_leftPresence leaveroomId, userId, subscriptionCount
subscription_countConnection count changedroomId, subscriptionCount
client_eventClient-sent client-* WS eventroomId, event, data
cache_missCache channel empty on subscriberoomId, at
user.eventUser channel pushuserId, event
webhook.delivery_failedA delivery exhausted its retries (error workflow; see below)deliveryId, webhookId, webhookUrl, eventType, attempts, lastHttpStatus, lastError

Subscribe only to events you handle — unknown types are rejected at registration time.

Envelope

Each delivery POST body:

{
  "type": "message.created",
  "projectId": "proj_abc",
  "payload": { "roomId": "support", "messageId": 42 },
  "createdAt": "2026-07-28T12:00:00.000Z"
}

Headers:

HeaderValue
Content-Typeapplication/json
X-Fluxy-SignatureHMAC-SHA256 hex of raw body
X-Fluxy-EventEvent type
X-Fluxy-Project-IdProject id
X-Fluxy-Delivery-IdDelivery row id (for idempotency)

Verify signatures with your webhook secret (shown once at registration). Use the dashboard Webhooks playground to test HMAC locally.

Retry policy

Deliveries succeed when your endpoint returns 2xx (typically 200).

AttemptBackoff (default)
1immediate
260s
35m
430m
560m

Max attempts: WEBHOOK_MAX_ATTEMPTS (default 5). Failed deliveries appear under Activities in the console.

Error workflow (n8n-style)

Register a second webhook subscribed to webhook.delivery_failed and it becomes your error workflow: every time a delivery exhausts its retries, that endpoint receives a notice with the failed delivery's metadata (deliveryId, webhookId, eventType, attempts, lastHttpStatus, lastError).

curl -X POST "$WORKER_URL/webhooks/register" \
  -H "Authorization: Bearer $ADMIN_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://api.example.com/fluxy/errors",
    "eventTypes": ["webhook.delivery_failed"],
    "secret": "whsec_your_other_secret"
  }'

Rules, so the chain cannot loop:

  • The failing webhook itself is never notified about its own failure.
  • A failed webhook.delivery_failed delivery is not re-notified — the chain stops after one hop.
  • Only exhausted retries fire this event; deliveries blocked by signing configuration are not re-sent (the last_error on the delivery explains why).
  • The original payload is not re-sent: fetch it from Activities or GET the delivery if you need it.

Batch verify (optional)

Send an array of sample events to POST /webhooks/verify-batch with X-Fluxy-Signature to validate your handler accepts multiple event shapes before going live.

Register

curl -X POST "$WORKER_URL/webhooks/register" \
  -H "Authorization: Bearer $ADMIN_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://api.example.com/fluxy/webhook",
    "eventTypes": ["message.created", "room.occupied"],
    "secret": "whsec_your_random_secret"
  }'

See also

On this page