We're introducing a new codes of conduct API preview to support the code of conduct adoption tool on GitHub.com.
To access the API during the preview period, you must provide a custom media type in the
This will then expose new API endpoints. You can get a list of all known codes of conduct:
Or get a particular code of conduct:
When the preview media type is passed, the Repository API will also return information about a repository's code of conduct file when you get an individual repository:
Alternatively, you can just get the contents of a repository's code of conduct with: