Webhooks
Anona Compute sends an HTTPSPOST to your endpoint when a sandbox is created, paused, resumed, killed or runs into trouble. Set endpoints up on the dashboard’s Webhooks page, or with the API.
Events
The body follows E2B’s
SandboxEvent shape:
eventData can also carry endReason (killed, timeout, failed, lost) and reason.
Manage endpoints with the API
Owners and admins manage webhooks in the dashboard. For automation, create a custom API key with theintegrations:manage scope; no preset includes it.
webhooks_api.py
https://, with a public host name: private, loopback and cloud-metadata addresses are refused when you save the URL, and again at every send (a name that later resolves inside is blocked). Redirects are never followed. Up to 10 endpoints per organization.
Delivery
- At least once. Deduplicate on the
webhook-idheader (the event ID; the same on every retry and every endpoint). - No ordering. Use
timestamp. - Success is any
2xxwithin 10 seconds; anything else, including a redirect, is a failed attempt. - Retries back off exponentially from 30 seconds up to 2 hours between attempts. After 10 attempts (about 4 hours) a delivery is dead. Resend it from the dashboard or with
POST /v1/webhooks/{id}/deliveries/{deliveryId}/resend. - Events and the delivery log are kept for 30 days.
Verify the signature
Deliveries are signed with Standard Webhooks, so its libraries (standardwebhooks on PyPI and npm, and others) verify them. By hand:
Verify the raw body before parsing it, reject timestamps more than 5 minutes off, compare in constant time, and deduplicate on
webhook-id. For 24 hours after you rotate a secret, the header carries two signatures separated by a space; accept the request if either matches.
POST /v1/webhooks/{id}/rotate-secret; the old secret keeps signing for 24 hours.
OpenTelemetry export
Send every sandbox’s metrics and lifecycle spans to your own OTLP/HTTP backend (Grafana, Honeycomb, Datadog, an OpenTelemetry Collector, …). Set it on the dashboard’s Telemetry page, or:otel_export.sh
<endpoint>/v1/metrics and <endpoint>/v1/traces every 60 seconds. Header values are encrypted at rest and never returned; leave headers out of an update to keep them.
Resource attributes:
service.name=anona-sandbox, anona.tenant.id, anona.sandbox.id, anona.template.id. Each lifecycle event is a span from the sandbox’s previous event to this one; all spans of a sandbox share one trace. sandbox.error spans have status ERROR. If your endpoint is down, metrics older than an hour and events older than a day are dropped rather than replayed; the dashboard shows the last error.
The same access rules apply as for webhooks: owners and admins, or a custom key with integrations:manage.