Contribute to the Discourse API Docs ๐Ÿ“œ

Do you want to contribute to the official API documentation at
This guide will explain step by step how to do it. :slight_smile:


You must have a Discourse development installation.

If you donโ€™t have one, follow the guide that suits your environment: Docs - Discourse Meta

Clone Discourse API docs repo

Weโ€™ll assume your Discourse development install is inside your home directory ~/.

From your home directory, clone :

git clone

You should now have discourse and discourse_api_docs folders side by side:


Edit the API documentation files

You must edit the documentation directly from ~/discourse/spec/requests/api/.[1]

After editing the documentation files, run the following command from ~/discourse/:

bin/rake rswag:specs:swaggerize && cp openapi/openapi.yaml ~/discourse_api_docs/openapi.yml

The documentation will be generated using rswag and copied into ~/discourse_api_docs.

View your changes locally

To view your updated documentation, run these commands from ~/discourse_api_docs/

npm install
node server.js

Browse to http://localhost:3001 to see the pretty docs.
If everything looks good, create a pull request from the discourse/discourse repository (not the Discourse API Docs repository ).

  1. See the folder on Github: โ†ฉ๏ธŽ