v1

latestOpenAPI 3.0.02026-07-14285059.6 KB
access-tokens

Update a personal access token

Updates a personal access token partially. You can either update the token's label or enable/disable it.

patch/v2/access-tokens/{uuid}

Request body

is_activeboolean
token_labelstring

Example request

{
  "token_label": "My read only token"
}

Response

OK

client_idstring
created_atstring
creator_ipstring
creator_uastring
generated_bystring
is_activeboolean
last_usedstring nullable
scopesstring[]
tokenstring
token_labelstring
uuidstring

Example response

{
  "client_id": "HUB",
  "created_at": "2021-07-20T12:00:00.000000Z",
  "creator_ip": "127.0.0.1",
  "creator_ua": "some user agent",
  "generated_by": "manual",
  "is_active": true,
  "scopes": [
    "repo:read"
  ],
  "token": "a7a5ef25-8889-43a0-8cc7-f2a94268e861",
  "token_label": "My read only token",
  "uuid": "b30bbf97-506c-4ecd-aabc-842f3cb484fb"
}