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

/domains

First published 3 Oct 20260.1.0Unchanged since publication

List domains

Who may call it
AdministratorResellerCustomer
Token scope, any of
domainsreadall
Answers200 OK

Administrators can list all domains. Resellers can list their own domains and their customers' domains. Customers can list their own domains. The response orders domains by name. Omit both page and per_page to return every matching domain. A per_page value outside 1 to 1000 returns 400.

Each domain includes alias_count and certificate. The certificate object contains kind, status, not_after, last_error and challenge, or is null when the domain has no certificate. The state is active, suspended, bandwidth or moving. The wrong flag marks a domain whose last certificate attempt failed or whose traffic has been cut off.

The php_running field gives the domain's selected PHP version or the server default. The php_support field gives that version's upstream support status as active, security, eol or unknown. The docroot_standard field indicates whether the domain uses the standard document root for new domains. UrbeStack uses stored data for the listing without live checks.

The response includes counts calculated with the status filter omitted and overall totals for the permitted account scope before the other filters are applied.

Parameters

userquery ·Username
Username of the account whose domains to list, subject to the caller's access permissions.
qquery ·string, up to 200 characters
Case-insensitive substring of a domain name or alias, or an exact match for the owner's username.
statusquery ·string, one of active, suspended, bandwidth, moving, wrong
Domain status filter. Use active for active domains, suspended for domains suspended directly or through their owner, bandwidth for domains whose owner has exhausted their monthly bandwidth allowance, moving for domains whose owner is moving between servers, or wrong for domains whose last certificate attempt failed or whose traffic has been cut off.
ownerquery ·Username
Username of the owner whose domains to include.
php_versionquery ·string, matching ^[5-9]\.[0-9]$
Effective PHP version to filter by, in major.minor form matching ^[5-9]\.[0-9]$. Matches the domain's selected version or the server default it follows.
follows_defaultquery ·boolean
Set to true to include only domains configured to follow the server's default PHP version.
pagequery ·integer, 1 or more
Non-negative page number of up to 10 digits, with 0 or omission selecting page 1. A number beyond the last page selects the last page.
per_pagequery ·integer, 1 to 1000
Number of domains per page, from 1 to 1000. Defaults to 25 when pagination is requested.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X GET "$API/domains?user=alice&q=text&status=active&owner=alice&php_version=8.4&follows_default=1&page=1&per_page=1" \
  -H "Authorization: Bearer $TOKEN"
Response · 200 OK
{
  "all": {
    "owners": 1,
    "subdomains": 1,
    "total": 1
  },
  "counts": {
    "active": 1,
    "bandwidth": 1,
    "moving": 1,
    "suspended": 1,
    "wrong": 1
  },
  "domains": [
    {
      "alias_count": 1,
      "bandwidth_cut": true,
      "certificate": {
        "challenge": "text",
        "kind": "profile",
        "last_error": "text",
        "not_after": "text",
        "self_signed": true,
        "status": "active"
      },
      "created_at": "2026-09-09T10:15:00Z",
      "directory_listing": true,
      "docroot": "/home/alice/files/web/example.com/public_html",
      "docroot_standard": 1,
      "error_pages": true,
      "id": 1,
      "move_state": "text",
      "name": "alice",
      "package": "basic",
      "parent": "example.com",
      "php_effective": {},
      "php_follows_default": true,
      "php_running": "text",
      "php_settings": {},
      "php_support": "active",
      "php_version": "8.4",
      "ssl": {},
      "state": "active",
      "stats_enabled": true,
      "status": "active",
      "template": "default",
      "user": "alice",
      "user_id": 2,
      "wildcard": true,
      "wrong": 1,
      "www_alias": true,
      "www_redirect": "none"
    }
  ],
  "following_default": 1,
  "more": true,
  "page": 1,
  "pages": 1,
  "per_page": 1,
  "php_counts": {},
  "total": 1
}

Errors

5 errors, each a status and a sentence
400Invalid <what>: expected a non-negative integer
400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
400Username '<value>' is reserved
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-domains/