---
title: "Update an existing access token"
method: PUT
path: "/access_token/{token_prefix}"
tags: ["Users"]
---

# Update an existing access token

`PUT /access_token/{token_prefix}`

## Path parameters

- `token_prefix` string, required

## Request body

- AccessTokenUpdateRequestBody — AccessTokenUpdateRequestBody
  - `description` string, required — Name / description of an access token

## Response `200`

Response

- AccessTokenUpdateResponse — AccessTokenUpdateResponse
  - `create_time` string, required — Timestamp when the access token was created
  - `created_manually` boolean — True for tokens explicitly created via the access_tokens API, false for tokens created via login.
  - `currently_active` boolean — true if API request was made with this access token
  - `description` string — Name / description of an access token
  - `errors` object[] — List of errors occurred during request processing
    - `message` string, required — Printable error message
    - `more_info` string — URL to the documentation of the error
    - `status` integer, required — HTTP error status code
  - `expiry_time` string — Timestamp when the access token will expire unless extended, if ever
  - `extend_when_used` boolean, required — Extend token expiration time when token is used. Only applicable if max_age_seconds is specified.
  - `ip_allowlist` string[] — List of allowed IP ranges
  - `last_ip` string — IP address the access token was last used from in case it has ever been used
  - `last_used_time` string — Timestamp when the access token was last used, if ever
  - `last_user_agent` string — User agent string of the client that last used the token in case it has ever been used
  - `last_user_agent_human_readable` string — Human readable user agent string of the client that last used the token in case user agent is known
  - `max_age_seconds` number, required — Time the token remains valid since creation (or since last use if extend_when_used is true)
  - `message` string — Printable result of the request
  - `scopes` string[] — Scopes this token is restricted to, if specified
  - `token_prefix` string, required — First characters of the actual token value. Full value is only exposed after creation. This value is used when updating or revoking tokens. Note that the value may contain /, + and = characters and must be URL encoded when used (/ =&gt; %2F, + =&gt; %2B, = =&gt; %3D).

---

[API](https://skmtc.net/aiven/apis/aiven-api-documentation.md) · [All operations](https://skmtc.net/aiven/apis/aiven-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aiven/aiven-api-documentation/versions/ecaeabf1da31/schema)
