--- title: "apitoken modify" slug: "apitoken-modify" tags: ["5.4"] updated: 2026-10-28T01:52:43Z published: 2026-10-28T01:52:43Z canonical: "docs.vastdata.com/apitoken-modify" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.vastdata.com/llms.txt > Use this file to discover all available pages before exploring further. # apitoken modify This command modifies an API token. ## Usage ```plaintext apitoken modify --id ID               [--name NAME]               [--expiry-date EXPIRATION_TIME] ``` ## Required Parameters | `--id ID` | Specifies the API token to modify. | | --- | --- | ## Options | `--name NAME` | Customizes the name of the API token. If not specified, the token is named `OWNER_api_token`, where OWNER is the user name of the token owner. | | --- | --- | | `--expiry-date EXPIRATION_TIME` | Sets the token's expiration date by specifying an amount of time from token creation until the token should expire. The expiration date is equal to the token creation date in UTC + the specified time period. Specify `EXPIRATION_TIME` as a whole integer followed by a unit of time: 'Y' for (365 day) years, 'M' for (30 day) months, 'w' or 'W' for weeks, 'd' or 'D' for days, 'h' or 'H' for hours, 'm' for minutes, 's' or 'S' for seconds. For example: to set the expiration date to be six months after creating the token: `--expiry-date 6M` The maximum and default expiration time is the password expiration timeout, which is set by the `--pwd-expiration-timeout` parameter of the [vms modify_pwd_settings](/docs-5-4/docs/en/vms-modify-pwd-settings) command. If password expiration is not enabled, tokens do not expire unless `--expiry-date` is set.vms modify_pwd_settings Example: To set the token to expire after 180 days: `--expiry-date 180D` | ## Example ```plaintext vcli: admin> apitoken modify --id SwpND4dt --name manager1token2 --expiry-date 24M ```