WebsiteBackup

Delete one or more website backups

Changed on

This function deletes the named website backups, removing each archive and its sidecar manifest.

Note:

  • This is a synchronous delete. It starts no operation and nothing needs polling.
  • The call returns one row per requested id rather than failing as a whole, so a partially successful batch reports each outcome individually.
  • The call itself fails only when the whole batch is unusable, meaning the ids parameter carried no non-empty value at all.
  • This function returns an array, so UAPI's generic api.filter_*, api.sort_* and api.paginate_* parameters apply, and a caller-supplied sort replaces the default ordering of the data return value.
  • This function requires the account's backup feature and is unavailable to demo (shared) accounts.
post/WebsiteBackup/delete_backup

Request

  • Base URL
    https://cpanel-server.tld:2083/execute
  • Auth
    HTTP basic

Request body application/x-www-form-urlencoded

idsstring[] required

Identifier of a backup to delete, as returned by the WebsiteBackup::list_backups function.

Note: This parameter is repeatable and at least one non-empty value is required.

Example request

{
  "ids": [
    "example.com-2026.08.18_12-53-12",
    "example.com-2026.08.11_09-04-55"
  ]
}

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": "delete_backup",
  "module": "WebsiteBackup",
  "result": {
    "data": [
      {
        "error": "The backup does not exist.",
        "id": "example.com-2026.08.18_12-53-12",
        "ok": 1
      }
    ],
    "metadata": {
      "transformed": 1
    },
    "status": 1
  }
}

Changes