Customize API Reference layout
When you include an API in your docs.yml file, you can customize how the endpoints and sections are displayed in the sidebar navigation. By default, the reference will generate a navigation hierarchy based on the structure of the API spec, but several customizations can be configured.
API Sections
If you are using an OpenAPI specification, sections are created based on the tags property, converted to lowerCamelCase convention (e.g., createUser). If you are using a Fern Definition, sections are created based on the service file names.
If you would like to only display a subset of endpoints, read more about the Audiences property for OpenAPI specifications or Fern Definitions.
Ordering the API Reference
Alphabetizing endpoints and sections
To sort all sections and endpoints alphabetically, unless explicitly ordered in layout, set alphabetized to true.
Ordering top-level sections
The layout option allows you to specify the order of sub-packages, sections, endpoints, and pages at the top level of your API Reference.
OpenAPI Specification
Fern Definition

Ordering section contents
OpenAPI
Fern Definition
WebSocket
GraphQL
WebSocket
You can reference an endpoint using the format METHOD /path.

Customizing the API Reference
Renaming sections
By default, section display names come from service file names (Fern Definition) or tag names (OpenAPI) in your spec.
To override the display name of a section, use the section property in your docs.yml and reference the lowerCamelCase version of the original service file name (Fern Definition) or tag name (OpenAPI) in referenced-packages.
For OpenAPI, you can alternatively customize tag display names directly in your spec (or overrides.yml file) using the x-displayName extension.
Flattening sections
To remove the API Reference title and display the section contents, set flattened to true.

Styling endpoints
To customize the display of an endpoint, you can add a title. You can also use slug to customize the endpoint URL.
OpenAPI
Fern Definition
WebSocket

Hiding endpoints
You can hide an endpoint from the API Reference by setting hidden to true. The endpoint will still be accessible at its URL.
OpenAPI
Fern Definition
WebSocket
Adding custom sections
You can add arbitrary folders in the sidebar by adding a section to your API Reference layout. A section can comprise entire groups of endpoints, individual endpoints, or even just Markdown pages. Sections can be customized by adding properties like a icon, summary, slug (or skip-slug), availability, and contents.
OpenAPI
Fern Definition

Adding a section overview
You can add overview pages to your API Reference or individual sections in two ways:
Manual summary pages
The summary property allows you to add an .md or .mdx page as an overview.
Automatic summaries from OpenAPI tags
If you’re using an OpenAPI spec, set tag-description-pages: true to use tag descriptions as summary pages for each section.
If you enable tag-description-pages: true and manually specify a summary for a section, the manual summary will take precedence.

Adding pages and links
You can add regular pages and external links within your API Reference.
Adding availability
You can set the availability for the entire API Reference or for specific sections. Options are: stable, generally-available, in-development, pre-release, deprecated, or beta.
When you set availability for a section, all endpoints in that section will inherit the section-level availability unless explicitly overridden in your API definition.
docs.yml. Endpoint availability must be configured directly in your API definition. Learn more about availability for OpenAPI or Fern Definition.Displaying endpoint errors
Set display-errors to true to show error schemas on endpoint pages. The error names, status codes, and response objects are pulled from your API definition.

Clicking on an error expands it to show the error name, code, and object returned. The response also updates to show the error object.

Configuration options reference
The following properties can be set on the - api entry in your docs.yml navigation.
alphabetized
When true, organizes all sections and endpoints in alphabetical order.
api
Title of the API Reference section.
audiences
List of audiences that determines which endpoints, schemas, and properties are displayed in your API Reference.
availability
Set the availability status for the entire API Reference or specific sections.
display-errors
Displays error schemas on endpoint pages of your API Reference.
flattened
Displays all endpoints at the top level and hides the API Reference section title.
icon
Icon to display next to the API section in the navigation.
layout
Customize the order that your API endpoints are displayed in the docs site. See Ordering the API Reference for details.
paginated
Displays all endpoints on separate pages. By default, endpoints are displayed on one single, long page.
skip-slug
When true, skips slug generation for the API section.
slug
Customize the slug for the API section. By default, the slug is generated from the API title.
summary
Relative path to a Markdown file displayed at the top of the API section.
tag-description-pages
When true, uses OpenAPI tag descriptions as summary pages for each section.
api-name
Only used when your project has multiple APIs. The value must match the folder name containing the API definition. Do not set this property if you only have a single API, as it will cause errors.