Skip to main content

Build

Daytona Webhooks

HookdeckOfficialCertified

Receive and verify Daytona webhooks (sandbox infrastructure for AI code). Use when setting up Daytona webhook handlers, debugging Svix signature verification (svix-id, svix-timestamp, svix-signature, whsec_ secret), or handling events like sandbox.created, sandbox.state.updated, snapshot.created, snapshot.state.updated, snapshot.removed, volume.created and volume.state.updated.

  • New
  • v1.0.1
  • Reviewed Oct 21
  • No reviews yet

Capabilities

  • Verification (core)

    Signed content is {svix-id}.{svix-timestamp}.{raw body}, HMAC-SHA256, base64

  • Payload Shape and Deduplication

    Payloads are flat JSON

  • Local Development

    No account required

  • Recommended: webhook-handler-patterns

Getting started

Full instructions

Example command

Local Development

npx hookdeck-cli listen 3000 daytona --path /webhooks/daytona

Instructions: SKILL.mdv1.0.1

Daytona Webhooks

Daytona runs sandboxes for AI-generated code. It sends webhooks when sandboxes, snapshots and volumes are created, change state, or are removed.

Where the signature scheme comes from: Daytona's public webhooks page documents the events and payloads but says nothing about signing or verification. The scheme below is Svix's: Daytona's source shows deliveries go out through Svix, and the dashboard reads the Svix endpoint secret. Daytona does not document it, so confirm it against your own deliveries (see references/verification.md).

When to Use This Skill

  • How do I receive Daytona webhooks?
  • How do I verify a Daytona webhook signature (svix-signature)?
  • How do I react when a sandbox changes state (sandbox.state.updated)?
  • How do I handle snapshot.created or volume.created events?
  • Why is my Daytona webhook signature verification failing?
  • Why am I processing the same Daytona event twice?

Verification (core)

Header Value
svix-id Message ID. Same on every retry of the same message
svix-timestamp Unix seconds when the attempt was sent
svix-signature Space-delimited list of v1,<base64> signatures

Signed content is {svix-id}.{svix-timestamp}.{raw body}, HMAC-SHA256, base64. The key is the base64-decoded part of the secret after whsec_. Compare in constant time against every v1, entry.

javascript
import crypto from 'node:crypto';

// rawBody: the exact bytes received (express.raw() / request.text()), NOT re-serialised JSON.
// toleranceSec = 0 (default) skips the timestamp window, because Hookdeck retries and replays
// keep the original svix-timestamp. A positive value opts in.
function verifyDaytonaWebhook(rawBody, headers, secret, toleranceSec = 0) {
  const id = headers['svix-id'];
  const ts = headers['svix-timestamp'];
  const sigs = headers['svix-signature'];
  if (!id || !/^\d+$/.test(ts ?? '') || !sigs) throw new Error('Missing or malformed svix-* headers');
  if (toleranceSec > 0 && Math.abs(Date.now() / 1000 - Number(ts)) > toleranceSec) {
    throw new Error('Timestamp outside tolerance');
  }
  const key = Buffer.from(secret.replace(/^whsec_/, ''), 'base64'); // decode; don't use the string as-is
  const expected = crypto.createHmac('sha256', key).update(`${id}.${ts}.`).update(rawBody).digest();
  const ok = sigs.split(' ').some((entry) => {
    const [version, sig] = entry.split(',');
    const given = Buffer.from(sig ?? '', 'base64');
    return version === 'v1' && given.length === expected.length && crypto.timingSafeEqual(given, expected);
  });
  if (!ok) throw new Error('Invalid signature');
  return JSON.parse(rawBody.toString('utf8'));
}

