Skip to content

cPanel UAPI (11.134.0.5)

UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.

Download OpenAPI description
Overview
Languages
Servers
Mock server

https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/

A server running cPanel.

https://{host}:{port}/execute/

API Token Management

API Development Tools / API Token Management

Operations
Operations

SSE Task Management

API Development Tools / SSE Task Management

Operations

URL Parsing

API Development Tools / URL Parsing

Operations

External Authentication

Authentication / External Authentication

Operations

Two-Factor Settings

Authentication / Two-Factor Settings

Operations

Block IP

Block Ip Addresses / Block IP

Operations

Market Integration

Commerce Integration / Market Integration

Operations

SSL Certificates

Commerce Integration / SSL Certificates

Operations

Contact Information

cPanel Account / Contact Information

Operations

Account Enhancements

The Account Enhancement module for UAPI.

Operations

Account Information

cPanel Account / Account Information

Operations

Account Management

cPanel Account / Account Management

Operations

Contact Information

cPanel Account / Contact Information

Operations

cPanel Features

cPanel Account / cPanel Features

Operations

Disk Quotas

cPanel Account / Disk Quotas

Operations

Personalization

The Personalization module for UAPI.

Operations

Resource Usage and Statistics

cPanel Account / Resource Usage and Statistics

Operations

Subaccount Management

cPanel Account / Subaccount Management

Operations

Team Roles

The Team Roles module for UAPI.

Operations

Team Users

The Team User module for UAPI.

Operations
Operations

File Restoration

cPanel Account Backups / File Restoration

Operations

Plugins

The Plugins module for UAPI.

Operations

Application Information

cPanel Theme Management / Application Information

Operations

Brand Management

cPanel Theme Management / Brand Management

Operations

Browser Cache Management

cPanel Theme Management / Browser Cache Management

Operations

Language

cPanel Theme Management / Language

Operations

Theme Settings

cPanel Theme Management / Theme Settings

Operations

Directory Indexes

Directory Management / Directory Indexes

Operations

Directory Privacy

Directory Management / Directory Privacy

Operations

Directory Protection

Directory Management / Directory Protection

Operations
Operations

DNS Information

DNS / DNS Information

Operations
Operations
Operations

Email DNS Settings

DNS / Email DNS Settings

Operations
Operations
Operations

Domain Information

Domain Management / Domain Information

Operations

Domain Redirection

Domain Management / Domain Redirection

Operations

SubDomain

The SubDomain module for UAPI.

Operations

Virtual Host Information

Domain Management / Virtual Host Information

Operations

Email Accounts

Email / Email Accounts

Operations

Email Filtering

Email / Email Filtering

Operations

Email Forwarding

Email / Email Forwarding

Operations

Email Server Information

Email / Email Server Information.

Operations

Email Suspensions

Email / Email Suspensions

Operations

Mail Server Information

Email / Mail Server Information

Operations

Mailbox Management

Email / Mailbox Management

Operations

Mailing Lists

Email / Mailing Lists

Operations

Signing and Encryption (GnuPG Keys)

Email / Signing and Encryption (GnuPG Keys)

Operations

Spam Filtering (Greylisting)

Email / Spam Filtering (Greylisting)

Operations

Spam Management

Email / Spam Management

Operations

Spam Prevention (BoxTrapper)

Email / Spam Prevention (BoxTrapper)

Operations

Webmail Applications

Email / Webmail Applications

Operations

Webmail Sessions

Email / Webmail Sessions

Operations

Request

Create a temporary session for a cPanel user to connect to Webmail.

Note:

The cPanel user must own the Webmail account.

How to use this API

After you successfully call this API, you will need to log in to Webmail. To do this, send an HTTP POST to https://$URL_AUTHTY:2096$token/login with a message body of session=$session where:

  • $URL_AUTHTY represents the value from the hostname return.
    • If the hostname return value is null, enter the hostname of the server that answered the API function.
    • $token represents the value from the token return.
  • $session represents the value of the session return.

For example, an HTTP POST may resemble the following:

https://hostname.example.com:2096/cpsess2462418786/login

With a message body of:

