# List restore batches

`GET /api/v1/restore-batches`

Newest first, 15 per page, each with its per-account counts.

Guides: [Restore many accounts at once](/docs/restores/bulk-restore)

## Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| server_id | integer | no | Only batches on this server. Example: `12`. |
| status | string | no | Only batches in this status: `running`, `stopping`, `completed`, `completed_with_failures` or `stopped`. Example: `completed_with_failures`. |
| page | integer | no | The page to return. Pages hold 15 items. Default: `1`. Example: `2`. |

## Response

### 200

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| data | object[] | yes |  |
| data.id | integer | yes |  |
| data.server_id | integer | yes |  |
| data.status | string | yes | `running` while accounts are restored, `stopping` while the restore in progress finishes after a stop; then `completed`, `completed_with_failures` or `stopped`. One of: `running`, `stopping`, `completed`, `completed_with_failures`, `stopped`. |
| data.status_label | string | yes | One of: `Running`, `Stopping`, `Completed`, `Completed with failures`, `Stopped`. |
| data.choices | object | yes | The choices applied to every account. `database_mode` is `per_account` when it was left out with settings applied: then `database_modes` gives each account's mode (`overwrite` for an account missing from the server at the last sync when the batch was created, `new` for the others), keyed by hosting account id; it is an empty list `[]` otherwise. |
| data.choices.components | string[] | yes | One of: `settings`, `files`, `databases`, `mail`. |
| data.choices.apply_settings | boolean | yes |  |
| data.choices.rollback_live | boolean | yes |  |
| data.choices.database_mode | string | yes | One of: `new`, `overwrite`, `per_account`. |
| data.choices.database_modes | object | yes |  |
| data.choices.mail_overwrite | boolean | yes |  |
| data.as_of | string · date-time | yes | Each account is restored from its newest backup at or before this moment; null for its newest backup. Nullable. |
| data.accounts | object | yes | What happened to each account, counted per account: an account restored one component at a time counts once. |
| data.accounts.restored | integer | yes |  |
| data.accounts.restored_with_warnings | integer | yes |  |
| data.accounts.failed | integer | yes |  |
| data.accounts.skipped | integer | yes |  |
| data.accounts.cancelled | integer | yes |  |
| data.accounts.left | integer | yes |  |
| data.accounts.total | integer | yes |  |
| data.initiated_by_user_id | integer | yes | The user who started the batch. Nullable. |
| data.retry_of_batch_id | integer | yes | The ended batch whose failed accounts this one restores again; null for a first batch. Nullable. |
| data.stop_reason | string | yes | Why the batch was stopped: `Stopped by a user` (a stop from the panel or the API) or `Client suspended`; null unless it was stopped. Nullable. |
| data.stop_requested_at | string · date-time | yes | When the stop was asked for; null unless the batch was stopped. Nullable. |
| data.started_at | string · date-time | yes | Nullable. |
| data.finished_at | string · date-time | yes | When the batch ended; null while it is running or stopping. Nullable. |
| data.items | object[] | no |  |
| data.items.position | integer | yes | The item's place in the batch, from 1. Items run in this order. |
| data.items.hosting_account_id | integer | yes | The account restored; null once the account was deleted. Nullable. |
| data.items.domain_name | string | yes | The account's domain; null once the account was deleted. Nullable. |
| data.items.component | string | yes | The one component this item restores when the plan keeps one backup per component; null when the backup holds them all. Nullable. One of: `settings`, `files`, `databases`, `mail`, `null`. |
| data.items.backup_artifact_id | integer | yes | The backup restored; null once it was deleted. Nullable. |
| data.items.backup_run_id | integer | yes | The restore run of this item, once it was queued; null before. Nullable. |
| data.items.status | string | yes | One of: `pending`, `running`, `completed`, `failed`, `skipped`, `cancelled`. |
| data.items.status_label | string | yes | One of: `Pending`, `Running`, `Completed`, `Failed`, `Skipped`, `Cancelled`. |
| data.items.reason | string | yes | Why the item failed or was skipped, or what a restore that completed only in part left out; null otherwise. Nullable. |
| data.created_at | string · date-time | yes | Nullable. |
| data.updated_at | string · date-time | yes | Nullable. |
| links | object | yes |  |
| links.first | string | yes | Nullable. |
| links.last | string | yes | Nullable. |
| links.prev | string | yes | Nullable. |
| links.next | string | yes | Nullable. |
| meta | object | yes |  |
| meta.current_page | integer | yes |  |
| meta.from | integer | yes | Nullable. |
| meta.last_page | integer | yes |  |
| meta.links | object[] | yes | Generated paginator links. |
| meta.links.url | string | yes | Nullable. |
| meta.links.label | string | yes |  |
| meta.links.page | integer | no | The page the link opens; null on a previous or next link with no page to open. Absent on a `...` gap. Nullable. |
| meta.links.active | boolean | yes |  |
| meta.path | string | yes | Base path for paginator generated URLs. Nullable. |
| meta.per_page | integer | yes | Number of items shown per page. |
| meta.to | integer | yes | Number of the last item in the slice. Nullable. |
| meta.total | integer | yes | Total number of items being paginated. |

