Hiding the download button in the API docs


We wanted to remove the below feature (Download OpenAPI) button. Can it be removed?

download button


Redocly displays a download button with a link to the OpenAPI definition in YAML or JSON format.

The OpenAPI definition can be used for multiple purposes:

  • API gateway (or proxy)
  • Internal or consumer API docs
  • Generation of SDKs or clients
  • Validating the payloads programmatically


It's important to be clear on the reasons you want to hide it. Redocly is rendering the OpenAPI definition, so hiding the download button does not protect your information in any way. Depending on Redocly product, the user may still be able to download the OpenAPI definition without the convenience of a link. For example, with the HTML element someone can inspect the network traffic and grab the OpenAPI definition.

It may make it more inconvenient for your API consumers in case they wish to use the OpenAPI format for their own code generation or validation purposes. You have to determine if the result of hiding the download button is going to make your API consumers despise your choice. We've supported this option to hide the download button for over 4 years, but we still don't understand the actual use case for doing that with one exception: people who decide to change the location, look, and feel of the link to their OpenAPI definition.

The option to hide the download button is hideDownloadButton which has a default value of false.

Redocly configuration file

If you use a Redocly configuration file (redocly.yaml), you can add a feature toggle to hide the download button.

# ...

    hideDownloadButton: true

Redocly portal legacy page.yaml format

If you are using the Redocly portal legacy page.yaml format, you can add this to the settings configuration.

# ...

  hideDownloadButton: true

Redocly HTML element

If you are using the Redocly HTML element, you can include the hideDownloadButton: false in the options parameter.

        '<url to the API definition>',
        { licenseKey: '<license-key.here>',
          hideDownloadButton: true,

Redoc HTML element

If you are using the Redoc HTML element, you can include the hideDownloadButton: false in the options parameter.

Redoc.init('dist.yaml', {
  hideDownloadButton: true
}, document.getElementById('redoc-container'))

You try it

Try it with your APIs if you still want to hide that download button.

Let me know how it goes.

Latest from our blog

Ensure consistent APIs with Redocly and ...

Put some magic API tools in your continuous integration and make a good API grow up to be a great API.

Getting started with API governance

Take your first steps to better APIs with our approachable guide to getting started with API governance.

Making metrics at WriteTheDocs Portland ...

Learn about the importance in using research and metrics in creating value for readers and demonstrating value as writers, as well as some highlights from the talks.