> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api.docs.modulards.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.docs.modulards.com/_mcp/server.

# Retry failed backups

POST https://api.modulards.com/api/public/v1/site-backups/retry
Content-Type: application/json

Queues failed backups again. The server already retries a failed backup on its own, up to 3 times, within 24 hours of its creation, so a manual retry is rarely needed within that time.

Follow the retried backups with "List backups" (`filter[id][]`) and read `phase`. The work finishes later: see [Writes and asynchronous operations](https://api.docs.modulards.com/writes-and-asynchronous-operations). Backups that cannot be retried are reported in `meta.skipped`, each with a `reason_code` and a message, and do not fail the call: `UNSUPPORTED` (the backup is not in phase `failed`), `SITE_UNREACHABLE` (website not connected), `CONFLICT` (another backup or a restoration is running on that website) and `PERMISSION_DENIED` (a backup your token cannot reach).

**Body**
- `backups` (array of integers, required): ids of the backups to retry, 1 to 50, from "List backups" with `filter[phase][]=failed`.

**Errors**
- **409**: the storage quota is exhausted and no overage add-on is active. Nothing is retried.
- **422**: `backups` is missing, empty, has more than 50 ids or contains an id that is not a backup.

Reference: https://api.docs.modulards.com/modular-ds-public-api/backups/website-backups/retry-failed-backups

## Authentication

- `Authorization` header (bearer token, required) — Personal access token created in the Modular DS dashboard; read-only tokens can only call GET endpoints.

## Request

### Body (application/json)

This endpoint expects an object.

- `backups` (list of double, optional)

## Response

### 202

202 Accepted - one copy re-queued, one skipped

- `data` (list of ApiPublicV1SiteBackupsRetryPostResponsesContentApplicationJsonSchemaDataItems, optional)
- `jsonapi` (ApiPublicV1SiteBackupsRetryPostResponsesContentApplicationJsonSchemaJsonapi, optional)
- `meta` (ApiPublicV1SiteBackupsRetryPostResponsesContentApplicationJsonSchemaMeta, optional)

## Types

### ApiPublicV1SiteBackupsRetryPostResponsesContentApplicationJsonSchemaDataItems

- `attributes` (ApiPublicV1SiteBackupsRetryPostResponsesContentApplicationJsonSchemaDataItemsAttributes, optional)
- `id` (string, optional)
- `links` (ApiPublicV1SiteBackupsRetryPostResponsesContentApplicationJsonSchemaDataItemsLinks, optional)
- `type` (string, optional)

### ApiPublicV1SiteBackupsRetryPostResponsesContentApplicationJsonSchemaJsonapi

- `version` (string, optional)

### ApiPublicV1SiteBackupsRetryPostResponsesContentApplicationJsonSchemaMeta

- `skipped` (list of ApiPublicV1SiteBackupsRetryPostResponsesContentApplicationJsonSchemaMetaSkippedItems, optional)

### ApiPublicV1SiteBackupsRetryPostResponsesContentApplicationJsonSchemaDataItemsAttributes

- `attempts` (integer, optional) — Number of attempts made: 1 for the first run, plus one for each retry. A failed or stalled backup is retried automatically, up to 3 times (4 attempts in all), within 24 hours of its creation; after that it stays failed and reads 4.
- `backup_type` (enum, optional) — full or incremental.
  - Allowed values: `full`, `incremental`
- `comment` (string, optional, nullable) — Note written on the backup.
- `created_at` (string, optional)
- `is_favorite` (boolean, optional) — True for a master backup, kept out of the retention policy.
- `method` (enum, optional) — How the backup started: manual, or automatic for scheduled ones. force_first is the first automatic backup of a website.
  - Allowed values: `manual`, `automatic`, `force_first`
- `phase` (enum, optional) — State to read: in_progress while it runs, done for a usable backup, failed when it did not complete.
  - Allowed values: `in_progress`, `done`, `failed`, `excluded`
- `restored_at` (datetime, optional, nullable) — When the backup was last restored; null if it never was.
- `site_id` (integer, optional) — Id of the website the backup belongs to.
- `size` (integer, optional) — Size of the backup, in bytes.
- `status` (string, optional) — Raw processing step behind phase.
- `updated_at` (string, optional)

### ApiPublicV1SiteBackupsRetryPostResponsesContentApplicationJsonSchemaDataItemsLinks

- `self` (string, optional)

### ApiPublicV1SiteBackupsRetryPostResponsesContentApplicationJsonSchemaMetaSkippedItems

- `backup_id` (integer, optional, nullable) — Id of the backup that was not retried.
- `message` (string, optional) — Human-readable explanation.
- `reason_code` (enum, optional) — Why it was refused: UNSUPPORTED, SITE_UNREACHABLE, CONFLICT or PERMISSION_DENIED.
  - Allowed values: `UNSUPPORTED`, `SITE_UNREACHABLE`, `CONFLICT`, `PERMISSION_DENIED`
- `site_id` (integer, optional) — Id of a website that was refused.
- `site_name` (string, optional, nullable) — Name of that website; null when the id is outside your token's reach.

## Examples

### 202 Accepted - one copy re-queued, one skipped

**Response**

```json
{
  "data": [
    {
      "attributes": {
        "attempts": 1,
        "backup_type": "full",
        "comment": null,
        "created_at": "2026-09-14T15:00:00.000000Z",
        "is_favorite": false,
        "method": "manual",
        "phase": "failed",
        "restored_at": null,
        "site_id": 12,
        "size": 0,
        "status": "failed",
        "updated_at": "2026-09-14T16:05:00.000000Z"
      },
      "id": "9001",
      "links": {
        "self": "{{base_url}}/api/public/v1/site-backups/9001"
      },
      "type": "site-backups"
    }
  ],
  "jsonapi": {
    "version": "1.1"
  },
  "meta": {
    "skipped": [
      {
        "backup_id": 9002,
        "message": "Only a failed backup can be retried.",
        "reason_code": "UNSUPPORTED",
        "site_id": 12,
        "site_name": "Shop"
      }
    ]
  }
}
```

**SDK Code**

```python 202 Accepted - one copy re-queued, one skipped
import requests

url = "https://api.modulards.com/api/public/v1/site-backups/retry"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript 202 Accepted - one copy re-queued, one skipped
const url = 'https://api.modulards.com/api/public/v1/site-backups/retry';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go 202 Accepted - one copy re-queued, one skipped
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.modulards.com/api/public/v1/site-backups/retry"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby 202 Accepted - one copy re-queued, one skipped
require 'uri'
require 'net/http'

url = URI("https://api.modulards.com/api/public/v1/site-backups/retry")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java 202 Accepted - one copy re-queued, one skipped
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.modulards.com/api/public/v1/site-backups/retry")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php 202 Accepted - one copy re-queued, one skipped
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.modulards.com/api/public/v1/site-backups/retry', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp 202 Accepted - one copy re-queued, one skipped
using RestSharp;

var client = new RestClient("https://api.modulards.com/api/public/v1/site-backups/retry");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift 202 Accepted - one copy re-queued, one skipped
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.modulards.com/api/public/v1/site-backups/retry")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Retry failed backups

**Request**

```json
{
  "backups": [
    9001,
    9002
  ]
}
```

**Response**

```json
{
  "data": [
    {
      "attributes": {
        "attempts": 1,
        "backup_type": "full",
        "comment": null,
        "created_at": "2026-09-14T15:00:00.000000Z",
        "is_favorite": false,
        "method": "manual",
        "phase": "failed",
        "restored_at": null,
        "site_id": 12,
        "size": 0,
        "status": "failed",
        "updated_at": "2026-09-14T16:05:00.000000Z"
      },
      "id": "9001",
      "links": {
        "self": "{{base_url}}/api/public/v1/site-backups/9001"
      },
      "type": "site-backups"
    }
  ],
  "jsonapi": {
    "version": "1.1"
  },
  "meta": {
    "skipped": [
      {
        "backup_id": 9002,
        "message": "Only a failed backup can be retried.",
        "reason_code": "UNSUPPORTED",
        "site_id": 12,
        "site_name": "Shop"
      }
    ]
  }
}
```

**SDK Code**

```python Retry failed backups
import requests

url = "https://api.modulards.com/api/public/v1/site-backups/retry"

payload = { "backups": [9001, 9002] }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Retry failed backups
const url = 'https://api.modulards.com/api/public/v1/site-backups/retry';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"backups":[9001,9002]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Retry failed backups
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.modulards.com/api/public/v1/site-backups/retry"

	payload := strings.NewReader("{\n  \"backups\": [\n    9001,\n    9002\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Retry failed backups
require 'uri'
require 'net/http'

url = URI("https://api.modulards.com/api/public/v1/site-backups/retry")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"backups\": [\n    9001,\n    9002\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Retry failed backups
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.modulards.com/api/public/v1/site-backups/retry")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"backups\": [\n    9001,\n    9002\n  ]\n}")
  .asString();
```

```php Retry failed backups
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.modulards.com/api/public/v1/site-backups/retry', [
  'body' => '{
  "backups": [
    9001,
    9002
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Retry failed backups
using RestSharp;

var client = new RestClient("https://api.modulards.com/api/public/v1/site-backups/retry");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"backups\": [\n    9001,\n    9002\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Retry failed backups
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["backups": [9001, 9002]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.modulards.com/api/public/v1/site-backups/retry")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```