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
        • Webhooks
        • WebSockets
        • Errors
        • Imports
        • Examples
        • Audiences
        • Availability
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
  • Configuration
  • Audiences for endpoints
  • Audiences for types
  • Audiences for properties
  • Audiences for SDKs
  • Audiences with docs
Fern DefinitionAdvanced

Audiences in Fern Definition

Use audiences in your Fern Definition to segment your API for different groups of consumers.
||View as Markdown|
Was this page helpful?
Edit this page
Previous

Examples in Fern Definition

Next

Availability in Fern Definition

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

Team and Enterprise feature

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

Audiences are a useful tool for segmenting your API for different consumers. You can configure your Fern Docs to publish documentation specific to an Audience. You can use audiences in your OpenAPI Specification, too.

Common examples of audiences include:

  • Internal consumers (e.g., frontend developers who use the API)
  • Beta testers
  • Customers

By default, if no audience is specified, it will be accessible to all consumers.

Configuration

The Fern Definition has a first-class concept for marking different endpoints, types, and properties for different audiences.

To use audiences in your Fern Definition, add them to api.yml.

In the example below, we have created audiences for internal, beta, and customer groups:

api.yml
1name: api
2audiences:
3 - internal
4 - beta
5 - customers

Audiences for endpoints

To mark an endpoint for a particular consumer, add an audience with the relevant groups.

In this example, the sendEmail endpoint is only available to internal consumers:

user.yml
1service:
2 base-path: /users
3 auth: true
4 endpoints:
5 sendEmail:
6 audiences:
7 - internal
8 path: /send-email
9 ...

Audiences for types

Types can also be marked for different audiences.

In this example, the Email type is available to internal and beta consumers:

user.yml
1Email:
2 properties:
3 subject: string
4 body: optional<string>
5 audiences:
6 - internal
7 - beta

Audiences for properties

Properties of a type can also be marked for different audiences.

In this example, the to property is available to beta consumers only:

user.yml
1Email:
2 properties:
3 subject: string
4 body: optional<string>
5 to:
6 type: string
7 docs: The recipient of the email
8 audiences:
9 - beta

Audiences for SDKs

In generators.yml, you can apply audience filters so that only certain endpoints are passed to the generators.

The following example configures the SDKs to filter for customers:

generators.yml
1groups:
2 external:
3 audiences:
4 - customers
5 generators:
6 ...

Audiences with docs

If generating Fern Docs, update your docs.yml configuration to include your audiences.

The following example shows how to configure your docs.yml to publish documentation for the customers audience:

docs.yml
1navigation:
2 - api: API Reference
3 audiences:
4 - customers