title: API Shell for cPanel
created at: Thu Oct 24 2024 12:17:42 GMT+0000 (Coordinated Universal Time)
updated at: Sat Feb 08 2025 14:22:44 GMT+0000 (Coordinated Universal Time)
---
# API Shell for cPanel
# Overview
This interface allows you to run cPanel API functions interactively.
> \[!WARNING]
> Important
> This interface is **only** available to reseller accounts.
> Only [cPanel API 2](https://documentation.cpanel.net/display/DD/Guide+to+cPanel+API+2) and [UAPI](https://api.docs.cpanel.net/cpanel/introduction/) functions are available in the *API Shell* interface.
> \[!CAUTION]
> Warning
> This feature uses **live** data from your server. API function calls may change or delete data on your server, which can cause your server to fail.
> Read the documentation for a function **thoroughly** before you use it in the *API Shell* interface.
> To see an example of the function’s output, read the function’s *Response samples* section in our [cPanel Developer Documentation](https://api.docs.cpanel.net/cpanel/introduction/) .
## Enable the API Shell interface.
To use this feature, your hosting provider must enable it for you. Ask them to perform the following steps in WHM:
1. Select *On* for the *cPanel & WHM API shell (for developers)* setting in the *System* tab of WHM’s [*Tweak Settings*](https://docs.cpanel.net/whm/server-configuration/tweak-settings#system) interface (*WHM » Home » Server Configuration » Tweak Settings*).
2. Grant the *API Shell* feature to your account’s feature list in WHM’s [*Feature Manager*](https://docs.cpanel.net/whm/packages/feature-manager) interface (*WHM » Home » Packages » Feature Manager*).
# Call an API function.
To call an API function, perform the following steps:
1. Select either the [*UAPI (API 3)*](https://api.docs.cpanel.net/cpanel/introduction/) or [*API 2*](https://documentation.cpanel.net/display/DD/Guide+to+cPanel+API+2) option in the *cPanel API version* section.
2. Select the API function from the selected API version’s menu.
3. In the *Variables* section, enter the API function’s keys and values in the text boxes. If the API function has any required key and value pairs, you **must** enter them.
* To add a new variable entry, click *Add*.
* To remove a variable entry, click the *X* icon.
4. To filter, sort, or paginate the results, click *Show Sort/Filter/Paginate Options*.
* To select the first record to show from the results, enter a number in the *Index of first results to show, zero-based* text box, or use the menu to select a number.
* A `0` Value displays unlimited results.
* To limit the number of results to display, enter a number in the *Maximum # of results to show* text box or use the menu to select a number.
* A `0` Value displays unlimited results.
* To filter the results, click *Add* in the *Filters* section of the interface. You can specify the field to use to filter the results, the conditions (*Contains*, *Begins With*, *Equals*, *Greater Than (numeric)*, or *Less Than (numeric)*), and the term to apply to the conditions.
* To add a new filter, click *Add*.
* To remove a filter, click the *X* icon.
* To sort the results, click *Add* in the *Sorts* section of the interface. You can specify a field by which you wish to sort the results, the conditions (*lexicographic*, *numeric*, *numeric\_zero\_as\_max*, or *ipv4*), and whether to reverse the sort order.
* To add a new sort method, click *Add*.
* To remove a sort order, click the *X* icon.
* To limit the columns to display, click *Add* in the *Columns* section of the interface. Then, enter the column number in the *Column* text box.
* To add more columns to display, click *Add*.
* To remove a column, click the *X* icon.
5. Click *Submit*.
As you modify the API function’s values, the interface updates the *URL* and *API call data structure* sections’ entries.
# API call response
After you click *Submit*, the API function’s returns appear in the *API call response* section of the interface. You can view the results in the *Tree view*, *Table view*, and *Raw view* tabs.
> \[!NOTE]
> Note
> The *Raw view* tab separates the API call’s response from the HTTP headers.
> The *Table view* may be unavailable for certain function data.