Why not the svix SDK? new Webhook(secret).verify(...) (npm) and Webhook(secret).verify(...) (PyPI) check the same signature, but they always enforce a 5-minute timestamp window with no way to turn it off. Hookdeck retries and replays carry the original svix-timestamp, so the SDK rejects them. The examples verify manually and make the window opt-in with DAYTONA_TIMESTAMP_TOLERANCE_SECONDS (default 0; a positive number of seconds turns it on; anything that isn't a whole number is treated as 0, with a warning at startup). If you never retry or replay late, the SDK is fine.

The Python version is in references/verification.md.

For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.

Payload Shape and Deduplication

Payloads are flat JSON. The discriminator is event, with an ISO 8601 timestamp:

json
{ "event": "sandbox.state.updated", "timestamp": "2025-12-19T10:30:00.000Z",
  "id": "sandbox123", "organizationId": "org123",
  "oldState": "started", "newState": "stopped", "updatedAt": "2025-12-19T10:30:00.000Z" }

The payload has no event ID, so deduplicate on svix-id, which stays the same when Svix retries a message.

Common Event Types

Event Fired when Key fields
sandbox.created A new sandbox is created id, organizationId, state, sandboxClass, createdAt
sandbox.state.updated A sandbox's state changes id, organizationId, oldState, newState, updatedAt
snapshot.created A new snapshot is created id, name, organizationId, state, createdAt
snapshot.state.updated A snapshot's state changes id, name, organizationId, oldState, newState, updatedAt
snapshot.removed A snapshot is removed id, name, organizationId, removedAt
volume.created A new volume is created id, name, organizationId, state, createdAt
volume.state.updated A volume's state changes id, name, organizationId, oldState, newState, updatedAt

Environment Variables

bash
DAYTONA_WEBHOOK_SECRET=whsec_your_endpoint_secret   # Svix endpoint signing secret
DAYTONA_TIMESTAMP_TOLERANCE_SECONDS=0       # Optional replay window; a positive value opts in

Local Development

bash
npx hookdeck-cli listen 3000 daytona --path /webhooks/daytona

No account required. The CLI creates a guest account on first run and gives you a tunnel and a web UI for inspecting requests. Use port 8000 for the FastAPI example.

Reference Materials

  • references/overview.md - What Daytona webhooks are, events and payloads
  • references/setup.md - Create an endpoint in the Daytona Dashboard and get the secret
  • references/verification.md - Svix verification details, manual fallback, gotchas

Install the patterns skill alongside this one for production-ready handlers:

  • Handler sequence
  • Idempotency
  • Error handling
  • Retry logic
  • svix-webhooks - Generic Svix signature verification for any Svix-delivered provider
  • agentmail-webhooks - Email inboxes for AI agents (Svix)
  • recall-ai-webhooks - Meeting bot webhooks (Svix / Standard Webhooks)
  • crusoe-webhooks - Cloud infrastructure notifications (Svix)
  • vanta-webhooks - Compliance webhooks (Svix)
  • openmeter-webhooks - Usage metering notifications (Svix)
  • browserbase-webhooks - Headless browser infrastructure for AI agents
  • docker-hub-webhooks - Container registry webhooks
  • webhook-handler-patterns - Idempotency, error handling, retry logic
  • hookdeck-event-gateway - Production webhook infrastructure

Explore more skills

Browse all
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed

Reviews (0)

More from Hookdeck

View source →
razorpay-webhooksReceive and verify Razorpay webhooks. Use when setting up Razorpay webhook handlers, debugging X-Razorpay-Signature verification, or handling payment events like payment.captured, payment.failed, order.paid, refund.processed, or…3 installsvercel-log-drains-webhooksReceive and verify Vercel Log Drains deliveries. Use when setting up a Vercel log drain HTTP endpoint, debugging x-vercel-signature verification, passing the drain's endpoint test, or processing batched log entries from sources like…1 installsstripe-webhooksReceive and verify Stripe webhooks. Use when setting up Stripe webhook handlers, debugging signature verification, or handling payment events like payment_intent.succeeded, customer.subscription.created, or invoice.paid.1 installsalchemy-webhooksReceive and verify Alchemy Notify webhooks. Use when setting up Alchemy webhook handlers, debugging X-Alchemy-Signature verification, or handling onchain events like ADDRESS_ACTIVITY, NFT_ACTIVITY, or GRAPHQL (Custom Webhook).1 installstiktok-webhooksReceive and verify TikTok for Developers webhooks (Login Kit, Content Posting, Data Portability). Use when setting up TikTok webhook handlers, debugging TikTok-Signature verification, or handling events like authorization.removed,…1 installsfedex-webhooksReceive and verify FedEx Advanced Integrated Visibility (AIV) shipment tracking webhooks. Use when setting up an AIV webhook or "Try this webhook" in the FedEx Developer Portal, verifying the fdx-signature header (base64 HMAC-SHA256 of the…1 installs

Frequently asked questions about daytona-webhooks

What does the daytona-webhooks skill do?

Receive and verify Daytona webhooks (sandbox infrastructure for AI code). Use when setting up Daytona webhook handlers, debugging Svix signature verification (svix-id, svix-timestamp, svix-signature, whsec_ secret), or handling events like sandbox.created, sandbox.state.updated, snapshot.created, snapshot.state.updated, snapshot.removed, volume.created and volume.state.updated. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the daytona-webhooks skill?

Run `npx @skills-hub-ai/cli install hookdeck-daytona-webhooks` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/hookdeck-daytona-webhooks/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does daytona-webhooks work with?

daytona-webhooks runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the daytona-webhooks skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use daytona-webhooks after installing it?

In Claude Code, type `/hookdeck-daytona-webhooks` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the daytona-webhooks skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.

Badge for your README

Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.

Install on Skills Hub badge preview
Markdown
[![Install on Skills Hub](https://skills-hub.ai/api/badges/skill/hookdeck-daytona-webhooks)](https://skills-hub.ai/skills/hookdeck-daytona-webhooks)
HTML
<a href="https://skills-hub.ai/skills/hookdeck-daytona-webhooks"><img src="https://skills-hub.ai/api/badges/skill/hookdeck-daytona-webhooks" alt="Install on Skills Hub"></a>

More options in the badge docs.