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
      • Authentication
      • Types
        • Overview
        • Environments
        • Global headers
        • Errors
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
  • Global headers
  • Global path parameters
  • Overriding the base path
  • Global query parameters
  • Idempotency headers
Fern Definitionapi.yml reference

Global configuration

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

Environments

Next

Errors

Fern Definition isn’t recommended for new customers and Fern isn’t accepting feature requests for this format. It remains supported for existing users.

The api.yml configuration supports global configuration like headers and path parameters.

Global headers

You can specify headers that are meant to be included on every request:

api.yml
1name: api
2headers:
3 X-App-Id: string

When you define global headers in your api.yml, you must include them in your endpoint examples.

Global path parameters

You can specify path parameters that are meant to be included on every request:

api.yml
1name: api
2base-path: /{userId}/{orgId}
3path-parameters:
4 userId: string
5 orgId: string

Overriding the base path

If you have certain endpoints that don’t live at the configured base-path, you can override the base-path at the endpoint level.

imdb.yml
1service:
2 endpoints:
3 getMovie:
4 method: POST
5 base-path: "override/{arg}"
6 path: "movies/{movieId}"
7 path-parameters:
8 arg: string

Global query parameters

You can’t yet specify query parameters that are meant to be included on every request. If you’d like to see this feature, upvote this issue.

Idempotency headers

Configure idempotency headers to define which headers SDK users can specify for safe request retries. You must also mark each endpoint as idempotent for the headers to be exposed. When both are configured, Fern’s generated SDKs expose these headers as parameters for idempotent endpoint calls.

api.yml
1name: api
2auth: bearer
3idempotency-headers:
4 Idempotency-Key: string
5 Idempotency-Expiration: optional<integer>

Each key in idempotency-headers is the HTTP header name, and the value is the type. SDK users can then specify these headers when calling idempotent endpoints.