# GET /users

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the users group.

List user accounts

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

Administrators can list every account. Resellers can list their own account and their customers' accounts. If you omit both page and per_page, users contains all matching accounts. An invalid month or sort, or a per_page outside 1 to 1000, returns 400.

Each account includes bandwidth_bytes for the selected month and the package limits disk_limit_bytes and bandwidth_limit_bytes. Both limits are in bytes. A limit of 0 means unlimited, and null means the account has no package. Each reseller entry includes its customer count in customers.

For customers and resellers, home gives the path configured through home_base and uid gives the Linux user ID. uid is null when the Linux account is missing. Administrators have null for both fields.

The counts object applies every filter except status. near_threshold is the first warning threshold for disk and bandwidth usage. Both status=near and counts.near use that threshold.

## Parameters

- `q` (query, string, up to 200 characters): Case-insensitive substring to match against the account name, email address or domain names.
- `status` (query, string, one of active, suspended, moving, near): Account status to select. Use active for active accounts, suspended for suspended accounts, moving for accounts in the leaving, frozen or arriving stage of a server move, or near for accounts whose disk usage or bandwidth usage for the selected month reaches near_threshold percent of the corresponding positive package limit.
- `role` (query, string, one of admin, reseller, user): Role to select. Use admin for administrators, reseller for resellers or user for customers.
- `owner` (query, string, matching ^(?:[a-z][a-z0-9_]{1,31}|-)$): Reseller name to select that reseller's customers, or - to select accounts owned directly by the server.
- `sort` (query, string, one of name, disk, bandwidth): Sort order. The default, name, sorts by account name. Use disk or bandwidth to sort by usage as a share of the corresponding package limit, highest first, with accounts that lack a positive limit or a usage value last. Ties are sorted by bytes used, highest first, then by name.
- `page` (query, integer, 1 or more): Page number, expressed as a non-negative integer of up to 10 digits. Both 0 and the default of 1 select the first page. A number beyond the last page selects the last page.
- `per_page` (query, integer, 1 to 1000): Number of accounts per page, from 1 to 1000. Defaults to 25 when pagination is enabled.
- `month` (query, string, matching ^\d{4}-(?:0[1-9]|1[0-2])$): Month to report in bandwidth_bytes, in YYYY-MM format. Defaults to the current month in the server's local time.

## 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/users?q=text&status=active&role=admin&owner=text&sort=name&page=1&per_page=1&month=text" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "all": {
    "admin": 1,
    "owned": 1,
    "reseller": 1,
    "total": 1,
    "user": 1
  },
  "counts": {
    "active": 1,
    "admin": 1,
    "moving": 1,
    "near": 1,
    "owned": 1,
    "reseller": 1,
    "suspended": 1,
    "user": 1
  },
  "month": "text",
  "more": true,
  "near_threshold": 1,
  "page": 1,
  "pages": 1,
  "per_page": 1,
  "total": 1,
  "users": [
    {
      "backups": true,
      "bandwidth_bytes": 1,
      "bandwidth_cut": true,
      "bandwidth_cut_at": "text",
      "bandwidth_limit_bytes": 1,
      "created_at": "2026-09-09T10:15:00Z",
      "customers": 1,
      "disk_limit_bytes": 1,
      "email": "alice@example.com",
      "home": "text",
      "id": 1,
      "move_state": "leaving",
      "name": "alice",
      "owner": "text",
      "owner_id": 1,
      "package": "basic",
      "package_backups": true,
      "package_id": 1,
      "package_shell": true,
      "role": "user",
      "second_factor": true,
      "shell": true,
      "status": "active",
      "system_password": true,
      "uid": 1
    }
  ]
}
```

## Errors

- 400: A month is written YYYY-MM
- 400: A sort is name, disk or bandwidth
- 400: Invalid <what>: expected a non-negative integer
- 400: per_page is a number from 1 to 1000
- 401: Authentication required
