Update API Token

Send a name and token identifier to rename an API token. For a full update, the caller must be able to grant the requested scopes. Capability assignments and capability token scopes cannot be edited. Set repository access when creating the token. Omit resources when updating other settings. Including the field, even as an empty array or null, rejects the entire update with HTTP 400.

This endpoint consumes 10 units of your quota.

This endpoint requires the following org token scopes:

  • api-tokens:create
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The slug of the organization

Body Params

The token and properties to update on the token.

Supply a token identifier and name alone for a rename. Other updates apply the scope, quota, visibility, and committer defaults for omitted fields.

integer
Defaults to 1000

Maximum number of API calls allowed per hour

scopes
array of strings

List of scopes granted to the API Token

scopes
string
enum
Defaults to organization

The visibility of the API Token. Warning: this field is deprecated and will be removed in the future.

Allowed:
committer
object

Committer information to associate with the API Token

string
Defaults to api token

Name for the API Token

uuid

The stable group UUID to update. Shared groups require a matching hash; id, token, or hash alone also identify one token.

string

The API token ID to update (provide uuid, id, token, or hash)

string

The API token to update (provide uuid, id, token, or hash)

string

The API token hash to update (provide uuid, id, token, or hash)

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json