[go: up one dir, main page]

Skip to content

Web Hooks: support idempotency keys

Proposal

Support idempotency keys for all web-hook requests, allowing clients to detect re-tries.

Rationale

This would allow automatic retries and bulk retries safely, with receivers being able to detect events they have already processed.

Implementation

The simplest way would be:

  • in WebHookService, generate a fresh UUID for each invocation, unless one is passed in.
  • Send the UUID in a header idempotency-key: uuid
  • Store the UUID in the WebHookLog record from which retries will be generated

If we retry, we pass the data packet as well as the stored idempotency key UUID back to the WebHookService on invocation.

Edited by Luke Duncalfe