> 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 site backups

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

Re-queues failed backups. The server already retries a failed copy on its own up to four times during its first day, so retry by hand only when the user asks.

Body parameters:
- `backups` (integer array, required): exact backup ids, 1 to 50, from the listing with `filter[phase][]=failed`.

Answers **202** with the re-queued `site-backups` documents and `meta.skipped`, each row with `site_id`, `site_name`, `backup_id`, `reason_code` and `message`: `UNSUPPORTED` (the copy is not in phase `failed`), `SITE_UNREACHABLE` (website not connected), `CONFLICT` (another backup or a restoration running on that website), `PERMISSION_DENIED` (id outside the token's reach). Follow the result with `GET /site-backups?filter[id][]=...` and read `phase`.

- **409**: the storage quota is exhausted and no overage add-on is active - nothing is retried.
- **422**: `backups` missing, empty, over 50 ids, or containing an id that resolves to no row.
- **403**: a read-only token.

The MCP twin is the `site-backups-retry` tool.

Reference: https://api.docs.modulards.com/modular-ds-public-api/site-backups/retry-site-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 object, optional)
  - `attributes` (object, optional)
    - `attempts` (double, optional)
    - `backup_type` (string, optional)
    - `comment` (any, optional, nullable)
    - `created_at` (string, optional)
    - `is_favorite` (boolean, optional)
    - `method` (string, optional)
    - `phase` (string, optional)
    - `restored_at` (any, optional, nullable)
    - `site_id` (double, optional)
    - `size` (double, optional)
    - `status` (string, optional)
    - `updated_at` (string, optional)
  - `id` (string, optional)
  - `links` (object, optional)
    - `self` (string, optional)
  - `type` (string, optional)
- `jsonapi` (object, optional)
  - `version` (string, optional)
- `meta` (object, optional)
  - `skipped` (list of object, optional)
    - `backup_id` (double, optional)
    - `message` (string, optional)
    - `reason_code` (string, optional)
    - `site_id` (double, optional)
    - `site_name` (string, optional)

## Examples

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

**Request**

```json
undefined
```

**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 site 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 site 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 site 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 site 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 site 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 site 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 site 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 site 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 site 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()
```