Enable or disable legacy backups

This function enables or disables legacy backups for a user.

SecurityBasicAuth
Request
query Parameters
user
required
string <username>

The cPanel account's username.

Example: user=username
legacy
integer
Default: 0

Whether the account should use the legacy backup system.

  • 1 - Use the legacy backup system.
  • 0 - Use the standard backup system.
Enum: 0 1
Example: legacy=0
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/toggle_user_backup_state
Request samples
whmapi1 --output=jsonpretty \
  toggle_user_backup_state \
  user='username'
Response samples
application/json
{
  • "data": {
    • "toggle_status": 0
    },
  • "metadata": {
    • "command": "toggle_user_backup_state",
    • "reason": "Backup state modified",
    • "result": 1,
    • "version": 1
    }
}