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
    • What is an API definition?
    • Project structure
      • Overview
      • Overlays
      • Overrides
      • Authentication
      • Servers
      • Sync your specification
        • Overview
        • API version
        • Audiences
        • Availability
        • Base path
        • Default values
        • Enum descriptions, names, and availability
        • Request + response examples
        • API Explorer control
        • Global headers
        • Ignoring elements
        • SDK method names
        • SDK variables
        • Tag display names
        • Parameter names
        • Property names
        • Idempotency
        • Pagination
        • Retry behavior
        • Schema names
        • Server names and URL templating
      • generators.yml reference
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
  • Configure idempotency headers
  • Mark endpoints as idempotent
OpenAPIExtensions

Idempotency

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

Property names

Next

Pagination

Enterprise feature

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

Fern supports idempotency configuration through two extensions that work together: x-fern-idempotency-headers configures the idempotency headers your API uses, and x-fern-idempotent marks individual endpoints as idempotent. When configured, Fern’s generated SDKs allow users to specify idempotency headers for safe request retries.

Configure idempotency headers

Add the x-fern-idempotency-headers extension at the root level of your OpenAPI specification to define which headers your API uses for idempotency:

openapi.yml
1x-fern-idempotency-headers:
2 - header: Idempotency-Key
3 name: idempotency_key
4 - header: Idempotency-Expiration
5 name: idempotency_expiration

Each idempotency header supports the following properties:

PropertyDescription
headerThe HTTP header name (e.g., Idempotency-Key)
nameThe parameter name used in the generated SDK (e.g., idempotency_key)

Mark endpoints as idempotent

Add the x-fern-idempotent extension to individual endpoints and set it to true to mark them 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
9 operationId: create_plant
10 requestBody:
11 required: true
12 content:
13 application/json:
14 schema:
15 type: object
16 properties:
17 name:
18 type: string
19 species:
20 type: string
21 responses:
22 '201':
23 description: Plant created successfully