Settings
Reading your workspace…
Settings
Reading your workspace…
Settings Webhooks
Register an HTTPS endpoint and Delegate posts a signed event to it instead of making you poll. API tokens for the REST API, the SDK and the delegate CLI are on Connections.
Delegate sends a signed JSON POST to each endpoint when a run finishes, fails or is cancelled, or when it waits for a decision. Up to 5 endpoints per workspace; https only, public hosts only, redirects are not followed.
DELEGATE_ENCRYPTION_KEY is not set on this deployment, so endpoints cannot be added: the signing secret has to be stored encrypted. Generate a key with openssl rand -hex 32.
No endpoints yet.
The last 50 deliveries with their outcome. A failed attempt is retried after 1 minute, 5 minutes, 30 minutes, 2 hours and 8 hours, 6 attempts in all. There is no background queue: a retry that is due is sent on this workspace's next API request or visit to this page. Only a short, redacted excerpt of each response is kept.
Nothing delivered yet. Add an endpoint and send a test.
Each request carries Delegate-Timestamp (Unix seconds) and Delegate-Signature: v1= followed by the hex HMAC-SHA256 of the timestamp, a dot and the raw body, keyed with the endpoint's secret. Reject a delivery whose signature does not match or whose timestamp is more than five minutes from now: that is what stops a replay.
import { verifyWebhook } from "@delegate/sdk/webhooks";
const event = await verifyWebhook({
payload: rawBody, // the bytes as received, before JSON.parse
headers: request.headers,
secret: process.env.DELEGATE_WEBHOOK_SECRET,
});A dependency-free version for any runtime is in docs/guides/webhooks.md. Deliveries can arrive more than once; deduplicate on the event id.