DocuDetectDocs

Delivery and retries

What a delivery looks like on the wire, when it is retried, and when an endpoint is turned off.

Early access

The REST API, webhooks and embedded signing are open to accounts in early access. If Settings, Developers is not in your account yet, write to contact@docudetect.com. What these pages describe can still change; breaking changes are announced on this site first.

Each event is a POST of the payload to your endpoint with these headers:

HeaderCarries
Content-Typeapplication/json
User-AgentDocuDetect-Webhooks/1 (+https://docudetect.com/settings?section=developers&tab=reference)
DocuDetect-Signaturet=<unix seconds>,v1=<hex HMAC-SHA256>. Two v1 values while an old secret still signs after a rotation.
DocuDetect-Event-IdThe event id (evt_…), the same on every retry. Use it to drop duplicates.
DocuDetect-Event-TypeThe event type, for example document.completed.
DocuDetect-Delivery-IdThis delivery. Sending it again by hand makes a new one.
DocuDetect-Delivery-AttemptThe attempt number, from 1.

What counts as delivered

A 2xx answer. Everything else is a failed attempt: another status, a redirect (redirects are not followed), no connection within 5 seconds, or no complete answer within 10 seconds. The delivery log keeps the status, the time taken and the start of your answer.

Retries

A failed delivery is tried again on this schedule, 8 attempts in all:

AttemptWaits after the one beforeTime since the first attempt
1none0
21 minuteabout 1 minute
35 minutesabout 6 minutes
415 minutesabout 21 minutes
51 hourabout 81 minutes
63 hoursabout 261 minutes
76 hoursabout 621 minutes
812 hoursabout 1341 minutes
Each wait varies by up to 20% either way.

A 429 or 503 with a Retry-After longer than the next wait is honored, up to 12 hours. The body stays byte for byte the same on every attempt; the signature is made afresh for each.

Why an attempt failed

ErrorThe delivery log says
blocked_addressThis address can't receive webhooks (it isn't a public internet address)
dnsThe host name could not be found
connectCould not connect
tlsSecure connection failed
timeoutNo answer in time
redirectAnswered with a redirect (redirects aren't followed)
http_statusAnswered with an error
secret_unreadableWe can't read this webhook's signing secret. Make a new one

Turned off automatically

An endpoint is turned off, and the account owner is emailed, when:

  • it answers 410 Gone, or
  • it has failed 20 times in a row over at least 72 hours, or
  • the API key that made it is revoked or expires.

While an endpoint is off, its events are held for 72 hours and sent when you turn it back on. Nothing is delivered while the account's email is unverified or the account is suspended; those events are dropped, not held.

The log

Settings, Developers, Webhooks shows each endpoint's deliveries for 30 days. Send again delivers any of them now, with the same event id. Send test event sends a document.sent with made-up ids and "test": true.