Idempotency

Making idempotent requests

The Recall API supports idempotency for all requests with the following methods:

  • PUT
  • POST
  • PATCH

This allows you to retry requests that fail due to networking issues without fear of the the action happening multiple times.

Making an idempotent request

To make an idempotent request, start by generate a idempotency key.

That key will be used in combination with your user, and the path to identify the request. Pass this key in the Idempotency-Key header in your request.

The behavior is as follows:

  • If the request is the first request, the endpoint action will be performed as expected
  • If another matching request is currently being processed, the endpoint's action will be skipped and you will get a 409
  • If another matching request has completed in the previous hour, the endpoint's action will be skipped and you will get the previously completed request's response.