Foundational Compute

Webhooks

Get a signed HTTPS POST when a sandbox starts, pauses, resumes or ends.

1Add a webhook

  1. Open Webhooks at compute.fdtn.dev (owners and admins only).
  2. Enter an HTTPS URL on port 443 or 8443 at a public address, and select events.
  3. Copy the signing secret. The page shows it once.
  4. Click Send test event to get a signed sample.

2Events

Eventevent_labelWhen sent
sandbox.lifecycle.createdcreateA sandbox started.
sandbox.lifecycle.pausedpauseYou paused it, or the sandbox spending limit paused it.
sandbox.lifecycle.resumedresumeA paused sandbox started again.
sandbox.lifecycle.killedkillA kill, the end of its lifetime, or 72 hours after its last pause.

3Payload

A JSON body. This sandbox reached the end of its lifetime:

sandbox.lifecycle.killed
{
  "id": "6f1c2a9e-...",
  "version": "v2",
  "type": "sandbox.lifecycle.killed",
  "timestamp": "2026-11-05T10:15:00Z",
  "event_category": "lifecycle",
  "event_label": "kill",
  "event_data": {
    "sandbox_metadata": { "run": "eval-1" },
    "execution": { "started_at": "2026-11-05T10:10:00Z", "vcpu_count": 2, "memory_mb": 512 },
    "kill_reason": "timeout"
  },
  "sandbox_id": "i8x3k...",
  "sandbox_execution_id": "i8x3k...",
  "sandbox_template_id": "base",
  "sandbox_build_id": "",
  "sandbox_team_id": "<your workspace id>",
  "events_ttl_days": 30
}
FieldMeaning
idEvent ID, the same on every retry
timestampEvent time, UTC
event_data.sandbox_metadataMetadata from create, or {}
event_data.executionkilled only: started_at, vcpu_count, memory_mb, execution_time when known
event_data.kill_reasonkilled only: request, timeout or paused_retention
sandbox_template_id, sandbox_build_idTemplate and build; can be empty
sandbox_team_idYour workspace ID

4Verify the signature

HeaderValue
fdtn-timestampSend time in Unix seconds. New on each retry.
fdtn-signaturev1= and the hex HMAC-SHA256 of <fdtn-timestamp>.<body>, keyed with your signing secret.
user-agentFDTN-Compute-Webhooks/1

Sign the raw body, not parsed JSON. Compare in constant time. Refuse a timestamp more than 5 minutes old.

Python · TypeScript

verify.py
import hashlib, hmac, time

def verify(secret: str, headers: dict, body: bytes) -> bool:
    ts = headers["fdtn-timestamp"]
    if abs(time.time() - int(ts)) > 300:
        return False  # older than 5 minutes: maybe a replay
    want = hmac.new(secret.encode(), ts.encode() + b"." + body, hashlib.sha256).hexdigest()
    return hmac.compare_digest("v1=" + want, headers["fdtn-signature"])

5Delivery and retries

RuleDetail
SuccessA 2xx within 10 seconds
FailureAny other status (redirects too), a network error or no answer in 10 seconds
RetriesAfter 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours; then the page shows Failed
No retryA host name that points to a private address
OrderMessages can arrive out of order or twice. Sort by timestamp; drop duplicates by id.

Answer 200 first, then do slow work.

Next