Delete FTP account

This function deletes an FTP account.

Important:

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

SecurityBasicAuth
Request
query Parameters
user
required
string

The FTP account's username.

Example: user=username
destroy
integer
Default: 0

Whether to delete the FTP account's home directory.

  • 1 — Delete the home directory.
  • 0 — Do not delete the home directory.
Enum: 0 1
Example: destroy=1
domain
string <domain>

The user's associated domain.

Note:

This parameter defaults to the cPanel account's primary domain.

Example: domain=example.com
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/Ftp/delete_ftp
Request samples
uapi --output=jsonpretty \
  --user=username \
  Ftp \
  delete_ftp \
  user='username2'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "delete_ftp",
  • "module": "Ftp",
  • "result": {
    • "data": null,
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}