- Integrity Events (AIP) — per-turn checkpoint verdicts from the gateway (violations, drift, conscience)
- Alignment Trace Events (AAP) — post-hoc trace analysis from the observer (verification, escalation, policy)
Quick start
Get your first webhook firing in under 5 minutes: 1. Create an endpoint in your organization settings, or via the API:Event catalog
Mnemom emits 28 event types across two systems: AIP (integrity checkpoints from the gateway) and AAP (alignment traces from the observer), plus platform events for drift, reputation, teams, and billing.Integrity events (AIP)
These events fire from the gateway as it processes each request.X-AIP-Signature and include X-AIP-Version.
Alignment trace events (AAP)
These events fire from the observer after post-hoc trace analysis.X-AAP-Signature and include X-AAP-Version. Use the trace.* wildcard to subscribe to all trace events, or * for everything.
Platform events
event_types empty to receive all events.
Payload envelope
Every webhook delivery uses the same envelope structure:Example payloads
integrity.violation
integrity.violation
integrity.checkpoint
integrity.checkpoint
sideband.drift.fired
sideband.drift.fired
drift.resolved
drift.resolved
conscience.escalation
conscience.escalation
quota.warning
quota.warning
quota.exceeded
quota.exceeded
subscription.status_changed
subscription.status_changed
conscience.values_updated
conscience.values_updated
reputation.score_changed
reputation.score_changed
reputation.grade_changed
reputation.grade_changed
team.created
team.created
team.archived
team.archived
team.member_added
team.member_added
team.member_removed
team.member_removed
team.card_updated
team.card_updated
team_reputation.score_changed
team_reputation.score_changed
team_reputation.grade_changed
team_reputation.grade_changed
quota.team_reputation_exceeded
quota.team_reputation_exceeded
quota.team_reputation_warning
quota.team_reputation_warning
AAP trace event payloads
AAP trace events use a different payload structure from AIP events. The envelope includesevent (most specific event type), all_events (all applicable types for this trace), and a trace object with verification and policy results.
trace.created
trace.created
trace.verified
trace.verified
trace.failed
trace.failed
trace.escalation_required
trace.escalation_required
policy.violation
policy.violation
X-AAP-Signature (not X-AIP-Signature). The HMAC-SHA256 algorithm is identical — only the header name differs. Use the header name to distinguish which system sent the webhook.Security
HMAC-SHA256 signing
Every webhook delivery includes three headers for signature verification:{timestamp}.{raw_body} using your endpoint’s signing secret as the HMAC key. This follows the Stripe webhook signing convention.
Replay protection
Always verify that the timestamp is within an acceptable window (recommended: 5 minutes) to prevent replay attacks. Reject any delivery whereX-Webhook-Timestamp is more than 300 seconds from your server’s current time.
Constant-time comparison
Use a constant-time comparison function when verifying signatures to prevent timing attacks. All standard libraries provide one — see the verification examples below.Signature verification
Verify webhook signatures in your endpoint handler to ensure payloads are authentic and untampered. Below are examples in four languages.Delivery & retries
First delivery
Mnemom attempts inline delivery immediately when an event is emitted. Most webhooks arrive within seconds of the triggering event. The first delivery attempt includes up to 4 rapid retries (at 1s, 5s, and 15s intervals). If all inline attempts fail, the event enters the dead-letter queue (DLQ) for persistent retry.Retry schedule
Failed deliveries are retried in two phases: Phase 1: Inline (immediate)Permanent vs. retryable failures
Auto-disable
If an endpoint accumulates 100 consecutive failures, it is automatically disabled. The account owner receives an email notification. To resume deliveries:- Fix the underlying issue with your endpoint
- Re-enable the endpoint in organization settings (or via
PATCHwithis_active: true) - The failure counter resets when you re-enable
Idempotency
Use theid field in the payload envelope as an idempotency key. The same event may be delivered more than once (e.g., after a redeliver request). Your handler should deduplicate using the event ID.
Ordering
Webhook deliveries are best-effort ordered by creation time. Due to retries and network variance, events may arrive out of order. Use thecreated_at timestamp for ordering if your use case requires it.
Testing
Test delivery button
Every endpoint has a “Test” action that sends a syntheticwebhook.test event with a test payload. Use this to verify connectivity and signature verification without triggering a real integrity event.
Development tools
For local development, use webhook.site or ngrok to expose a local endpoint:Delivery log
View the delivery history for any endpoint to debug issues:Redelivery
Redeliver a failed event to retry with the same payload:Integration examples
PagerDuty
Route integrity violations to PagerDuty as incidents:Slack
Post alerts to a Slack channel via incoming webhook:Datadog
Send custom events to Datadog:Troubleshooting
Signature mismatch
Signature mismatch
- Ensure you’re verifying against the raw request body, not re-serialized JSON
- Check that your signing secret is correct — it was only shown once at creation time. If lost, rotate the secret.
- Verify the timestamp header is being read correctly (it’s in Unix seconds, not milliseconds)
HTTPS required
HTTPS required
Timeouts (>10 seconds)
Timeouts (>10 seconds)
200 immediately and process the event asynchronously (e.g., via a background job queue).4xx permanent failure
4xx permanent failure
- 401/403 — Your auth middleware is blocking the request. Mnemom webhooks don’t include bearer tokens.
- 404 — The endpoint URL path is incorrect.
- 400 — Your request validation is rejecting the payload format.
Endpoint auto-disabled
Endpoint auto-disabled
Events not firing
Events not firing
- Verify the endpoint is active (
is_active: true) - Check that the event type is included in the endpoint’s
event_types(or thatevent_typesis empty for all events) - Confirm the triggering action occurred on an agent linked to an Enterprise billing account
- Check the delivery log for failed attempts
FAQ
Are there rate limits on webhook deliveries?
Are there rate limits on webhook deliveries?
Are events delivered in order?
Are events delivered in order?
created_at field for sequencing.What is the maximum payload size?
What is the maximum payload size?
How do I rotate my signing secret?
How do I rotate my signing secret?
POST /v1/orgs/{org_id}/webhooks/{endpoint_id}/rotate-secret. The new secret is returned once. Update your verification code before new deliveries arrive.Can I have multiple endpoints?
Can I have multiple endpoints?
How long are delivery logs retained?
How long are delivery logs retained?
What happens to events during endpoint downtime?
What happens to events during endpoint downtime?