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

/ftp/accounts/{name}

First published 3 Oct 20260.1.0Unchanged since publication

Change an FTP account's password or directory

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

Administrators can update any FTP account, and customers can update their own. Supply password, directory, or both. The API returns 400 if neither is supplied or if the login format is invalid. It returns 404 if the account does not exist. A successful response includes the updated FTP account in account.

The password must contain 8 to 128 printable characters. The directory path starts with /, which represents the customer's home. UrbeStack normalizes repeated slashes and . components. The API returns 400 for a directory path that lacks the leading / or contains a control character or a .. component, a path over 4096 characters, or a component over 255 characters. UrbeStack creates missing directories with mode 0755 and gives the customer ownership. The FTP account is confined to the selected directory and its contents. ProFTPD applies the changes at the next login.

As a command

Run as root on the server

Parameters

namepath ·FtpAccountNameRequired
FTP login in the form <name>@<domain>, with @ encoded as %40.

Request body

JSON ·FtpAccountPatch· 2 fields
directoryHomePath
A path within the customer's home directory, with / representing the home directory itself. The path cannot contain .. components or control characters.
passwordstring, up to 128 characters

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X PATCH "$API/ftp/accounts/alice" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "directory": "text",
    "password": "Sup3r-Secret-Passphrase"
  }'
Response · 200 OK
{
  "account": {
    "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
  }
}

Errors

20 errors, each a status and a sentence
400--<_> is required
400<what> climbs out of the home with ..
400<what> has a name over 255 characters
400<what> holds a control character
400<what> is required
400<what> is too long
400<what> must start with /, which is the home
400An FTP account is named <name>@<domain>
400Domain name required
400Domain name too long
400Invalid domain name
400Invalid password: 8 to 128 printable characters
400Invalid system password hash
400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
400Nothing to change
400Nothing to change: give a password, a directory or both
400Username '<value>' is reserved
401Authentication required
404The FTP account <login> does not exist
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/patch-ftp-accounts-name/