This function deletes a user who can access a protected directory on the cPanel account.
uapi --output=jsonpretty \ --user=username \ DirectoryPrivacy \ delete_user \ dir='/home/example/example.com' \ user='example1'
{- "apiversion": 3,
- "func": "delete_user",
- "module": "DirectoryPrivacy",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}