v56

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,4581,08113.3 MB
enterprise-admin

Get all enterprise roles for an enterprise

Lists the enterprise roles available in this enterprise.

To use this endpoint, the authenticated user must be one of:

  • An administrator for the enterprise.
  • A user, or a user on a team, with the fine-grained permission read_enterprise_custom_enterprise_role in the enterprise.

OAuth app tokens and personal access tokens (classic) require the read:enterprise scope to access this endpoint.

get/enterprises/{enterprise}/enterprise-roles

Path parameters

enterprisestring required

The slug version of the enterprise name.

Response

Response - list of enterprise roles

total_countinteger

The total number of enterprise roles available to the enterprise.

Example response

{
  "roles": [
    {
      "enterprise": {
        "html_url": "https://github.com/enterprises/octo-business",
        "id": 42,
        "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
        "name": "Octo Business",
        "slug": "octo-business",
        "created_at": "2019-01-26T19:01:12Z",
        "updated_at": "2019-01-26T19:14:43Z"
      }
    }
  ]
}