Skip to main content
Webhooks notify your systems when ingestion, enrichment, or retrieval events occur. The Engine writes events to MongoDB, the work scheduler dispatches them, and Mixpeek delivers HTTP POST requests (or channel-specific messages) until acknowledged.

Event Flow

  • Events persist until the worker receives a 2xx response.
  • Retries use exponential backoff; failures remain in MongoDB for inspection.
  • Delivery includes cache scopes so you can invalidate selectively.

Common Event Types

Use /api-reference/webhooks/list-webhooks to see the full catalog. To receive runs of some primitives only, add resource_types to the webhook, for example "resource_types": ["retriever"] with "event_types": ["resource.executed", "resource.execution_failed"]. The filter applies to every event type: for the per-kind types the resource type is the first part of the name (cluster in cluster.execution.completed). A retriever’s resource.executed payload carries pinned_revision.config: the exact stages, collection_ids and input_schema that ran. Sending them to POST /v1/retrievers/execute (with collection_ids as collection_identifiers) and the same inputs reruns that version of the retriever.
The same events are readable as an ordered, resumable log via the Change Feed. Webhooks push; the change feed lets you pull, which is what a consumer that can be offline needs.

Create a Webhook

Mixpeek also supports Slack, email, and SMS channels via channel-specific configs.

Payload Structure

Use event_id for deduplication and store payloads for auditing.

Security & Reliability

  • Require HTTPS endpoints; reject plaintext URLs.
  • Every delivery names its event in two headers: X-Mixpeek-Event (the event type, such as alert.triggered) and X-Mixpeek-Event-Id (the event’s id, the same on a retry, so you can drop duplicates). The body is the event payload. A header you set on the webhook with the same name replaces ours.
  • Set signing_secret and verify the X-Mixpeek-Signature header on every delivery (below). A static header such as X-Mixpeek-Secret also works, but it can be replayed.
  • Respond quickly (<10s). Offload heavy work to background jobs and return 200.
  • Use idempotent handlers; Mixpeek may retry on failure or timeout.
  • Monitor webhook delivery with your logging pipeline; correlate by event_id.

Verify a delivery

When a webhook channel has a signing_secret, every delivery carries:
The HMAC is computed over the string <t>. followed by the raw request body, keyed by your secret. Recompute it over the raw bytes you received (before any JSON parsing), compare in constant time, and reject a timestamp more than 300 seconds from your clock so a captured delivery cannot be replayed.
The secret is stored encrypted and is never returned: API reads show redacted in its place.

Operational Tips

  1. Subscribe only to the events you need to reduce noise.
  2. Combine webhook notifications with the Tasks API for full status context.
  3. Use cache scopes to invalidate retriever caches efficiently (collection, namespace, or key).
  4. Store webhook definitions in infrastructure-as-code so environments stay consistent.
  5. Alert on sustained non-2xx responses and fix the endpoint quickly. After 30 failed deliveries in a row spanning at least two hours, Mixpeek pauses the webhook (is_active: false, with paused_reason) and alerts your organization; any successful delivery resets the count. Update the webhook to turn it back on.
  6. Use a real endpoint. Create and update refuse URLs whose host can never receive a delivery, such as example.com and .test or .invalid names.

Inbound Webhooks (from upstream providers)

In addition to outbound webhooks (Mixpeek → your endpoint), Mixpeek can receive inbound webhooks from external systems to trigger ingestion and lifecycle events.

Sync lifecycle webhooks

Some sync integrations support inbound webhooks for lifecycle events (delete, update) on previously synced assets: These webhooks share common properties:
  • Scoped to a single connection by URL path (no Authorization header needed).
  • Signatures verified with hmac.compare_digest and provider-specific HMAC schemes.
  • Unhandled events acknowledged with 200 and handled: false so retries stop cleanly.

References