v1

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

Update FTP account's home directory

This function changes the home directory for FTP accounts.

Important:

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

get/Ftp/set_homedir

Query parameters

userstring required
Example:example1

The FTP account username.

domainstring domain
Example:example.com

The user's associated domain.

Note:

The default value is the cPanel account's primary domain.

homedirstring path
Example:example1/

The FTP account's home directory

Note:

This parameter defaults to the user@domain subdirectory in the cPanel account's home directory with the name, where user and domain represent the user and domain parameters.

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": "set_homedir",
  "module": "Ftp",
  "result": {
    "status": 1
  }
}