This function renames a cPanel account's existing API token.
uapi --output=jsonpretty \ --user=username \ Tokens \ rename \ name='example' \ new_name='newexample'
{- "apiversion": 3,
- "func": "rename",
- "module": "Tokens",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}