Runnable endpoint
The <RunnableEndpoint> component lets users make real HTTP requests to your APIs directly in the API Reference. It auto-detects endpoint definitions from your API specification and provides a request builder with inputs for headers, path parameters, query parameters, and request bodies.
Usage

Features
The component supports:
- Multiple examples – When your endpoint has multiple pre-configured examples, the component displays a dropdown selector in the header so users can switch between different examples
- Multiple environments – If your API defines multiple environments (production, staging, development), the component automatically displays an environment selector so users can test against different base URLs
- API Reference integration – Each
<RunnableEndpoint>includes a button that links users to the full API Reference documentation for the endpoint - Real-time response preview – Users can view response status, headers, body, and response time immediately after sending requests
- Form persistence – Form inputs are automatically persisted in the browser’s local storage, so users’ test data is preserved even when navigating between pages or refreshing the browser
Properties
The endpoint locator in the format “METHOD /path”. For example: "POST /api/users" or "GET /api/users/{id}".
Pre-fill the form with a specific example by name. If not specified, the first example is used by default.
Set the default environment for the endpoint. The value must correspond to the x-fern-server-name of a server URL defined in your API specification. If not specified, the first environment is used by default.
Fields to lock by hiding their dropdown selectors. Accepts "environment" to lock the server URL and prevent users from switching environments. When set to readonly={["environment"]}, the environment selector is hidden and the endpoint uses the environment specified by defaultEnvironment (or the first environment if not specified).
CSS class name for custom styling of the component container.