v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
Ftp
FTP Accounts

Create FTP account

This function creates an FTP account.

Important:

When you disable the FTP role, the system disables this function.

get/Ftp/add_ftp

Query parameters

userstring required
Example:username

The new FTP account username.

disallowdot0 | 1
Example:1

Whether to strip dots (.) from the username.

  • 1 — Strip dots.
  • 0 — Do not strip dots.
domainstring domain
Example:example.com

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.

homedirstring path
Example:exampleftp

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.

passstring
Example:123456luggage

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.

pass_hashstring
Example:$6$1sOyHP5ZDYp3pGUz$R0TSgfPRHfDjT5PP5RJGv39FhiGTNNPvM7IFpCBjXijMmlMZk9yI8T3LqGuntc9fdKb5eX.lGL7wBS9e4DAWn/

The account's password hash.

Note:

  • You can use this parameter in place of the pass parameter. However, you cannot use both the pass and pass_hash parameters in the same request.
  • You can find your server's password hash type in the /etc/sysconfig/authconfig file.
quotainteger
Example:42

The FTP account's maximum disk usage quota, in megabytes (MB).

Note:

A value of 0 grants the FTP account unlimited disk space.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "add_ftp",
  "module": "Ftp",
  "result": {
    "status": 1
  }
}