Page tree
Skip to end of metadata
Go to start of metadata


In cPanel & WHM version 80, we introduced cPanel application programming interface (API) tokens. cPanel users can issue these API tokens. The server recognizes API tokens and allows other users to run API functions with the account's data. API functions allow you to view and change account data without the need to log in to the cPanel interface. For example, you could issue an API token to a third-party developer. That third-party developer could use that token to check disk usage.


API tokens run UAPI functions and cPanel API 2 functions, not cPanel API 1 functions. For more information, read our Quickstart Development Guide documentation.

How to use a cPanel API token

To use a cPanel API token, first, create a cPanel API token in cPanel's Manage API Tokens interface (cPanel >> Home >> Security >> Manage API Tokens). Then, use the token to run API functions on the server.

Create an API token

To create an API token:

  1. Navigate to cPanel's Manage API Tokens interface (cPanel >> Home >> Security >> Manage API Tokens).
  2. Click Create. The Create API Token interface will appear.
  3. Enter a name in the API Token Name text box.


    • An API token name can only contain up to 50 characters.
    • You can only enter letters (a – z) and (A – Z), numbers (0 – 9), dashes ( - ), and underscores ( _ ).
    • You must enter a name that does not already exist on the account.
  4. Click Create. A new interface will appear.

    • To copy the API token, click Copy. You must enter this token each time that you call an API function, similar to a password.


      You cannot access the token after you navigate away from the interface. If you forget or misplace this token, you must revoke the token and then create a new one.

  5. Click Yes, I Saved My Token.


    • To create a new token, select the Create another token after I click Yes, I saved my token checkbox.

    • To return to the List API Tokens interface, deselect the Create another token after I click Yes, I saved my token checkbox.

Run API functions with the token


You must use the API token that you created in cPanel.

To call a UAPI or cPanel API 2 function with an API token, run the following command from the command line:

curl -H'Authorization: cpanel username:APITOKEN' ''

This example uses the following format:

usernameThe cPanel account's username.username
example.comYour cPanel server's domain.


Alternatively, you can enter your server's IP address.


The API module name.


The API function's name.

parameterThe function's input
valueThe value to assign to the input parameter.12345luggage

For example, your command may resemble the following example:

curl -H'Authorization: cpanel username:U7HMR63FHY282DQZ4H5BIH16JLYSO01M' ''

Additional documentation