Use the REST API to get information about codes of conduct.
Note
Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.
GET /codes_of_conduct
Returns array of all GitHub's codes of conduct.
200 - OK
304 - Not modified
Request:
curl -L \
-X GET \
https://api.github.com/codes_of_conduct
Response schema (Status: 200):
Array of Code Of Conduct:
key: required, stringname: required, stringurl: required, string, format: uribody: stringhtml_url: required, string or null, format: uriGET /codes_of_conduct/{key}
Returns information about the specified GitHub code of conduct.
accept (string)application/vnd.github+json is recommended.key (string) (required)200 - OK
304 - Not modified
404 - Resource not found
Request:
curl -L \
-X GET \
https://api.github.com/codes_of_conduct/KEY
Response schema (Status: 200):
key: required, stringname: required, stringurl: required, string, format: uribody: stringhtml_url: required, string or null, format: uri