---
title: "Delete one or more website backups"
method: POST
path: "/WebsiteBackup/delete_backup"
tags: ["WebsiteBackup"]
---

# Delete one or more website backups

`POST /WebsiteBackup/delete_backup`

## Request

- Base URL: `https://cpanel-server.tld:2083/execute`
- URL: `https://cpanel-server.tld:2083/execute/WebsiteBackup/delete_backup`
- Auth: HTTP basic

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.

## Request body `application/x-www-form-urlencoded`

- object
  - `ids` string[], 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.

## Response `200`

HTTP Request was successful.

- object
  - `apiversion` integer: The version of the API.
  - `func` string: The name of the method called.
  - `module` string: The name of the module called.
  - `result` object
    - `data` object[]: One row per **non-empty** requested id. **Note:** * The function discards empty `ids` values before processing and they produce no row, so a client must match rows to requests by the `id` return value, never by position. * Ordering is not guaranteed. Because `data` is an array of hashes, UAPI's `api.sort_*` and `api.paginate_*` parameters can reorder or truncate it.
      - `error` string: Why this id could not be deleted. Absent when the `ok` return value is `1`. **Note:** The cause is a malformed id, an id with no manifest on disk, a system-created backup, which is not user-deletable, or the underlying filesystem error.
      - `id` string: The requested backup id this row reports on.
      - `ok` 1 | 0: Outcome for this id. * `1` - The function deleted the archive and its manifest. * `0` - The delete failed. See the `error` return value.
    - `errors` string[], nullable: List of errors if the API failed.
    - `messages` string[], nullable: List of messages generated by the API.
    - `metadata` object
      - `transformed` 1: Post-processing may have transformed the data.
    - `status` 0 | 1: * `1` - Success. * `0` - Failed. Check the `errors` field for more details.
    - `warnings` string[], nullable: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running an API.

## Changes

- **2026-09-12** `99adb57e7a5d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cpanel/apis/cpanel-uapi/changes/WebsiteBackup/delete_backup/post.md)

---

[API](https://skmtc.dev/cpanel/apis/cpanel-uapi.md) - [All operations](https://skmtc.dev/cpanel/apis/cpanel-uapi/llms.txt) - [OpenAPI document](https://skmtc.dev/cpanel/apis/cpanel-uapi/revisions/05239220da37?raw)
