Browse documentation

Deliveries

What this is for

Deliveries is the outbound delivery log — every webhook/integration delivery attempt, its status, retries, and response. It is primarily a diagnostic, read-mostly page: use it to confirm an event left Spine, to debug a failing endpoint, and to see retry behavior.

Why it exists

Webhooks are unreliable by nature — arrivals get lost, retries duplicate, senders time out. Without a ledger, "did the delivery happen?" is a guess.

Why it exists (5-whys):

  1. Async external I/O needs durability — arrivals get lost and retries duplicate; the crossing of the trust boundary must be recorded.
  2. direction + status lifecycle (pending → processing → delivered/failed/cancelled) covers both inbound receipt and outbound send — same reliability problem, one ledger.
  3. attempt_count/max_attempts/next_attempt_at put retry state on the row, not in-process memory — deliveries.ts redrives failed sends after restarts (manual retry for outbound is permission-checked).
  4. external_id + payload + response_* provide idempotency and forensics — dedupe redeliveries, reconstruct what happened without guessing.
  5. Root: async external I/O needs a ledger like pipelines need executions — webhook_deliveries makes every crossing of the trust boundary durable, retryable, and inspectable. (confirmed 2026-11-13)

Fields and settings

  • Direction — inbound (external webhook into Spine) or outbound (Spine calling an integration).
  • Status — pending, processing, delivered, or failed. Pending rows with a future next_attempt_at are scheduled retries.
  • Integration — the integration_id the delivery ran through.
  • Handler / Action — handler_name (inbound webhook handler) or action_slug that produced it.
  • Attempts — attempt_count / max_attempts. max_attempts defaults to 3, overridable per call (action_config.max_attempts) or per integration (config.retry_policy.max_attempts).
  • Next Attempt / Created — scheduled retry time and queue time. response_status and last_error on the row capture the last attempt's result.

Downstream effects

  • A failed row means the endpoint rejected or timed out and attempt_count reached max_attempts — fix the endpoint or credentials, then retry via the API (deliveries?action=retry, outbound only; system principals may retry any account's delivery, others only their own) or re-fire the event.
  • Retries reuse the same row: attempt_count increments and next_attempt_at follows exponential backoff (30s × 2^attempt, capped at 1h, +20% jitter). system-cron sweeps due pending rows each tick.
  • Deliveries are produced by integration-outbound (outbound) and integration-routes (inbound) — an empty list with active webhooks usually means no events matched, not a broken delivery layer.
  • Rows are append-only diagnostics; there is nothing to create or edit on this page.

Minimal configuration

N/A — deliveries are generated by outbound calls, not authored. To produce one: create an integration-routes/webhook integration (or a trigger with an outbound stage), then emit its event.

Full configuration

N/A — see integrations for endpoint/credential configuration, triggers/pipelines for what fires deliveries.

Example

A support app's customer-webhooks integration posts every ticket.closed event to the customer's endpoint; a failed delivery with response 401 points at an expired token — rotate it in the integration's credentials, not here.

Core files

  • .framework/functions/deliveries.ts — API (list/get/action=retry)
  • .framework/functions/integration-outbound.ts — outbound broker that writes delivery rows
  • .framework/functions/integration-routes.ts — inbound webhook path that writes inbound rows
  • .framework/functions/_shared/retry-deliveries.ts — scheduled sweep of due pending rows
  • .framework/src/pages/admin/DeliveriesPage.tsx — admin UI
  • Table: public.webhook_deliveries

Agent notes

  • Debug order: delivery row → integration config/credentials → the event producer (trigger/pipeline). The delivery row is the symptom, not the cause.
  • Repeated failures across one endpoint usually mean credentials or URL drift; failures across many endpoints point at the outbound broker or networking.
  • Delivery volume doubles as an activity signal for integrations — a silent integration shows up here first.

Framework documentation — Verified November 16, 2026 · source revision 9f90999.

Was this page helpful? Ask a question · Report a documentation problem