Get your free beta license ↗
API operation · users group
GET

/users

First published 3 Oct 20260.1.0Unchanged since publication

List user accounts

Who may call it
AdministratorResellerCustomer
Token scope, any of
usersreadall
Answers200 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

qquery ·string, up to 200 characters
Case-insensitive substring to match against the account name, email address or domain names.
statusquery ·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.
rolequery ·string, one of admin, reseller, user
Role to select. Use admin for administrators, reseller for resellers or user for customers.
ownerquery ·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.
sortquery ·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.
pagequery ·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_pagequery ·integer, 1 to 1000
Number of accounts per page, from 1 to 1000. Defaults to 25 when pagination is enabled.
monthquery ·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

See the API overview for how to set $API and $TOKEN.
Request
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

5 errors, each a status and a sentence
400A month is written YYYY-MM
400A sort is name, disk or bandwidth
400Invalid <what>: expected a non-negative integer
400per_page is a number from 1 to 1000
401Authentication required
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/get-users/