Webhooks
Webhooks allow you to receive real-time HTTP POST notifications when events occur in Mission Control. Configure webhook endpoints to integrate with external services, trigger automation, or monitor system activity.Features
- Event filtering: Subscribe to specific event types or all events (
*) - HMAC signature verification: Cryptographically signed payloads using SHA-256
- Automatic retries: Exponential backoff with jitter (30s, 5m, 30m, 2h, 8h)
- Circuit breaker: Auto-disable after 5 consecutive failures
- Delivery history: Track all webhook attempts with status codes and response bodies
List Webhooks
Response
Array of webhook configurations with delivery statistics
Webhook ID
Webhook name
Target URL for webhook deliveries
Masked secret (shows only last 4 characters:
••••••abc1)Array of subscribed event types (e.g.,
["agent.status_change", "activity.task_created"] or ["*"] for all)Whether webhook is active
Number of consecutive delivery failures
true if circuit breaker is tripped (≥5 failures)Total delivery attempts
Deliveries with 2xx status code
Deliveries with errors or non-2xx status
Create Webhook
Request Body
Webhook name for identification
Target URL (must be valid HTTP/HTTPS endpoint)
Event types to subscribe to. Use
["*"] for all events. Defaults to ["*"]Generate HMAC secret for signature verification
Response
Created webhook ID
HMAC secret (64-character hex string). Only shown on creation.
Confirmation message
Update Webhook
Request Body
Webhook ID to update
New webhook name
New target URL
Updated event subscriptions
Enable or disable webhook
Generate a new HMAC secret (returns new secret in response)
Reset circuit breaker (clears failures and re-enables webhook)
Delete Webhook
Request Body
Webhook ID to delete
Get Delivery History
Retrieve webhook delivery logs with status codes, error messages, and response bodies.Query Parameters
Filter deliveries for a specific webhook
Maximum deliveries to return (max 200)
Pagination offset
Response
Delivery ID
Parent webhook ID
Event type (e.g.,
agent.status_change, test.ping)HTTP status code (e.g.,
200, 500, null if timeout)Error message if delivery failed
Request duration in milliseconds
Retry attempt number (0 = first attempt)
Whether this is a retry of a previous failed delivery
Unix timestamp
Total delivery count
Retry Failed Delivery
Manually retry a failed webhook delivery.Request Body
ID of the failed delivery to retry
Response
Whether the retry succeeded
HTTP status code from retry attempt
Request duration
Test Webhook
Send a test ping to verify webhook configuration.Request Body
Webhook ID to test
Test Payload Example
Signature Verification
All webhook payloads include an
X-MC-Signature header containing an HMAC-SHA256 signature. Always verify this signature before processing webhooks.Verification Algorithm
- Extract the raw request body as a UTF-8 string (do not parse JSON first)
- Read the
X-MC-Signatureheader - Compute HMAC-SHA256 of the raw body using your webhook secret
- Format as:
sha256=<hex-digest> - Compare using constant-time comparison
Node.js Example
Python Example
Retry Logic
Mission Control automatically retries failed webhook deliveries using exponential backoff:| Attempt | Delay | Total Time |
|---|---|---|
| 1 | immediate | 0s |
| 2 | 30s ±20% | ~30s |
| 3 | 5m ±20% | ~5m |
| 4 | 30m ±20% | ~35m |
| 5 | 2h ±20% | ~2.5h |
| 6 | 8h ±20% | ~10.5h |
Jitter (±20%) prevents thundering herd when multiple webhooks fail simultaneously.
Circuit Breaker
After 5 consecutive failures (across all retries), the webhook is automatically disabled. To re-enable:- Fix the endpoint issue
- Call
PUT /api/webhookswithreset_circuit: true
Event Types
Subscribe to specific event types or use* for all events:
Agent Events
agent.status_change- Agent status changed (online, offline, busy, error)agent.error- Agent entered error state
Task Events
activity.task_created- New task createdactivity.task_updated- Task fields modifiedactivity.task_deleted- Task deletedactivity.task_status_changed- Task status changed
Activity Events
activity.<type>- Generic activity (e.g.,activity.agent_created,activity.user_login)
Notification Events
notification.<type>- System notifications
Security Events
security.<action>- Security-related events (e.g.,security.login_failed)
Test Events
test.ping- Test webhook delivery
Payload Format
All webhook deliveries use this structure:Headers
Best Practices
- Always verify signatures - Prevent spoofed webhooks
- Respond quickly - Return 200 OK within 10 seconds (timeout)
- Process async - Queue webhooks for background processing
- Idempotency - Handle duplicate deliveries gracefully (retries)
- Monitor failures - Alert on circuit breaker trips
- Rotate secrets - Use
regenerate_secretperiodically
Rate Limits
- Creation/updates: 100 requests/minute per API key
- Delivery timeout: 10 seconds per webhook
- Max retries: 5 attempts with exponential backoff
- History retention: Last 200 deliveries per webhook
The automatic retry scheduler runs every 60 seconds and processes up to 50 pending retries per batch.