session=username:D7NiAZv1nf4bXeg9:CREATE_WEBMAIL_SESSION_FOR_MAIL_USER,728fb86a7df1cf20690c65f349ac3137

Security
BasicAuth
Query
domainstringrequired

The domain for the Webmail account.

Example: domain=example.com
loginstringrequired

The Webmail account's username.

Example: login=username
localestring

The locale that the new session will use.

Note:

  • You must only enter lowercase characters.
  • This parameter defaults to the cPanel user's locale.
Example: locale=en
remote_addressstring(ipv4)

The session's client IP address.

Note:

  • If you run this function from the command line, this parameter is required.
  • This parameter defaults to the API caller's IP address.
Example: remote_address=192.168.0.1
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Session/create_webmail_session_for_mail_user?domain=example.com&login=username&locale=en&remote_address=192.168.0.1'

Responses

HTTP Request was successful.

Bodyapplication/json
apiversioninteger

The version of the API.

Example: 3
funcstring

The name of the method called.

Example: "create_webmail_session_for_mail_user"
modulestring

The name of the module called.

Example: "Session"
resultobject
Response
application/json
{ "apiversion": 3, "func": "create_webmail_session_for_mail_user", "module": "Session", "result": { "data": {}, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }

Create Webmail session with credentials

Request

This function creates a temporary session with a password for the calling cPanel user to connect to Webmail.

Note:

  • The cPanel user must own the Webmail account.
  • This function works like the UAPI Session::create_webmail_session_for_mail_user function with one exception. This function requires a correct password to create the Webmail session. If you use an incorrect password or attempt to connect to a suspended account, the login will fail.

How to use this API

After you successfully call this API, you will need to log in to Webmail. To do this, send an HTTP POST to https://$URL_AUTHTY:2096$token/login with a message body of session=$session where:

  • $URL_AUTHTY represents the value from the hostname return.
    • If the hostname return value is null, enter the hostname of the server that answered the API function.
    • $token represents the value from the token return.
  • $session represents the value of the session return.

For example, an HTTP POST may resemble the following:

https://hostname.example.com:2096/cpsess2462418786/login

With a message body of:

session=username:D7NiAZv1nf4bXeg9:CREATE_WEBMAIL_SESSION_FOR_MAIL_USER,728fb86a7df1cf20690c65f349ac3137

Security
BasicAuth
Query
domainstringrequired

The domain for the Webmail account.

Example: domain=example.com
loginstringrequired

The Webmail account's username.

Example: login=username
passwordstringrequired

The password for the Webmail account.

Example: password=luggage12345
localestring

The locale that the new session will use.

Note:

  • You must only enter lowercase characters.
  • This parameter defaults to the cPanel user's locale.
Example: locale=en
remote_addressstring(ipv4)

The session's account's client IP address.

Note:

  • If you run this function from the command line, this parameter is required.
  • This parameter defaults to the API caller's IP address.
Example: remote_address=192.168.0.1
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Session/create_webmail_session_for_mail_user_check_password?domain=example.com&login=username&password=luggage12345&locale=en&remote_address=192.168.0.1'

Responses

HTTP Request was successful.

Bodyapplication/json
apiversioninteger

The version of the API.

Example: 3
funcstring

The name of the method called.

Example: "create_webmail_session_for_mail_user_check_password"
modulestring

The name of the module called.

Example: "Session"
resultobject
Response
application/json
{ "apiversion": 3, "func": "create_webmail_session_for_mail_user_check_password", "module": "Session", "result": { "data": {}, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }

Create Webmail session for current user

Request

Create a temporary session to connect to Webmail for the authenticated cPanel user.

How to use this API

After you successfully call this API, you will need to log in to Webmail. To do this, send an HTTP POST to https://$URL_AUTHTY:2096$token/login with a message body of session=$session where:

  • $URL_AUTHTY represents the value from the hostname return.
    • If the hostname return value is null, enter the hostname of the server that answered the API function.
    • $token represents the value from the token return.
  • $session represents the value of the session return.

For example, an HTTP POST may resemble the following:

https://hostname.example.com:2096/cpsess2462418786/login

With a message body of:

session=username:D7NiAZv1nf4bXeg9:CREATE_WEBMAIL_SESSION_FOR_MAIL_USER,728fb86a7df1cf20690c65f349ac3137

Security
BasicAuth
Query
localestring

The locale that the new session will use.

Use UAPI Locale::list_locales to see a list of valid locales.

Note:

  • You must only enter lowercase characters.
  • This parameter defaults to the cPanel user's locale.
Example: locale=en
remote_addressstring(ipv4)

The session's client IP address.

Note:

  • If you run this function from the command line, this parameter is required.
  • This parameter defaults to the API caller's IP address.
Example: remote_address=192.168.0.1
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Session/create_webmail_session_for_self?locale=en&remote_address=192.168.0.1'

Responses

HTTP Request was successful.

Bodyapplication/json
apiversioninteger

The version of the API.

Example: 3
funcstring

The name of the method called.

Example: "create_webmail_session_for_self"
modulestring

The name of the module called.

Example: "Session"
resultobject
Response
application/json
{ "apiversion": 3, "func": "create_webmail_session_for_self", "module": "Session", "result": { "data": {}, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Operations

FTP Server Settings

Files / FTP Server Settings

Operations
Operations
Operations

WebDisk Settings

Files / WebDisk Settings

Operations

Deployment Settings

GIT Management / Deployment Settings

Operations

Repository Management

GIT Management / Repository Management

Operations

InProductSurvey

The InProductSurvey module for cPanel UAPI.

Operations

Database Information

MySQL and MariaDB / Database Information

Operations

Database Management

MySQL and MariaDB / Database Management

Operations

Remote Databases

MySQL and MariaDB / Remote Databases

Operations

User Management

MySQL and MariaDB / User Management

Operations

Pushbullet

The Pushbullet module for UAPI.

Operations

Antivirus Protection (ClamAV)

Optional Applications / Antivirus Protection (ClamAV)

Operations

Calendar and Contacts (DAV)

Optional Applications / Calendar and Contacts (DAV)

Operations

Calendar and Contacts Server

Optional Applications / Calendar and Contacts Server

Operations

cPanel Addons (cPAddons)

Optional Applications / cPanel Addons (cPAddons)

Operations

WordPress Manager Backups

Optional Applications / WordPress Manager Backups

Operations

WordPress Manager Settings

Optional Applications / WordPress Manager Settings

Operations

PostgreSQL Database Management

PostgreSQL / Database Management

Operations

PostgreSQL User Management

PostgreSQL / User Management

Operations

Bandwidth

The Bandwidth module for UAPI.

Operations

Known SSH Hosts Management

Security / Known SSH Hosts Management

Operations

Login Information

Security / Login Information

Operations

cPanel Server Information

Server Information / cPanel Server Information

Operations

Notifications

The Notifications module for UAPI.

Operations

Password Strength

Server Information / Password Strength

Operations
Operations

ServiceProxy

The ServiceProxy module for UAPI.

Operations

SiteQuality

The SiteQuality module for UAPI.

Operations

Auto-generated SSL Certificates

SSL Certificates / Auto-generated SSL Certificates

Operations

cPanel Account SSL Management

SSL Certificates / cPanel Account SSL Management

Operations

SNI Email Settings

SSL Certificates / SNI Email Settings

Operations

SSL Certificate Management

SSL Certificates / SSL Certificate Management

Operations

Verify Domain Ownership

SSL Certificates / Verify Domain Ownership

Operations

Domain Statistics

Statistics / Domain Statistics

Operations

Weblog Settings

Statistics / Weblog Settings

Operations

UserData

The UserData module for cPanel UAPI.

Operations
Operations
Operations

Application Manager

Web Server Management / Application Manager

Operations

ModSecurity

The ModSecurity module for UAPI.

Operations

NginxCaching

The NginxCaching module for UAPI.

Operations

PHP Settings

Web Server Management / PHP Settings

Operations

Handler Management

Website Configuration / Handler Management

Operations
Operations

Mime Type Management

Website Configuration / Mime Type Management

Operations

Site Information

Website Configuration / Site Information

Operations

Site Installation

Website Configuration / Site Installation

Operations

Site Publisher Management

Website Configuration / Site Publisher Management

Operations

Sitejet

The Sitejet module for UAPI.

Operations