Async hooks is in beta. Enable it per-project in Project Settings.
Delivery Flow
When async hooks are enabled, each delivery includes two extra headers:Posthook-Ack-URL and Posthook-Nack-URL.
- Your endpoint receives the delivery and returns 202 Accepted.
- Your code processes the work.
- You call back with the result.
Receiving Async Deliveries
Return 202 immediately, then process in the background and callack() or nack() when done.
Make sure async hooks is enabled in Project Settings. Without the callback headers, long-running work will hit the standard 10-second delivery timeout.
Passing Work to a Queue
If processing happens in a separate worker or service, pass the raw callback URLs through your queue and call them from the worker.Timeouts
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 aPosthook-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.Callback Responses
When you POST to an ack or nack URL, Posthook returns a status code indicating what happened.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.
SDK behavior
The SDKack() and nack() helpers handle these responses for you:
- 200, 404, 409 resolve without throwing.
200includes anappliedflag indicating whether state actually changed. - 401 and 410 raise a callback error.
Nack bodies
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.Retries
Async failures — bothnack 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.
Monitoring
The hook detail page in the dashboard shows async-specific state:- Awaiting Ack status while a callback is pending
- Ack deadline for the current attempt
- Outcome per attempt: ack, nack, or timeout
- Elapsed time between delivery and callback
- Captured nack body (up to 8 KB)