### 401

The request carries no valid token: the `Authorization: Bearer` header is missing, or its token is unknown, revoked or past its expiry date. Send a current personal access token.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| message | string | yes | Always `Unauthenticated.`. |

### 403

The token may not read this. The `message` says why: `Your role does not permit this action.` (its owner is not an Admin, Operator or Viewer in the client), `This account is disabled.`, `This token is not bound to a client you belong to.`, or `Client suspended`.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| message | string | yes | What went wrong. |

### 429

More than 120 requests a minute for this user. Wait the seconds in `Retry-After`, then retry.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| message | string | yes | What went wrong. |

## Request example

```bash
curl 'https://app.clokeep.com/api/v1/restore-batches' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Accept: application/json'
```

## Response example (200)

```json
{
  "data": [
    {
      "id": 64,
      "server_id": 12,
      "status": "completed_with_failures",
      "status_label": "Completed with failures",
      "choices": {
        "components": [
          "settings",
          "files",
          "databases",
          "mail"
        ],
        "apply_settings": true,
        "rollback_live": false,
        "database_mode": "per_account",
        "database_modes": {
          "17": "overwrite",
          "18": "new"
        },
        "mail_overwrite": false
      },
      "as_of": null,
      "accounts": {
        "restored": 7,
        "restored_with_warnings": 1,
        "failed": 1,
        "skipped": 0,
        "cancelled": 0,
        "left": 0,
        "total": 9
      },
      "initiated_by_user_id": 8,
      "retry_of_batch_id": null,
      "stop_reason": null,
      "stop_requested_at": null,
      "started_at": "2026-11-20T10:40:00+00:00",
      "finished_at": "2026-11-20T11:52:13+00:00",
      "created_at": "2026-11-20T10:40:00+00:00",
      "updated_at": "2026-11-20T11:52:13+00:00"
    }
  ],
  "links": {
    "first": "https://app.clokeep.com/api/v1/restore-batches?page=1",
    "last": "https://app.clokeep.com/api/v1/restore-batches?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "links": [
      {
        "url": null,
        "label": "&laquo; Previous",
        "page": null,
        "active": false
      },
      {
        "url": "https://app.clokeep.com/api/v1/restore-batches?page=1",
        "label": "1",
        "page": 1,
        "active": true
      },
      {
        "url": null,
        "label": "Next &raquo;",
        "page": null,
        "active": false
      }
    ],
    "path": "https://app.clokeep.com/api/v1/restore-batches",
    "per_page": 15,
    "to": 1,
    "total": 1
  }
}
```

## Response example (401)

```json
{
  "message": "Unauthenticated."
}
```

## Response example (403)

```json
{
  "message": "Your role does not permit this action."
}
```

## Response example (429)

```json
{
  "message": "Too Many Attempts."
}
```
