Update the access a fine-grained personal access token has to organization resources
POST
/orgs/{org}/personal-access-tokens/{pat_id}
Updates the access an organization member has to organization resources via a fine-grained personal access token. Limited to revoking the token’s existing access. Limited to revoking a token’s existing access.
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_id
required
integer
The unique identifier of the 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 fine-grained personal access token.
string
Examples
Example 204
Example of revoking a fine-grained personal access token.
{ "action": "revoke"}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"}