Skip to main content

Prerequisites

The connector should already be set up, with a Connector Profile and a Linked Account. See Getting Started on the E2B connector page.

How StackOne sets up E2B webhooks

Nothing needs configuring in E2B. When you connect an E2B account with events enabled, StackOne registers a webhook automatically and removes it again when the connection is deleted. A single registration carries every event you enable.

1

Connect the account with the right API key

The webhook is registered for the team that owns the API key used for the connection, and it reports only on that team’s sandboxes. Use the same key you want StackOne to read sandboxes with, so events and data stay in step.

2

Check the registration if you need to confirm it

The webhook StackOne registers is named StackOne. E2B’s console does not list webhooks, so use the connector’s List Webhooks action to see it, along with its destination URL, its enabled flag and the events it is subscribed to. Leave it alone — StackOne manages its whole lifecycle and removes it when the connection is deleted.

  • The address StackOne registered is the same one shown read-only as Native Webhook URL on the linked account — there is nothing to copy across by hand.
  • List Webhook Deliveries and Get Webhook Statistics show whether events are reaching StackOne, which is the quickest way to tell a delivery problem from a mapping one.

Available webhook events

E2B emits six sandbox lifecycle events. Only events selected in StackOne are included in the registration — E2B sends nothing for events that are not subscribed.

1

Enable sandbox run-state events

Events covering a sandbox starting, stopping and moving between running and paused.

  • Sandbox Created (sandbox.lifecycle.created) — Fired when a sandbox is created.
  • Sandbox Killed (sandbox.lifecycle.killed) — Fired when a running sandbox is terminated. Reports why, as a kill reason of request, timeout, admin, orphaned, base_template_missing or unknown. Not sent when a paused sandbox is killed: E2B emits this event only for sandboxes that are running at the time they are killed.
  • Sandbox Paused (sandbox.lifecycle.paused) — Fired when a sandbox is paused.
  • Sandbox Resumed (sandbox.lifecycle.resumed) — Fired when a paused sandbox is resumed. The sandbox keeps its id but starts a new execution.
2

Enable sandbox change events

Events covering changes to a sandbox that do not alter whether it is running.

  • Sandbox Updated (sandbox.lifecycle.updated) — Fired when a sandbox’s configuration changes, for example when its timeout is extended.
  • Sandbox Checkpointed (sandbox.lifecycle.checkpointed) — Fired when a snapshot of a sandbox is created.

Verify

Your Connector should now be able to receive and process events. Try triggering an event and you should see an Event appear in the Connector logs.