v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
DirectoryPrivacy
Directory Privacy

Add authorized user for protected directory

This function adds a user who can access a protected directory on the cPanel account.

get/DirectoryPrivacy/add_user

Query parameters

dirstring path required
Example:/home/example/example.com

The directory to add users to.

passwordstring required
Example:123456luggage

The password for the user.

userstring required
Example:example1

The username of the user who can access the directory.

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