Review a request to access organization resources with a fine-grained personal access token
POST
/orgs/{org}/personal-access-token-requests/{pat_request_id}
Approves or denies a pending request to access organization resources via a fine-grained personal access token.
Only GitHub Apps can use this endpoint.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” org
required
string
The organization name. The name is not case sensitive.
pat_request_id
required
integer
Unique identifier of the request for access via fine-grained personal access token.
Request Body required
Section titled “ Request Body required ” Media type application/json
object
action
required
Action to apply to the request.
string
reason
Reason for approving or denying the request. Max 1024 characters.
string
Examples
Example 204
Example of denying a request
{ "action": "deny", "reason": "This request is denied because the access is too broad."}Responses
Section titled “ Responses ”A header with no content is returned.
Forbidden
Media type application/json
Basic Error
Basic Error
object
message
string
documentation_url
string
url
string
status
string
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Resource not found
Media type application/json
Basic Error
Basic Error
object
message
string
documentation_url
string
url
string
status
string
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Validation failed, or the endpoint has been spammed.
Media type application/json
Validation Error
Validation Error
object
message
required
string
documentation_url
required
string
errors
Array<object>
object
resource
string
field
string
message
string
code
required
string
index
integer
value
One of:
string
integer
Array<string>
Example generated
{ "message": "example", "documentation_url": "example", "errors": [ { "resource": "example", "field": "example", "message": "example", "code": "example", "index": 1, "value": [ "example" ] } ]}Internal Error
Media type application/json
Basic Error
Basic Error
object
message
string
documentation_url
string
url
string
status
string
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}