---
title: "POST /v2/UpdateAdminToken"
method: POST
path: "/v2/UpdateAdminToken"
tags: ["Admin API token"]
---

# POST /v2/UpdateAdminToken

`POST /v2/UpdateAdminToken`

Updates information about the specified admin API token.

## Query parameters

- `id` string, required

## Request body

- UpdateAdminTokenRequestBody
  - `expiration` string, date-time, nullable — Expiration time and date, formatted according to RFC 3339
  - `name` string, nullable — Name of the admin API token
  - `neverExpires` boolean — Set the admin token to never expire
  - `scope` string[], nullable — Scope of the admin API token, a list of admin endpoint names (such as `GetClusterStatus`, etc), or the special value `*` to allow all admin endpoints. **WARNING:** Granting a scope of `CreateAdminToken` or `UpdateAdminToken` trivially allows for privilege escalation, and is thus functionally equivalent to granting a scope of `*`.

## Response `200`

Admin token has been updated

- UpdateAdminTokenResponse
  - `created` string, date-time, nullable — Creation date
  - `expiration` string, date-time, nullable — Expiration time and date, formatted according to RFC 3339
  - `expired` boolean, required — Whether this admin token is expired already
  - `id` string, nullable — Identifier of the admin token (which is also a prefix of the full bearer token)
  - `name` string, required — Name of the admin API token
  - `scope` string[], required — Scope of the admin API token, a list of admin endpoint names (such as `GetClusterStatus`, etc), or the special value `*` to allow all admin endpoints

## Other responses

- `500` — Internal server error

---

[API](https://skmtc.dev/deuxfleurs/apis/garage-administration-api.md) · [All operations](https://skmtc.dev/deuxfleurs/apis/garage-administration-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/deuxfleurs/garage-administration-api/revisions/07ffb2d0febb/schema)
