Your published API reference includes Try It!, an interactive console that lets developers send live requests to your endpoints, and a Code panel with ready-to-copy request samples. There is no setting to turn these off, but you can hide them with custom CSS.
This is a project-level implementation. It affects all API documentation workspaces within the project.
When to use this
Use this customization when you want to:
- Publish your API reference for reading only, without letting developers send live requests from the documentation.
- Prevent accidental requests to endpoints that create, update, or delete data.
- Show a simpler endpoint page for readers who don't need request samples.
Before you begin
- You need access to Settings () > Knowledge base site > Site customization > Custom CSS & JavaScript in the Knowledge base portal.
- This is a project-level change that affects all API documentation workspaces within the project.
- Hiding Try It! removes the button from your documentation. It does not restrict access to your API. Developers can still send requests with other tools.
- The snippet you need depends on your API reference layout. Open any endpoint page on your knowledge base site:
- If a Try It button appears next to the endpoint URL, you're using the current layout.
- If Try It and Code samples appear as tabs in a panel on the right, you're using the earlier layout.
How to hide Try It! and the Code panel
- Navigate to Settings () > Knowledge base site > Site customization > Custom CSS & JavaScript in the Knowledge base portal.
- In the CSS tab, paste the snippet for your layout.
Current layout
You can hide the Try It button, the Code panel, or both:
/* Hide the Try It button */
.url-tryit-btn { display: none !important; }
/* Hide the Code panel (the Request and Response panels stay visible) */
.api-docs-v2-docs-view__right > .code-section:first-of-type { display: none !important; }
Earlier layout
In the earlier layout, Try It and Code samples share one panel. This snippet hides the whole panel:
/* Hide the Try It and Code samples panel */
site-docs-right-panel-container.tryit-section { display: none !important; }
- Click Save.
Outcome
Current layout
The Try It button no longer appears next to the endpoint URL, and the Code panel is hidden. The Request and Response panels stay visible, so readers can still see example payloads.
Earlier layout
The right panel with the Try It and Code samples tabs no longer appears on endpoint pages.
Best practices
- Hide only what you need. If readers benefit from request samples but shouldn't send live requests, hide only the Try It button and keep the Code panel.
- Test on an endpoint page. Open an endpoint on your knowledge base site in a private browser window to confirm the result.
- Recheck after site updates. The snippets target the API reference's current structure. If your project moves to the current layout, replace the earlier-layout snippet with the current-layout snippet.
- To revert, delete the snippet. Navigate back to the CSS tab in Custom CSS & JavaScript, remove the snippet, and click Save. Try It! and the Code panel reappear immediately.