UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/
https://{host}:{port}/execute/
Request
This function creates an FTP account.
Important:
When you disable the FTP role, the system disables this function.
Whether to strip dots (.) from the username.
1— Strip dots.0— Do not strip dots.
The FTP user's associated domain. This must be a domain that the cPanel account owns.
Note:
This parameter defaults to the cPanel account's primary domain.
The path to the FTP account's root directory, relative to the cPanel account's home directory. If you don't set this, it defaults to a directory with the same name as the FTP account.
The new FTP account password.
Note:
You can use the pass_hash parameter in place of this parameter. However, you cannot use both the pass and pass_hash parameters in the same request.
The account's password hash.
Note:
- You can use this parameter in place of the
passparameter. However, you cannot use both thepassandpass_hashparameters in the same request. - You can find your server's password hash type in the
/etc/sysconfig/authconfigfile.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Ftp/add_ftp
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Ftp/add_ftp
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Ftp/add_ftp?user=username&disallowdot=1&domain=example.com&homedir=exampleftp&pass=123456luggage&pass_hash=%246%241sOyHP5ZDYp3pGUz%24R0TSgfPRHfDjT5PP5RJGv39FhiGTNNPvM7IFpCBjXijMmlMZk9yI8T3LqGuntc9fdKb5eX.lGL7wBS9e4DAWn%2F"a=42'{ "apiversion": 3, "func": "add_ftp", "module": "Ftp", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function deletes an FTP account.
Important:
When you disable the FTP role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Ftp/delete_ftp
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Ftp/delete_ftp
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Ftp/delete_ftp?user=username&destroy=1&domain=example.com'{ "apiversion": 3, "func": "delete_ftp", "module": "Ftp", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Ftp/ftp_exists
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Ftp/ftp_exists
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Ftp/ftp_exists?user=us_chickens&domain=example.com'{ "apiversion": 3, "func": "ftp_exists", "module": "Ftp", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }