# Update Token

Launch stage: GA

`PATCH /api/2.0/token/{token_id}`

Updates the comment or scopes of a token.

 If a token with the specified ID is not valid, this call returns an error **NOT_FOUND**.

API scopes: authentication

## Path parameters

- `token_id` (string, optional)
  The SHA-256 hash of the token to be updated.

## Request body

- `token` (object, optional)
  - `token_id` (string, optional)
    The ID of this token.
  - `creation_time` (int64, optional)
    Server time (in epoch milliseconds) when the token was created.
  - `expiry_time` (int64, optional)
    Server time (in epoch milliseconds) when the token will expire, or -1 if not applicable.
  - `comment` (string, optional)
    Comment the token was created with, if applicable.
  - `scopes` (array of string, optional)
    Scope of the token was created with, if applicable.
- `update_mask` (string, optional)
  A list of field name under token, For example, {"update_mask": "comment,scopes"}

## Response

```json
{}
```

