Customize your API Playground

If you subscribe to Fern’s Pro or Enterprise Plans, you can customize your API Playground settings to suit your customers needs.

All configuration settings are defined in the docs.yml file, under API Reference navigation configuration, in a Playground object.

Filtering Server Urls

If you have multiple environments for your API, you can filter the server URLs that are displayed in the API Playground.

To filter server URLs, add the environments property to the PlaygroundSettings object in your docs.yml, like so:

1navigation:
2 playground:
3 environments:
4 - Staging-A
5 - Staging-B

Enabling OAuth 2.0 Authorization Injection

If you have defined an endpoint that executes OAuth 2.0 Client Credentials Authorization in your API definition, you can enable OAuth 2.0 Authorization Injection in your API Playground. More information on enabling OAuth 2.0 Authorization Injection can be found here.

To enable OAuth 2.0 Authorization Injection, simply add the oauth feature flag to the PlaygroundSettings object in your docs.yml, like so:

1navigation:
2 playground:
3 oauth: true