Configure idempotency headers
Pro and Enterprise feature
This feature is available only for the Pro and Enterprise plans. To get started, reach out to support@buildwithfern.com.
For endpoints you’ve configured as idempotent, Fern’s SDKs allow you to
specify idempotency headers. Typically the headers include Idempotency-Key,
but you can also specify additional headers.
How it works for SDK users
Your SDK users can specify an idempotency header like this:
The generated SDKs won’t allow users to specify idempotency headers for non-idempotent endpoints. This ensures that the user knows exactly which invocations are idempotent and which aren’t.
Setting up idempotency headers
To set up idempotency headers in your API, configure the idempotency headers and mark individual endpoints as idempotent.
OpenAPI
Fern Definition
Configure idempotency using the x-fern-idempotency-headers and x-fern-idempotent extensions: