# Delivery and reconciliation

## How a delivery is attempted

- HTTPS only. The hostname must resolve to a public address, checked at send time. No redirects are followed. The timeout is 10 seconds.
- A `2xx` is delivered. Anything else is retried at +1 min, +5 min, +30 min, +2 h and +8 h.
- After three days of continuous failure the subscription is set `active: false`, and a `webhook.disabled` event goes to your *other* subscriptions.
- If you have no other subscription, `GET /v1/me` reports `webhooks.disabled`. With no subscription left to notify, it is the only channel, so check it.

The last 100 deliveries per subscription are kept for 30 days. Read them with `GET /v1/webhooks/{id}/deliveries`, and replay one with `POST /v1/webhooks/{id}/deliveries/{deliveryId}/redeliver`.

## Inbound is best-effort

> Inbound is best-effort and at-most-once. The change feed this API listens to makes one attempt per event and never retries, and its queue is not crash-safe. A dropped event is not detectable from either side.

Read that again before you design around it. It means webhooks are a latency optimisation, not a source of truth.

## Reconcile on a timer

Keep a high-water mark and sweep with `updated_since`.

```bash
curl -s "https://api.inittasks.com/v1/todos?updated_since=2026-09-15T17:00:00Z" \
  -H "Authorization: Bearer $INITTASKS_TOKEN"
```

Poll every few minutes and treat webhooks as the thing that usually makes the poll find nothing. Any integration that assumes every event arrives will be quietly wrong sooner or later, and quietly is the hard part.

Advance the mark only after the sweep has been processed. Advancing it first loses everything in the window if your handler dies.

See [pagination and filtering](/pagination) for walking the pages a sweep returns.

## Handling duplicates

A retry can deliver an event you already processed. Key on the event `id` from `X-InitTasks-Event-Id` and skip one you have seen.

Your reconciliation sweep will also re-deliver work the webhook already did. Make the handler idempotent and both problems go away at once.

## Next

- [Rate limits](/rate-limits) for how often to sweep.
- [Reference for /webhooks](/reference/webhooks)
