Multiple Server URLs
You can configure multiple server URLs in your API Reference to allow users to switch between different environments (e.g., production and sandbox). This is particularly useful when users need to test their integration before going live.
Configuration
You can configure multiple server URLs in your API definition using either Fern Definition or OpenAPI:
User Interface
When multiple servers are configured, users will see a dropdown menu in the API Reference that allows them to switch between environments:
Here’s an example of the Flagright docs site with multiple server names configured.
OpenAPI
Fern Definition
Environment Persistence
When you select an environment, it’s reflected across the entire API Reference - both in the displayed URLs and in the API Explorer. This selection persists as you navigate between different pages.
You can also double-click the server URL to manually edit it, allowing for quick testing against custom environments or endpoints.