Update cPanel API token's name

This function renames a cPanel account's existing API token.

Authorizations:
query Parameters
name
required
string

The API token's name.

Example: name=example
new_name
required
string <= 50 characters

The new name for the API token.

Note:

The name may only contain alphanumeric characters, dashes (-), and underscores (_).

Example: new_name=newexample

Responses

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object

Request samples

uapi --user=username Tokens rename name='example' new_name='newexample'

Response samples

Content type
application/json
{
  • "apiversion": 3,
  • "func": "rename",
  • "module": "Tokens",
  • "result": {
    • "data": null,
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}