---
title: "Update user token information"
method: PUT
path: "/account/tokens/{token_id}"
tags: ["account"]
---

# Update user token information

`PUT /account/tokens/{token_id}`

## Request

- Base URL: `https://api.anaconda.cloud/api`
- URL: `https://api.anaconda.cloud/api/account/tokens/{token_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/anaconda/apis/anaconda-server-api/docs/account/tokens/:token_id/put.ts> (a function with typed inputs; its response is checked against the schema)

By default reissues a new token and returns in `token` attribute. If `reissue_token` query parameter is false, then token is not reissued and old value is used. The api returns `null` as a token in this case.

## Path parameters

- `token_id` string, required

## Query parameters

- `reissue_token` boolean

## Request body

- UserTokenUpdateRequest
  - `name` string
  - `expires_at` string, date
  - `resources` UserTokenPermissionResourceItem[]
    - `resource_type` 'channel' | 'subchannel' | 'artifact', required
    - `resource_id` string, required: resource name
    - `permission` string, required

## Response `200`

Updated token object, which also contains the token itself

- UserTokenUpdateResponse
  - `token` string

## Other responses

- `401`: Unauthenticated, no token is provided or token is invalid
- `403`: Access is forbidden
- `404`: The specified resource was not found
- `500`: Internal server error

---

[API](https://skmtc.dev/anaconda/apis/anaconda-server-api.md) - [All operations](https://skmtc.dev/anaconda/apis/anaconda-server-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anaconda/apis/anaconda-server-api/revisions/6aef0cb7a151?raw)
