GET
/orgs/{org}/personal-access-token-requestsList 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.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
orgstringrequired
The organization name. The name is not case sensitive.
per_pageintegeroptional
The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
pageintegeroptional
The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
sortstringoptional
The property by which to sort the results.
directionstringoptional
The direction to sort the results by.
ownerarray<string>optional
A list of owner usernames to use to filter the results.
repositorystringoptional
The name of the repository to use to filter the results.
permissionstringoptional
The permission to use to filter the results.
last_used_beforestringoptional
Only show fine-grained personal access tokens used before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.
last_used_afterstringoptional
Only show fine-grained personal access tokens used after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.
token_idarray<string>optional
The ID of the token
200Response
idintegerrequired
Unique identifier of the request for access via fine-grained personal access token. The `pat_request_id` used to review PAT requests.
reasonstringrequired
Reason for requesting access.
ownerobjectrequired
A GitHub user.
repository_selectionstringrequired
Type of repository selection requested.
repositories_urlstringrequired
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`.
permissionsobjectrequired
Permissions requested, categorized by type of permission.
created_atstringrequired
Date and time when the request for access was created.
token_idintegerrequired
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_namestringrequired
The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens.
token_expiredbooleanrequired
Whether the associated fine-grained personal access token has expired.
token_expires_atstringrequired
Date and time when the associated fine-grained personal access token expires.
token_last_used_atstringrequired
Date and time when the associated fine-grained personal access token was last used for authentication.
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Validation failed, or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional
500Internal Error
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
Error handling
A 403 is returned: Forbidden. A 404 is returned: Resource not found. A 422 is returned: Validation failed, or the endpoint has been spammed. A 500 is returned: Internal Error.