Skip to main content
Webhooks deliver events to an HTTPS endpoint you control. Use them to react to task completion or failure without polling.

Before you start

  • The Webhooks entry needs to be in your sidebar. If it isn’t, webhooks aren’t enabled on this deployment — contact your team admin.
  • You need an admin role in the team that will own the webhook.
  • An HTTPS endpoint reachable from the public internet. http:// is not accepted.

Create a webhook

  1. Open Webhooks in the sidebar.
  2. Click Create webhook.
  3. Enter:
    • URL — your endpoint. Must be https://.
    • Events — pick which events trigger delivery. See the list below.
    • Description — internal label.
  4. Click Create. The dashboard shows the webhook’s signing secret. Copy it now — like credentials, it’s shown once.

Events

Two task events are delivered today. For finer-grained transitions (queued, running, cancelled) subscribe to the task’s SSE event stream instead of webhooks.

Payload shape

Each delivery is a JSON POST. Headers:
Body:
A task.failed delivery has the same shape with task_status: "failed", task_output: null, and task_error populated with the failure reason.

Verify the signature

Cyberun signs every delivery with HMAC-SHA256 using the secret shown at webhook creation. Verify the signature before trusting the payload. The signature is computed over the raw request body and sent as X-Webhook-Signature-256: sha256=<hex_hmac>.
Reject deliveries with missing or non-matching signatures with HTTP 401.

Acknowledge promptly

  • Respond 2xx quickly. Slow responses count as failures and trigger the retry policy.
  • Do the heavy work asynchronously. The handler should validate the signature, enqueue the work, and return — not block on downstream systems.

Retries

On 5xx or timeout, Cyberun retries up to 4 times with exponential backoff: immediate → 5s → 30s → 2min. After the last attempt fails the delivery is dropped. The task_id is stable across retries — your handler should treat a repeat delivery for the same task_id and event_type as a no-op.

Rotate the signing secret

If a secret is suspected leaked, open the webhook’s detail page and rotate it. The new secret is shown once; future deliveries are signed with it immediately.

Don’t

  • ❌ Trust the payload without verifying the signature.
  • ❌ Block on slow work in the request handler — acknowledge first, process after.
  • ❌ Expose the signing secret in client-side code. It’s a server-side secret.