v56

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

List requests to access organization resources with fine-grained personal access tokens

Lists requests from organization members to access organization resources with a fine-grained personal access token.

Only GitHub Apps can use this endpoint.

get/orgs/{org}/personal-access-token-requests

Path parameters

orgstring required

The organization name. The name is not case sensitive.

Query parameters

per_pageinteger

The number of results per page (max 100). For more information, see "Using pagination in the REST API."

pageinteger

The page number of the results to fetch. For more information, see "Using pagination in the REST API."

sort'created_at'

The property by which to sort the results.

direction'asc' | 'desc'

The direction to sort the results by.

ownerstring[]

A list of owner usernames to use to filter the results.

repositorystring
Example:Hello-World

The name of the repository to use to filter the results.

permissionstring
Example:issues_read

The permission to use to filter the results.

last_used_beforestring date-time

Only show fine-grained personal access tokens used before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

last_used_afterstring date-time

Only show fine-grained personal access tokens used after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

token_idstring[]

The ID of the token

Response

Response

idinteger required

Unique identifier of the request for access via fine-grained personal access token. The pat_request_id used to review PAT requests.

reasonstring nullable required

Reason for requesting access.

repository_selection'none' | 'all' | 'subset' required

Type of repository selection requested.

repositories_urlstring required

URL to the list of repositories requested to be accessed via fine-grained personal access token. Should only be followed when repository_selection is subset.

created_atstring required

Date and time when the request for access was created.

token_idinteger required

Unique identifier of the user's token. This field can also be found in audit log events and the organization's settings for their PAT grants.

token_namestring required

The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens.

token_expiredboolean required

Whether the associated fine-grained personal access token has expired.

token_expires_atstring nullable required

Date and time when the associated fine-grained personal access token expires.

token_last_used_atstring nullable required

Date and time when the associated fine-grained personal access token was last used for authentication.

Example response

[
  {
    "owner": {
      "login": "octocat",
      "id": 1,
      "node_id": "MDQ6VXNlcjE=",
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "41d064eb2195891e12d0413f63227ea7",
      "url": "https://api.github.com/users/octocat",
      "html_url": "https://github.com/octocat",
      "followers_url": "https://api.github.com/users/octocat/followers",
      "following_url": "https://api.github.com/users/octocat/following{/other_user}",
      "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
      "organizations_url": "https://api.github.com/users/octocat/orgs",
      "repos_url": "https://api.github.com/users/octocat/repos",
      "events_url": "https://api.github.com/users/octocat/events{/privacy}",
      "received_events_url": "https://api.github.com/users/octocat/received_events",
      "type": "User",
      "starred_at": "\"2020-07-09T00:17:55Z\"",
      "user_view_type": "public"
    }
  }
]