Skip to main content

Idempotent Requests

The MagFi API supports the use of Idempotency-Key for all authenticated POST and PATCH requests, following the established draft RFC.

GET and DELETE requests are inherently idempotent.

To make an idempotent request:

  1. Generate a random key for your request. A UUID is a good choice.
  2. Attach the Idempotency-Key HTTP header with your random key as the value.
  3. Make your request normally.

Making use of idempotent requests is currently optional, but highly recommended.

Idempotency keys expire after 24 hours in all environments.

See draft-ietf-httpapi-idempotency-key-header-06 for more details on idempotent requests.