v56

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

Get an enterprise role

Gets a custom enterprise role that is available within the 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/{role_id}

Path parameters

enterprisestring required

The slug version of the enterprise name.

role_idinteger required

The unique identifier of the role.

Response

Response

idinteger required

The unique identifier of the role.

namestring required

The name of the role.

descriptionstring nullable

A short description about who this role is for or what permissions it grants.

source'Enterprise' | 'Predefined' nullable

Source answers the question, "where did this role come from?"

permissionsstring[] required

A list of permissions included in this role.

created_atstring date-time required

The date and time the role was created.

updated_atstring date-time required

The date and time the role was last updated.

Example response

{
  "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"
  }
}