Skip to content

An open-source, faster Devin alternative

TypeScript

docs(webhooks): reconcile to the Svix-proxy contract (review round 3)

Igor Zalutski07306b7a1987
diff --git a/docs/agent-sessions/webhooks.mdx b/docs/agent-sessions/webhooks.mdx
index 19813d93..7350ba95 100644
--- a/docs/agent-sessions/webhooks.mdx
+++ b/docs/agent-sessions/webhooks.mdx
@@ -161,6 +161,6 @@ function verify(headers, rawBody, secret) {
}
```
-<Note>These deliver a **session's** events (turns, messages, results). To react to **sandbox lifecycle** — boot, hibernate, stop, scale — see [Sandbox webhooks](/sandboxes/webhooks): verified with the same `verifyWebhook` helper. (Sandbox webhooks are always signed and use the delivery id as `webhook-id`.)</Note>
+<Note>These deliver a **session's** events (turns, messages, results). To react to **sandbox lifecycle** — boot, hibernate, stop, scale — see [Sandbox webhooks](/sandboxes/webhooks): the **same** Standard Webhooks `verifyWebhook` helper, but a different header dialect and delivery ownership. Sessions use `webhook-*` headers (where `webhook-id` is the *event id*) with the delivery-row id in `X-OC-Delivery-ID`, and signing is opt-in. Sandbox webhooks are delivered by Svix, always signed, under `svix-*` headers where `svix-id` is the delivery/dedupe id, with per-destination metadata as custom headers.</Note>
<Note>Today, delivery is over **generic webhooks**. Slack, GitHub comments, Jira, and email are coming soon — all on this same event and delivery model.</Note>
diff --git a/docs/api-reference/sandboxes/create.mdx b/docs/api-reference/sandboxes/create.mdx
index ae89b65f..42d32dd7 100644
--- a/docs/api-reference/sandboxes/create.mdx
+++ b/docs/api-reference/sandboxes/create.mdx
@@ -46,13 +46,13 @@ If both `cpuCount` and `memoryMB` are provided, they must match a platform tier.
</ParamField>
<ParamField body="webhooks" type="object[]">
- Register [webhook](/sandboxes/webhooks) destination(s) for this sandbox's lifecycle events, atomically with create — so you receive `sandbox.created` / `sandbox.ready` (which fire before a separate create call could know the id). Each is pinned to this sandbox.
+ Register [webhook](/sandboxes/webhooks) destination(s) for this sandbox's lifecycle events, pinned to this sandbox. Registering inline (rather than via a separate call) means the endpoints exist **before** `sandbox.created` / `sandbox.ready` are relayed, so you don't miss the first events.
- `url` *(string, required)*: HTTPS endpoint.
- - `secret` *(string)*: signing secret; omit and one is generated and returned once on the response (`webhooks[].secret`).
+ - `secret` *(string)*: signing secret; omit and one is generated and returned on the response (`webhooks[].secret`), also re-fetchable later.
- `eventTypes` *(string[])*: event-type allow-list (default all).
- Each spec is validated up-front (same rules as [`POST /api/webhooks`](/api-reference/webhooks/create)); an invalid `url` or `eventTypes` fails the whole create with `400` (the sandbox is not created). The response echoes `webhooks: [{ id, url, secret? }]`.
+ Each spec is validated up-front (same rules as [`POST /api/webhooks`](/api-reference/webhooks/create)): a non-HTTPS `url` or unknown `eventTypes` is rejected with `400`. Registration is otherwise **best-effort** — if a spec fails to register downstream, the sandbox is still created; inspect the echoed `webhooks: [{ id, url, secret? }]` to see what registered.
</ParamField>
<ParamField body="previewAuth" type="object">
@@ -80,5 +80,5 @@ If both `cpuCount` and `memoryMB` are provided, they must match a platform tier.
}
```
-`previewAuthToken` is only present when `previewAuth` was set in the request. `webhooks` is present only when `webhooks` were requested; each `secret` (`whsec_…`) is returned here exactly once. Read both once and store them durably — the server will not return them again.
+`previewAuthToken` is only present when `previewAuth` was set in the request — read it once and store it durably; the server will not return it again. `webhooks` is present only when `webhooks` were requested; each `secret` (`whsec_…`) is returned here and stays re-fetchable via [`GET /api/webhooks/{id}/secret`](/api-reference/webhooks/get).
</ResponseExample>
diff --git a/docs/api-reference/webhooks/create.mdx b/docs/api-reference/webhooks/create.mdx
index 34b199d2..7175587d 100644
--- a/docs/api-reference/webhooks/create.mdx
+++ b/docs/api-reference/webhooks/create.mdx
@@ -6,11 +6,11 @@ api: 'POST /api/webhooks'
Register a webhook destination for sandbox lifecycle events. See [Webhooks](/sandboxes/webhooks).
<ParamField body="url" type="string" required>
- HTTPS endpoint to deliver to. Private, loopback, link-local, and cloud-metadata addresses are refused.
+ HTTPS endpoint to deliver to. (SSRF protection is applied by the delivery provider at send time, not at registration.)
</ParamField>
<ParamField body="eventTypes" type="string[]">
- Event-type allow-list — exact (`sandbox.stopped`) or prefix (`sandbox.*`). Default: all event types.
+ Event-type allow-list — exact (`sandbox.stopped`) or prefix (`sandbox.*`). Default: all event types. Types outside the sandbox taxonomy are rejected with `400`.
</ParamField>
<ParamField body="sandboxId" type="string">
@@ -18,22 +18,20 @@ Register a webhook destination for sandbox lifecycle events. See [Webhooks](/san
</ParamField>
<ParamField body="secret" type="string">
- Signing secret. Omit and one is generated (`whsec_…`) and returned **once** in the response.
+ Signing secret. Omit and one is generated (`whsec_…`). The secret is returned in the create response and is re-fetchable any time via [`GET /api/webhooks/{id}/secret`](/api-reference/webhooks/get).
</ParamField>
<ParamField body="name" type="string">
- Optional unique name (per org). Makes create get-or-create: the same `name` with the same config returns the existing destination; a different config under that name returns `409`.
+ Optional display name for the destination.
</ParamField>
<ParamField body="enabled" type="boolean">
Whether the destination is active. Default `true`. `false` pauses delivery.
</ParamField>
-Returns **`201`** for a new destination, or **`200`** when an existing destination matched by `name` (same config) — the `200` response does **not** include a `secret`.
+Each call creates a **new** destination and returns **`201`** — there is no get-or-create and no `Idempotency-Key` support.
-**Validation (all `400`):** `url` must be HTTPS and pass SSRF checks (private/loopback/link-local/cloud-metadata addresses are refused); each `eventTypes` entry must be a known type or a `prefix.*` wildcard; `sandboxId` must belong to your org.
-
-**Idempotency.** Pass an **`Idempotency-Key`** header to make a retry safe — a repeat returns the same destination (and the same one-time `secret`) instead of creating a duplicate. The same key with a *different* body returns `409`. If a same-key request is still in flight, you get `409` with `{"code":"idempotency_in_progress"}` and a `Retry-After` header — retryable; just retry after the delay (the SDK does this automatically).
+**Validation (all `400`):** `url` must be HTTPS; each `eventTypes` entry must be a known sandbox event type or a `prefix.*` wildcard.
<ResponseExample>
```json 201
@@ -51,5 +49,5 @@ Returns **`201`** for a new destination, or **`200`** when an existing destinati
}
```
-`secret` is present **only** when OpenComputer generated it (you passed none). Read it once and store it — it is never returned again.
+The `secret` is returned here and stays re-fetchable via [`GET /api/webhooks/{id}/secret`](/api-reference/webhooks/get) — store it to verify deliveries.
</ResponseExample>
diff --git a/docs/api-reference/webhooks/delete.mdx b/docs/api-reference/webhooks/delete.mdx
index 7a252a75..2f23c794 100644
--- a/docs/api-reference/webhooks/delete.mdx
+++ b/docs/api-reference/webhooks/delete.mdx
@@ -3,7 +3,7 @@ title: 'Delete Webhook'
api: 'DELETE /api/webhooks/{id}'
---
-Soft-delete a destination. It stops receiving events and drops out of [list](/api-reference/webhooks/list), but its delivery history is retained and still queryable via [deliveries](/api-reference/webhooks/deliveries-list). Any non-terminal deliveries (`pending`, `delivering`, `failed`) are moved to `canceled`; terminal ones (`delivered`, `dead_letter`) are left as-is. See [Webhooks](/sandboxes/webhooks).
+Delete a destination. It stops receiving events, drops out of [list](/api-reference/webhooks/list), and its delivery-provider endpoint is removed. Delivery history for a deleted destination is no longer queryable. See [Webhooks](/sandboxes/webhooks).
<ParamField path="id" type="string" required>
Destination ID (`whk_…`).
diff --git a/docs/api-reference/webhooks/deliveries-list.mdx b/docs/api-reference/webhooks/deliveries-list.mdx
index f37c9743..e9089a22 100644
--- a/docs/api-reference/webhooks/deliveries-list.mdx
+++ b/docs/api-reference/webhooks/deliveries-list.mdx
@@ -3,46 +3,41 @@ title: 'List Deliveries'
api: 'GET /api/webhooks/{id}/deliveries'
---
-List a destination's deliveries, cursor-paginated. Works for soft-deleted destinations too — delivery history is retained. See [Webhooks](/sandboxes/webhooks#deliveries).
+List a destination's most recent delivery attempts (up to 50). Each entry is a delivery-provider
+attempt record. The attempt index lags actual delivery by a few seconds. See [Webhooks](/sandboxes/webhooks#deliveries).
<ParamField path="id" type="string" required>
Destination ID (`whk_…`).
</ParamField>
-<ParamField query="status" type="string">
- Filter by status: `pending`, `delivering`, `delivered`, `failed`, `dead_letter`, or `canceled`.
-</ParamField>
+<ResponseField name="data[].id" type="string">
+ The message id — the key for [get](/api-reference/webhooks/delivery-get) / [redeliver](/api-reference/webhooks/redeliver); equals the `svix-id` header on the delivery.
+</ResponseField>
-<ParamField query="cursor" type="string">
- Opaque pagination cursor from a previous response's `nextCursor`.
-</ParamField>
+<ResponseField name="data[].attemptId" type="string">
+ The id of this specific attempt.
+</ResponseField>
-<ParamField query="limit" type="integer">
- Page size (default 50).
-</ParamField>
+<ResponseField name="data[].status" type="string">
+ One of `success`, `pending`, or `failed`.
+</ResponseField>
+
+<ResponseField name="data[].responseStatusCode" type="integer">
+ The consumer's HTTP response code, when the attempt reached it.
+</ResponseField>
<ResponseExample>
```json 200
{
"data": [
{
- "id": "whd_8c1d",
- "destination": "whk_3f9a2c",
- "eventId": "sb-3f9a…:3:142",
- "eventType": "sandbox.stopped",
- "status": "delivered",
- "attempts": 1,
- "retryCount": 0,
- "lastAttemptAt": "2026-06-24T12:00:01Z",
- "responseCode": 200,
- "error": null,
- "createdAt": "2026-06-24T12:00:00Z",
- "updatedAt": "2026-06-24T12:00:01Z",
- "deliveredAt": "2026-06-24T12:00:01Z"
+ "id": "msg_2aB…",
+ "attemptId": "atmpt_9fE…",
+ "status": "success",
+ "responseStatusCode": 200,
+ "timestamp": "2026-06-24T12:00:01Z"
}
- ],
- "nextCursor": null,
- "hasMore": false
+ ]
}
```
</ResponseExample>
diff --git a/docs/api-reference/webhooks/delivery-get.mdx b/docs/api-reference/webhooks/delivery-get.mdx
index f24a66d9..f395d01f 100644
--- a/docs/api-reference/webhooks/delivery-get.mdx
+++ b/docs/api-reference/webhooks/delivery-get.mdx
@@ -3,32 +3,29 @@ title: 'Get Delivery'
api: 'GET /api/webhooks/{id}/deliveries/{deliveryId}'
---
-Fetch one delivery in detail. See [Webhooks](/sandboxes/webhooks#deliveries).
+Fetch one delivered message by id. See [Webhooks](/sandboxes/webhooks#deliveries).
<ParamField path="id" type="string" required>
Destination ID (`whk_…`).
</ParamField>
<ParamField path="deliveryId" type="string" required>
- Delivery ID (`whd_…`).
+ Message id (`msg_…`, the `id` from [list deliveries](/api-reference/webhooks/deliveries-list); equals the `svix-id` header).
</ParamField>
<ResponseExample>
```json 200
{
- "id": "whd_8c1d",
- "destination": "whk_3f9a2c",
- "eventId": "sb-3f9a…:3:142",
+ "id": "msg_2aB…",
"eventType": "sandbox.stopped",
- "status": "delivered",
- "attempts": 1,
- "retryCount": 0,
- "lastAttemptAt": "2026-06-24T12:00:01Z",
- "responseCode": 200,
- "error": null,
- "createdAt": "2026-06-24T12:00:00Z",
- "updatedAt": "2026-06-24T12:00:01Z",
- "deliveredAt": "2026-06-24T12:00:01Z"
+ "eventId": "sb-3f9a…:sandbox.stopped",
+ "payload": {
+ "type": "sandbox.stopped",
+ "sandboxId": "sb-3f9a…",
+ "eventId": "sb-3f9a…:sandbox.stopped",
+ "event": { "id": "sb-3f9a…:sandbox.stopped", "ts": "2026-06-24T12:00:00Z", "orgId": "org_…", "sandboxId": "sb-3f9a…", "type": "sandbox.stopped", "data": { "reason": "user_requested" } }
+ },
+ "timestamp": "2026-06-24T12:00:00Z"
}
```
</ResponseExample>
diff --git a/docs/api-reference/webhooks/get.mdx b/docs/api-reference/webhooks/get.mdx
index baeb9118..a28da2bf 100644
--- a/docs/api-reference/webhooks/get.mdx
+++ b/docs/api-reference/webhooks/get.mdx
@@ -3,7 +3,7 @@ title: 'Get Webhook'
api: 'GET /api/webhooks/{id}'
---
-Fetch one webhook destination. The signing secret is never returned — only `hasSecret`. See [Webhooks](/sandboxes/webhooks).
+Fetch one webhook destination. The response carries `hasSecret` (not the secret itself); fetch the secret value any time via `GET /api/webhooks/{id}/secret` → `{ "secret": "whsec_…" }`. See [Webhooks](/sandboxes/webhooks).
<ParamField path="id" type="string" required>
Destination ID (`whk_…`).
diff --git a/docs/api-reference/webhooks/list.mdx b/docs/api-reference/webhooks/list.mdx
index 901c731f..36bda433 100644
--- a/docs/api-reference/webhooks/list.mdx
+++ b/docs/api-reference/webhooks/list.mdx
@@ -3,7 +3,7 @@ title: 'List Webhooks'
api: 'GET /api/webhooks'
---
-List the org's webhook destinations. Soft-deleted destinations are excluded. See [Webhooks](/sandboxes/webhooks).
+List the org's webhook destinations. Deleted destinations are excluded. See [Webhooks](/sandboxes/webhooks).
<ResponseExample>
```json 200
diff --git a/docs/api-reference/webhooks/redeliver.mdx b/docs/api-reference/webhooks/redeliver.mdx
index de586dd7..b1d4eb1e 100644
--- a/docs/api-reference/webhooks/redeliver.mdx
+++ b/docs/api-reference/webhooks/redeliver.mdx
@@ -3,34 +3,22 @@ title: 'Redeliver'
api: 'POST /api/webhooks/{id}/deliveries/{deliveryId}/redeliver'
---
-Re-send any delivery (not only dead-lettered). Re-enqueues it with a fresh retry budget; the redelivery carries the **same** `webhook-id`, so a receiver that dedupes treats it as the same message. Use it when the original never landed. See [Webhooks](/sandboxes/webhooks#deliveries).
+Re-send a message to the endpoint. The redelivery carries the **same** `svix-id`, so a receiver that dedupes treats it as the same message. Use it when the original never landed. See [Webhooks](/sandboxes/webhooks#deliveries).
<ParamField path="id" type="string" required>
Destination ID (`whk_…`).
</ParamField>
<ParamField path="deliveryId" type="string" required>
- Delivery ID (`whd_…`).
+ Message id (`msg_…`, from [list deliveries](/api-reference/webhooks/deliveries-list)).
</ParamField>
<ResponseExample>
-```json 202
+```json 200
{
- "id": "whd_8c1d",
- "destination": "whk_3f9a2c",
- "eventId": "sb-3f9a…:3:142",
- "eventType": "sandbox.stopped",
- "status": "pending",
- "attempts": 2,
- "retryCount": 0,
- "lastAttemptAt": "2026-06-24T12:00:01Z",
- "responseCode": null,
- "error": null,
- "createdAt": "2026-06-24T12:00:00Z",
- "updatedAt": "2026-06-24T12:10:00Z",
- "deliveredAt": null
+ "ok": true
}
```
</ResponseExample>
-Returns the re-enqueued delivery — `status: "pending"`, `retryCount` reset, lifetime `attempts` preserved.
+The new attempt appears under [deliveries](/api-reference/webhooks/deliveries-list).
diff --git a/docs/api-reference/webhooks/test.mdx b/docs/api-reference/webhooks/test.mdx
index 56d4cc93..03ee4eb1 100644
--- a/docs/api-reference/webhooks/test.mdx
+++ b/docs/api-reference/webhooks/test.mdx
@@ -3,7 +3,11 @@ title: 'Test Webhook'
api: 'POST /api/webhooks/{id}/test'
---
-Send a synthetic `sandbox.test` event to the destination and return the result inline. It bypasses the `eventTypes` filter, is signed like a real delivery, is not retried, and does not appear in delivery history. See [Webhooks](/sandboxes/webhooks).
+Enqueue a sample event to the destination to exercise the endpoint. It sends a real, signed
+message of a concrete type the destination is subscribed to (the first of its `eventTypes`,
+defaulting to `sandbox.created`), so it respects the destination's filters. Delivery is
+**asynchronous** — this returns once the message is accepted; check
+[deliveries](/api-reference/webhooks/deliveries-list) for the outcome. See [Webhooks](/sandboxes/webhooks).
<ParamField path="id" type="string" required>
Destination ID (`whk_…`).
@@ -12,10 +16,11 @@ Send a synthetic `sandbox.test` event to the destination and return the result i
<ResponseExample>
```json 200
{
- "delivered": true,
- "responseCode": 200
+ "ok": true,
+ "eventType": "sandbox.created",
+ "messageId": "msg_2aB…"
}
```
</ResponseExample>
-`delivered` is `false` with an `error` string when the endpoint didn't return `2xx`.
+`messageId` is the delivery's message id — find its attempt under [deliveries](/api-reference/webhooks/deliveries-list).
diff --git a/docs/api-reference/webhooks/update.mdx b/docs/api-reference/webhooks/update.mdx
index b1662246..250bc1d6 100644
--- a/docs/api-reference/webhooks/update.mdx
+++ b/docs/api-reference/webhooks/update.mdx
@@ -10,30 +10,26 @@ Update a destination — pause/resume, retune filters, change the URL, or rotate
</ParamField>
<ParamField body="url" type="string">
- New HTTPS endpoint (re-validated against the SSRF rules).
+ New HTTPS endpoint.
</ParamField>
<ParamField body="eventTypes" type="string[]">
- Replace the event-type allow-list. Pass `null` to clear it (deliver all types).
+ Replace the event-type allow-list (unknown types are rejected with `400`). Pass `null` to clear it (deliver all types).
</ParamField>
<ParamField body="enabled" type="boolean">
Pause (`false`) or resume (`true`) delivery. Pausing does **not** drop events — events that occur while paused are queued and delivered when you re-enable.
</ParamField>
-<ParamField body="secret" type="string">
- Set a caller-supplied signing secret (you keep it; it isn't echoed back).
-</ParamField>
-
<ParamField body="rotateSecret" type="boolean">
- Generate a **new** signing secret. The new `whsec_…` is returned **once** in the response (like create). Use this instead of `secret` when you want OpenComputer to mint the secret.
+ Rotate to a **new** generated signing secret, returned as `secret` in the response. The previous secret stays valid for a short rollover window so in-flight deliveries still verify. (To set a specific secret, create a new destination.)
</ParamField>
<ParamField body="name" type="string">
Rename the destination.
</ParamField>
-`sandboxId` (scope) is **immutable** — set it at create; it can't be changed here.
+`sandboxId` (scope) is **immutable** — set it at create; it can't be changed here. The current signing secret is re-fetchable any time via [`GET /api/webhooks/{id}/secret`](/api-reference/webhooks/get).
<ResponseExample>
```json 200
diff --git a/docs/sandboxes/webhooks.mdx b/docs/sandboxes/webhooks.mdx
index 5639ea22..8ceec981 100644
--- a/docs/sandboxes/webhooks.mdx
+++ b/docs/sandboxes/webhooks.mdx
@@ -57,9 +57,9 @@ const webhooks = new Webhooks({ apiKey: process.env.OPENCOMPUTER_API_KEY! });
const { id, secret } = await webhooks.create({
url: "https://app.example.com/oc-webhook",
eventTypes: ["sandbox.stopped", "sandbox.ready"],
- name: "prod", // optional; makes create idempotent
+ name: "prod", // optional display name
});
-// `secret` (whsec_…) is returned ONCE — store it now; you need it to verify deliveries.
+// `secret` (whsec_…) verifies deliveries — returned here and re-fetchable via webhooks.getSecret(id).
```
```http REST API
@@ -76,7 +76,7 @@ Content-Type: application/json
</CodeGroup>
-Every destination is **signed**. If you don't pass a `secret`, OpenComputer generates one (`whsec_…`) and returns it **once** on create — store it then; it's never shown again.
+Every destination is **signed**. If you don't pass a `secret`, OpenComputer generates one (`whsec_…`) and returns it on create. The secret is re-fetchable any time via `webhooks.getSecret(id)` (`GET /api/webhooks/:id/secret`), and rotatable via `webhooks.update(id, { rotateSecret: true })`.
<Tabs>
@@ -84,12 +84,13 @@ Every destination is **signed**. If you don't pass a `secret`, OpenComputer gene
| Call | Purpose |
| --- | --- |
-| `webhooks.create(params)` | Register a destination (returns `secret` once if generated). |
+| `webhooks.create(params)` | Register a new destination (returns the `secret`). |
| `webhooks.list()` | List destinations. |
-| `webhooks.get(id)` | Fetch one (`hasSecret`, never the secret). |
-| `webhooks.update(id, params)` | Pause/resume (`enabled`), retune `eventTypes`, change `url`, rotate `secret`. |
-| `webhooks.delete(id)` | Soft-delete — history is retained, pending deliveries canceled. |
-| `webhooks.test(id)` | Send a synthetic `sandbox.test` event and return the result inline. |
+| `webhooks.get(id)` | Fetch one (`hasSecret`, not the secret value). |
+| `webhooks.getSecret(id)` | Fetch the current signing secret (`whsec_…`). |
+| `webhooks.update(id, params)` | Pause/resume (`enabled`), retune `eventTypes`, change `url`, or `rotateSecret`. |
+| `webhooks.delete(id)` | Delete — removes the endpoint; deleted history isn't queryable. |
+| `webhooks.test(id)` | Enqueue a sample event (delivered asynchronously). |
</Tab>
@@ -97,12 +98,13 @@ Every destination is **signed**. If you don't pass a `secret`, OpenComputer gene
| Method · Path | Purpose |
| --- | --- |
-| `POST /api/webhooks` | Register a destination. |
+| `POST /api/webhooks` | Register a new destination. |
| `GET /api/webhooks` | List destinations. |
| `GET /api/webhooks/:id` | Fetch one. |
-| `PATCH /api/webhooks/:id` | Pause/resume, retune `eventTypes`, change `url`, rotate `secret`. |
-| `DELETE /api/webhooks/:id` | Soft-delete (history retained). |
-| `POST /api/webhooks/:id/test` | Send a synthetic `sandbox.test` event. |
+| `GET /api/webhooks/:id/secret` | Fetch the current signing secret. |
+| `PATCH /api/webhooks/:id` | Pause/resume, retune `eventTypes`, change `url`, or `rotateSecret`. |
+| `DELETE /api/webhooks/:id` | Delete (history not queryable afterward). |
+| `POST /api/webhooks/:id/test` | Enqueue a sample event (delivered asynchronously). |
</Tab>
@@ -143,9 +145,9 @@ Every send and its outcome — the data behind a deliveries dashboard.
| Call | Purpose |
| --- | --- |
-| `webhooks.deliveries.list(id, opts)` | List a destination's deliveries (cursor-paginated). |
-| `webhooks.deliveries.get(id, deliveryId)` | One delivery, in detail. |
-| `webhooks.deliveries.redeliver(id, deliveryId)` | Re-send any delivery (not only dead-lettered). |
+| `webhooks.deliveries.list(id)` | List recent delivery attempts (up to 50). |
+| `webhooks.deliveries.get(id, messageId)` | One delivered message, in detail. |
+| `webhooks.deliveries.redeliver(id, messageId)` | Re-send a message (same `svix-id`). |
</Tab>
@@ -153,15 +155,15 @@ Every send and its outcome — the data behind a deliveries dashboard.
| Method · Path | Purpose |
| --- | --- |
-| `GET /api/webhooks/:id/deliveries?status=&cursor=&limit=` | List deliveries (paginated). |
-| `GET /api/webhooks/:id/deliveries/:deliveryId` | One delivery, in detail. |
-| `POST /api/webhooks/:id/deliveries/:deliveryId/redeliver` | Re-send any delivery. |
+| `GET /api/webhooks/:id/deliveries` | List recent attempts (up to 50). |
+| `GET /api/webhooks/:id/deliveries/:messageId` | One delivered message, in detail. |
+| `POST /api/webhooks/:id/deliveries/:messageId/redeliver` | Re-send a message. |
</Tab>
</Tabs>
-Each record is a Svix delivery attempt with its `status` and the consumer's `responseStatusCode`; Svix retries failed attempts on its managed schedule and keeps the full attempt history.
+Each record is a Svix delivery attempt with its `status` and the consumer's `responseStatusCode`; Svix retries failed attempts on its managed schedule and retains recent attempt history (the attempt index lags a send by a few seconds). A deleted destination's history is no longer queryable.
```
Delivery = { id, status: "success" | "pending" | "failed", responseStatusCode?, timestamp }
@@ -173,7 +175,7 @@ Redelivery re-sends the **same** message to the endpoint (same `svix-id`) — fo
- **HTTPS only**, checked at registration. The delivery layer (Svix) additionally blocks private, loopback, link-local, and cloud-metadata addresses at send time.
- **Always signed** with [Standard Webhooks](https://www.standardwebhooks.com) (delivery is by [Svix](https://www.svix.com)). Every request carries `svix-id`, `svix-timestamp`, and `svix-signature` = `v1,<base64(HMAC-SHA256(secret, "{svix-id}.{svix-timestamp}.{rawBody}"))>`. Verify against the **raw request body, before parsing it**; the timestamp guards replay. Any custom headers you attached as destination `metadata` ride along too. Your `secret` is write-only.
-- **At-least-once.** Once an event is handed off it's retried until it succeeds or the delivery layer gives up. A duplicate can still arrive, so **dedupe on `svix-id`** (= `deliveryId`).
+- **At-least-once.** Once an event is handed off it's retried until it succeeds or the delivery layer gives up. A duplicate can still arrive, so **dedupe on `svix-id`** (the verifier exposes it as both `deliveryId` and `dedupeId`).
- **Not strictly ordered.** Events for one sandbox can arrive out of order (e.g. `sandbox.ready` before `sandbox.created`). Treat each event independently and key off `event.type`; don't assume an ordering.
- **Success / retry / give-up.** A delivery succeeds on HTTP `2xx`. Failures are retried on Svix's managed backoff (immediately, then 5s, 5m, 30m, 2h, 5h, 10h, 10h); an endpoint that keeps failing for ~5 days is auto-disabled. Inspect attempts and recover failed messages via the [deliveries API](#deliveries). Unsafe targets (private / loopback / cloud-metadata addresses) are blocked by the delivery layer.