---
title: "Delete a site backup in Site Factory"
date: "2025-04-18T10:57:18+00:00"
summary:
image:
type: "article"
url: "/site-factory/help/92551-delete-site-backup-site-factory"
id: "ae45d3f1-3124-4dad-ad8c-81cb449f98dc"
---

To delete a site backup in your Site factory, you need to call an  v1 REST API endpoint: [**DELETE /api/v1/sites/{site\_id}/backups/{backup\_id}**](https://docs.acquia.com/site-factory/site-factory-api#operation/delete_Sites_deleteSiteBackup)

Check your API access
---------------------

*   Get your API key.

Each of the Site Factory API calls requires you to enter your Site Factory username and API key to either complete the action or to return results. To obtain your API key, complete the following steps:

1.  [Sign in](https://docs.acquia.com/site-factory/manage/login/) to your Site Factory Management Console using an account with the [platform admin](/node/57315) role.
2.  In the admin menu, click your username.
3.  Click the **API key** tab.

Site Factory displays your API key. Due to the key being required for use by the different Site Factory API calls, save the key to a text file or some other secure location.

*   Check your Acquia Cloud Platform permissions for accessing API endpoints.

To view all documentation endpoints in the Site Factory API, you must first sign in to your Site Factory Management Console as a user with either the developer or release engineer role.

*   Test your connection with your Site Factory.

1.  Open a command prompt, and then enter the following command:
    
        curl 'https://[site_URL]/api/v1/ping' -u [user_name]:[api_key]
    
    Where:
    
    *   `[site URL]` is the URL of your Site Factory Management Console.
    *   `[user_name]` is your Site Factory Management Console user account name.
    *   `[api_key]` is your user account's API key from the Site Factory Management Console.
2.  Verify that the API call returns results similar to the following:
    
        {"message":"pong","server_time":"2014-11-18T13:44:57+00:00"}
    

Call the endpoint
-----------------

To call the endpoint you need the:

*   site\_id
*   backup\_id

You can call \`GET /api/v1/sites\` and \`GET /api/v1/sites/{site\_id}/backups\` endpoints but it's easier to get both just by looking at the site backup page, and hovering the Download link.  
 

![Site Factory Delete Backup](https://acquia.widen.net/content/csognjknoz/web/ka0Pb000000DVAr00N6g00000VCdgi0EM6g000002WgHF.png?v=0ce2b46c-833f-4518-b589-7a56b7ece489)

In this example the **site\_id** is 2296 and the **backup\_id** is 401

    curl 'https://[site_URL]/api/v1/sites/[site_id]/backups/[backup_id]' -X DELETE -H Content-Type: application/json -v -u username:apikey

The response is a task id. 

    {
      "task_id": 16
    }