Handle long-running webhook processing with ack/nack callbacks
Async hooks let your endpoint return HTTP 202 to acknowledge receipt, then call back to Posthook when processing completes. This removes the 10-second delivery timeout for long-running tasks like video processing, report generation, or third-party API calls.
Async hooks is in beta. Enable it per-project in Project Settings.
Make sure async hooks is enabled in Project Settings. Without the callback headers, long-running work will hit the standard 10-second delivery timeout.
Developing locally? Async hooks work with the CLI in forward mode — the callback headers are forwarded automatically.
If neither ack nor nack is received before the deadline, the attempt is treated as a failure and follows your retry settings.The default timeout is 300 seconds (5 minutes). Override it per delivery by setting a Posthook-Async-Timeout header on your 202 response:
Posthook-Async-Timeout is a response header that you set. This is the opposite direction from the other Posthook-* headers, which Posthook sends to you.
When you POST to an ack or nack URL, Posthook returns a status code indicating what happened.
Status
Meaning
Action
200
Callback accepted, or hook already resolved for this attempt
None
401
Invalid callback token
Check configuration
404
Hook was deleted
None
409
Hook already moved to a newer attempt
None
410
Callback expired (token or deadline elapsed)
None — treat as terminal
200 can mean your callback was applied, or the attempt was already resolved moments earlier (e.g., timeout won the race). Both are terminal for that callback.409 means the hook has already advanced to a newer retry attempt — your callback URL belongs to an older attempt. No action needed; Posthook is handling the newer attempt.410 means the callback URL can no longer affect hook state. The token expired or the async deadline elapsed. Treat it as terminal.
Ack request bodies are ignored. Nack request bodies are captured for diagnostics (up to 8 KB). Include structured JSON if you want failure details visible in the dashboard.
Async failures — both nack and timeout — use the same retry logic as synchronous failures. A nack or timeout increments the attempt counter and applies your project’s retry policy (or the hook’s retryOverride). If the hook has exhausted all retries, it is marked as failed.There’s nothing new to configure. If your project retries 5 times with exponential backoff, that same policy applies whether the failure came from an HTTP 500, a nack, or a timeout.
Async hooks still follow at-least-once delivery. Keep your handlers idempotent.