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

# Update user token information

`PUT /users/{user_id}/tokens/{token_id}`

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

- `user_id` string, required
- `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.net/anaconda/apis/anaconda-server-api.md) · [All operations](https://skmtc.net/anaconda/apis/anaconda-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/anaconda/anaconda-server-api/versions/6aef0cb7a151/schema)
