For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Book a demoLog inStart for free
  • Overview
    • Introduction
    • How it works
    • Quickstart
    • Customer showcase
  • Working with SDKs
    • Project structure
    • Adding custom code
    • Migrating to Replay
    • Capabilities
  • Generators
      • Global headers
      • Dynamic authentication
      • Auto-pagination
      • Idempotency headers
      • Retries with backoff
  • Reference
    • generators.yml
Checking status...
SOC2Soc 2 Type II
© 2026 Fern • Birch Solutions, Inc., a Postman company

Documentation

SDKsDocsAsk FernCLI Reference

API Definitions

OpenAPIAsyncAPIOpenRPCgRPC

Resources

BlogSupportPricing

Company

Brand KitPrivacy PolicyTerms of Service
LogoLogo
Book a demoLog inStart for free
On this page
  • Generated SDK behavior
  • Setting up idempotency headers
Request behavior

Configure idempotency headers

||View as Markdown|
Was this page helpful?
Edit this page
Previous

Configure auto-pagination

Next

Retries with backoff

Enterprise feature

This feature is available only for the Enterprise plan. To get started, reach out to support@buildwithfern.com.

For endpoints you’ve configured as idempotent, Fern’s SDKs allow users to specify idempotency headers for safe request retries. Typically the headers include Idempotency-Key, but you can also specify additional headers.

Generated SDK behavior

The generated SDKs expose idempotency headers as parameters only for endpoints marked as idempotent, ensuring users know exactly which invocations are idempotent.

1const response = await client.transactions.send({
2 amount: 100,
3 currency: "usd",
4}, {
5 idempotencyKey: "64099353-b48b-4dcd-98b7-74df1cc57933"
6});

Setting up idempotency headers

Configure the idempotency headers your API uses, then mark individual endpoints as idempotent:

openapi.yml
1x-fern-idempotency-headers:
2 - header: IDEMPOTENCY-KEY
3 name: idempotency_key
4
5paths:
6 /plants:
7 post:
8 x-fern-idempotent: true

For full configuration details, see Idempotency in OpenAPI.