Base URL
The Base URL widget sets the root URL(s) for your API. URLs are grouped into environments such as Production and Sandbox, defined once and kept in sync across every section and the API Explorer.
Not sure where to change it? Click the edit icon on the Base URL widget, or open the three-dot menu (More Actions) on any API Management widget and choose Base URL configuration. Both open the same dialog, where you add environments and URLs.
- Insert the widget: on a new line, type
/base urland select the Base URL widget. - Edit the base URL: click the edit icon in the widget, or open More Actions in the API Management widget and choose Base URL configuration. A dialog lets you add or modify URLs for different environments (e.g. Production and Sandbox).
- Save environment URLs: give each environment a title and URL, e.g. “Production” →
http://api.example.comand “Sandbox” →http://sandbox.api.example.com. - Automatic updates: saved base URLs update dynamically across every section; change one and it reflects everywhere, no manual edits needed.
- API Explorer sync: the base URL syncs with the API Explorer, so readers can switch environments while trying out calls.
Managing base URLs
Default setup
By default, your documentation includes a Production environment with a sample base URL: http://example.io.
Adding multiple base URLs
You can configure multiple base URLs within the same environment, for example, http://example.io and http://example.prod.io under Production.
1
Open the configuration modal
Open the base URL configuration modal for the environment.
2
Add another base URL
- Click Add Another Base URL.
- Enter a valid base URL.
3
Submit or customize
- To add only: press Submit and the URL appears in the widget.
- To customize: click the Settings icon, select specific endpoints or sections to apply this base URL to, then Save.
4
Apply changes
- Updates reflect in the editor immediately.
- Once published, they apply to the published documentation and the API Explorer.
Adding new environments
Create unlimited environments: “Sandbox,” “Testing,” “Staging,” and more.
1
Open the configuration modal
Navigate to the base URL configuration modal.
2
Add a new environment
- Click Add New Environment.
- Name it (e.g. "Sandbox").
- Add a valid base URL.
3
Assign to endpoints
- Select specific endpoints or sections for the environment.
- Save your changes.
Each environment can have its own base URLs and configuration, so you can align them to your development, staging, and production workflows.
Benefits
- Manage multiple base URLs under a single environment.
- Switch seamlessly between environments for different stages of development.
- Centralized configuration improves consistency across your documentation.
- Updates reflect instantly in both the editor and published docs.
FAQ
- Can I rename an environment? Yes, sample names are provided by default, but you can customize them freely.
- Do I need to update the base URL in every section if it changes? No, update it once in the widget and it reflects across all sections automatically.
Base URL
Production:
Sandbox: