Webhooks
BossMode webhooks go two directions. Inbound events come from trusted partners — the primary example is AvatarCzar sending confidence updates when a persona’s read on the market changes. Outbound events go from BossMode to whatever URL you configure — Slack, a warehouse, your own service — when directives execute, packs install, revenue is recorded, or the guardian kill engages. Both directions are HMAC-SHA256 signed, timestamp-guarded to reject replays older than 5 minutes, and verified in constant time. Inbound endpoints resolve the sending customer from the payload’s identifier (not from the body’scustomerId field) to block cross-tenant forgery. Outbound deliveries are at-least-once with exponential backoff — design handlers to be idempotent.
Inbound webhooks — AvatarCzar confidence updates
BossMode accepts inbound confidence update events from AvatarCzar at:Signature verification
Every inbound request from AvatarCzar is signed with HMAC-SHA256. The implementation is inlib/avatarczar-inbound.ts.
The signature is delivered in the x-avatarczar-signature request header in the format:
crypto.timingSafeEqual) to prevent timing attacks.
Payload shape
The inbound payload is validated against theavatarCzarConfidenceUpdateSchema from lib/avatarczar-inbound.ts:
Rate limit
/api/pro/avatarczar/induction — 60 requests per 60 seconds.
Outbound webhooks — operator destinations
Configure outbound webhook destinations to receive BossMode events at your own endpoints.Configuration endpoint
Registering a destination
localhost, 169.254.0.0/16 metadata hosts, and non-HTTPS schemes are rejected.
Event types
Request format
Verifying
Retry policy
- At-least-once delivery. Design handlers to be idempotent.
- Up to 5 attempts with exponential backoff (1s → 10s → 60s → 10m → 1h).
- Response
2xx= delivered. Any other status = retry. Response410 Gone= permanent failure; retries stop.
Security
Outbound webhooks from BossMode are signed with HMAC-SHA256, using the same signing approach as AvatarCzar inbound events. Verify theX-BossMode-Signature header on your receiving endpoint.