Skip to content
Agentpost robot in sunglasses on a red circleAgentpost

Deliveries

A delivery is a record of sending one event to one endpoint as a webhook. Each match of a subscription with a webhook target makes one. EventWolf keeps each attempt for as long as delivery retention allows and retries failed attempts on a schedule. The delivery ends on success, when retries run out, or for one of the other reasons below. A push to a principal’s phone is a delivery of kind push, which Push covers.

Endpoints

An endpoint is a URL that receives deliveries, with signing secrets and optional static headers, such as a receiver’s own auth. EventWolf stores both encrypted, and its answers never hold the headers, only hasHeaders. It shows a signing secret only in the answer that creates or rotates it.

Its URL is https on a public address. EventWolf checks the URL and any IP address in it when you save the endpoint. Before each send it also checks the addresses a hostname resolves to. It refuses private, loopback, link-local, and reserved addresses.

Each attempt

An attempt is a POST of the event as JSON, application/cloudevents+json, with sequence added, and these headers:

Header Holds
webhook-id The delivery’s ID, the same on every attempt and retry, so a receiver can tell a repeat.
webhook-timestamp When the attempt was sent, in seconds since 1970.
webhook-signature v1, and the signature, once for each of the endpoint’s live secrets, separated by spaces.
x-eventwolf-subscription The subscription that matched. An endpoint’s test ping has none.
x-eventwolf-attempt The attempt’s number, from 1.
x-eventwolf-trigger automatic for live matching, manual for an explicit retry or a test, recover for endpoint recovery, or replay for a replay. A scheduled retry keeps the current value.

EventWolf signs deliveries using Standard Webhooks. Remove whsec_ and base64-decode the rest of the signing secret to get the HMAC key. EventWolf computes HMAC-SHA256 over <webhook-id>.<webhook-timestamp>.<raw body> and sends each digest as v1,<base64> in webhook-signature. Receive webhooks shows how to verify it.

An answer of 2xx within the config’s delivery.timeout succeeds. Other statuses fail, including a 3xx redirect. If no answer arrives, the attempt records an error such as dns, connection, tls, or timeout. The attempt keeps EventWolf’s request headers except for the signature, and the receiver’s status, headers other than set-cookie, and the first 2,048 bytes of its body. Response header values over 1,024 characters are cut to that length with an ellipsis.

Retries

The config’s delivery.retrySchedule sets the wait before each scheduled retry, as a duration such as "5m". Agentpost starts projects with waits of 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, and 10 hours after each failure. That allows 8 attempts within 28 hours. When EventWolf schedules a retry after a 429 or 503, it uses the longer of the configured delay and a valid Retry-After, which it caps at one day.

You can send a delivery again yourself. A retry queues it now with the same webhook-id. Recovering an endpoint queues the deliveries created since a time that failed or were skipped because the endpoint was disabled.

Statuses

Status Means
pending Waiting for its first attempt, or for its next retry after one failed. attempts says how many were made.
succeeded An attempt was answered 2xx.
failed It ran out of retries, its event aged out, or the receiver answered 410.
skipped Its endpoint was disabled, or the event is about the endpoint itself.
canceled You canceled it before its next attempt.

A delivery that ran out of retries publishes tools.agentpost.events.delivery.exhausted, with kind, webhook or push, which a subscription to another endpoint can act on.

Disabled endpoints

A disabled endpoint’s new deliveries are skipped. EventWolf disables an endpoint after a 410 Gone or when a failed attempt takes it past the config’s delivery.disableAfterFailing without a success. Agentpost starts projects at "5d". Either automatic disable emits tools.agentpost.events.endpoint.disabled. Enable the endpoint once it works. Set the required since to the creation time of the earliest delivery you want to recover, then call Recover failed deliveries.

Limits

  • An attempt times out after the config’s delivery.timeout, from "1s" to "60s". Agentpost starts projects at "15s".
  • The retry schedule has at most 19 retries, so at most 20 attempts.
  • An endpoint has at most 20 static headers, none of them one EventWolf sets.
  • Deliveries and their attempts are kept for the config’s retention.deliveries, measured from when the delivery finished. Agentpost starts projects at 90 days.

Where to act on it