---
title: "Update WHM API token's settings"
method: GET
path: "/api_token_update"
tags: ["Authentication", "API Token Management"]
---

# Update WHM API token's settings

`GET /api_token_update`

This function updates an API token's settings.

## Query parameters

- `token_name` string, required
- `acl` string
- `expires_at` integer
- `new_name` string
- `whitelist_ip` union
  - string, ipv4
  - string, ipv6
  - string, cidr
  - 'any'

## Response `200`

HTTP Request was successful.

- object
  - `data` object
    - `acls` string[] — A list of privileges assigned to the token.
    - `create_time` integer — The API token's creation time.
    - `expires_at` integer, nullable — The API token's expiration time. **Note:** A `null` value means that the API token does **not** expire.
    - `name` string — The API token's name. **Note:** * This function returns the API token's new name when you use the `new_name` parameter. * Use this value to revoke an API token with WHM API 1's `api_token_revoke` function.
    - `whitelist_ips` union[], nullable — List of remote IP or CIDR IP ranges this token may be used from.
      - union
        - string, ipv4
        - string, ipv6
        - string, cidr
  - `metadata` object
    - `command` string — The method name called.
    - `reason` string — The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds.
    - `result` 1 | 0 — * `1` — Success. * `0` – Failed. Check the `reason` field for more details.
    - `version` integer — The version of the API function.

---

[API](https://skmtc.net/cpanel/apis/whm-api.md) · [All operations](https://skmtc.net/cpanel/apis/whm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/whm-api/revisions/3da41671c02c/schema)
