# GET /backups/accounts

First published 14 Oct 2026 (release 0.2.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the backups group.

List customers and their nightly backup status

- Who may call it: administrator
- Token scope, any of: backups, read, all
- Answers: 200 OK

Each entry includes the customer's name, package and account state. The backups field indicates whether nightly backups are enabled for the customer, and in_run indicates whether tonight's run includes them. For excluded customers, out_reason is off if nightly backups are disabled for the account or suspended if the account is suspended and backups.skip_suspended is on. The nights field counts finished archives under backups.dir by day for comparison with backups.keep_days. The latest field gives the newest archive's day and size.

The last_night field reports the day and outcome from the last full run for each customer. The outcome is archived with the archive size, refused with a disk-space error, failed with the error message, out with the exclusion reason, or none if the customer was absent from the run. Runs started with user through POST /backups/run are skipped. Customers with refused or failed outcomes appear first, with entries sorted by name within each group.

Omit q, status, page and per_page to return all customers. Supply any of them to request a page. The response gives total across all matching pages, page, pages and more, which is true when another page follows. The counts field totals each status after applying q and before applying status. The API returns 400 for an unrecognized status and 403 if the caller lacks administrator privileges.

## As a command

- [urbestack-backup-account-list](https://urbestack.com/docs/commands/urbestack-backup-account-list.md): Lists customers as shown in the Backups section of the administrator's panel, with each customer's name, package and account state.

## Parameters

- `q` (query, string, up to 200 characters): Case-insensitive substring of the customer name. The API ignores values longer than 200 characters or containing ASCII control characters.
- `status` (query, string, one of refused, failed, out, short): Nightly backup status to filter by. Use refused for customers refused for lack of disk space in the last full run, failed for customers whose archive failed in that run, out for customers excluded from tonight's run because their nightly backups are off or their account is suspended and backups.skip_suspended is on, or short for customers with fewer archived nights than backups.keep_days.
- `page` (query, integer, 1 or more): Page number, defaulting to 1. The API uses the last page if the requested page is higher and ignores values outside the 1- to 9-digit decimal format.
- `per_page` (query, integer, 1 to 1000): Number of customers per page, defaulting to 25. The API ignores values outside the 1- to 4-digit decimal format.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X GET "$API/backups/accounts?q=text&status=refused&page=1&per_page=1" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "accounts": [
    {
      "backups": true,
      "in_run": true,
      "keep_days": 1,
      "last_night": {
        "day": "2026-09-09",
        "error": "Domain 'example.com' already exists",
        "reason": "text",
        "size": 1,
        "state": "archived"
      },
      "latest": {
        "day": "2026-09-09",
        "modified_at": "text",
        "size": 1
      },
      "name": "alice",
      "nights": 1,
      "out_reason": "",
      "package": "basic",
      "status": "active"
    }
  ],
  "counts": {
    "all": 1,
    "failed": 1,
    "out": 1,
    "refused": 1,
    "short": 1
  },
  "keep_days": 1,
  "last_night": "text",
  "more": true,
  "page": 1,
  "pages": 1,
  "per_page": 1,
  "total": 1
}
```

## Errors

- 400: Invalid <what>: expected a non-negative integer
- 400: per_page is a number from 1 to 1000
- 400: status is one of 
- 401: Authentication required
- 403: Insufficient privileges
