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

/ftp/accounts

First published 3 Oct 20260.1.0Unchanged since publication

List FTP accounts and report FTP status

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

Administrators can see every customer's FTP accounts. Resellers can see their own accounts and those of their customers. Customers can see their own accounts. The response lists accounts by owner, then by login. It also reports whether FTP is installed, enabled, and running, whether TLS is required, the FTP port and passive port range, the ProFTPD version, and the service unit.

With no q, status, owner, page, or per_page, the response contains accounts and status. Use user in this view to select one customer's accounts. The detailed view uses q, status, owner, page, and per_page and includes the owner's package, the on-disk directory in path, and the last recorded sign-in in last_login_at. UrbeStack updates last_login_at hourly from ProFTPD sign-ins in the system journal. An invalid status returns 400.

Use page or per_page to request a page. Omit both to receive every matching account. In the detailed response, counts applies the other filters with status omitted. The all object gives the account and owner totals visible to the caller before filtering.

As a command

Run as root on the server

Parameters

userquery ·Username
Customer username an administrator can use to limit the basic listing to that customer's FTP accounts.
qquery ·string, up to 200 characters
Case-insensitive substring of the FTP login or the owner's full username. The API ignores values over 200 characters or containing control characters.
statusquery ·string, one of old, never, expiring
Account status filter. Use old for accounts created more than a year ago, never for accounts with no sign-in recorded in the system journal, or expiring for accounts with a scheduled expiration.
ownerquery ·Username
Username of the owner whose FTP accounts to include in the detailed listing.
pagequery ·integer, 1 or more
Page number, from 1 to 9 decimal digits, defaulting to 1. Requests beyond the last page return the last page, and the API ignores values outside the digit limit.
per_pagequery ·integer, 1 to 1000
Number of accounts per page, from 1 to 4 decimal digits, defaulting to 25 when paging. The API ignores values outside the digit limit.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X GET "$API/ftp/accounts?user=alice&q=text&status=old&owner=alice&page=1&per_page=1" \
  -H "Authorization: Bearer $TOKEN"
Response · 200 OK
{
  "accounts": [
    {
      "created_at": "2026-09-09T10:15:00Z",
      "directory": "text",
      "expires_at": "2026-09-16T10:15:00Z",
      "id": 1,
      "last_login_at": "text",
      "name": "alice",
      "package": "basic",
      "path": "public_html/index.php",
      "user": "alice",
      "user_id": 2
    }
  ],
  "all": {
    "owners": 1,
    "total": 1
  },
  "counts": {
    "all": 1,
    "expiring": 1,
    "never": 1,
    "old": 1
  },
  "more": true,
  "page": 1,
  "pages": 1,
  "per_page": 1,
  "status": {
    "active": true,
    "enabled": true,
    "installed": true,
    "passive_ports": "text",
    "port": 8443,
    "require_tls": true,
    "running": true,
    "state": "up",
    "unit": "text",
    "version": "0.0.1"
  },
  "total": 1
}

Errors

9 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
400status is one of old, never, expiring
401Authentication required
404User '<f.owner>' not found
404User '<family>' not found
404User '<user>' not found
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-ftp-accounts/