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

/users

First published 3 Oct 20260.1.0Unchanged since publication

Create a user account

Who may call it
AdministratorResellerCustomer
Token scope, any of
usersall
Answers201 Created

The default role is user, which creates a customer. An administrator can create any role and use owner to assign a customer to a reseller. For requests from an administrator, an omitted or empty owner creates an account owned directly by the administrator. A reseller creates customers under their own account and receives 403 if they request another role or specify a different owner.

Customers and resellers get a Linux account with shell access disabled, an FTP login and a phpMyAdmin account. Nightly backups include both roles. The password must contain 8 to 128 printable characters. The name must be unused in UrbeStack and, for a customer or reseller, on Linux.

Choose an administrator's package or, for a customer assigned to a reseller, one of that reseller's packages. The reseller must have room for another customer and stay within their package's combined disk and bandwidth limits across their customers. A package name is 1 to 64 characters. It starts with an ASCII letter or digit and may also contain spaces, periods, underscores and hyphens after the first character. An invalid package name returns 400.

Setting email for an administrator also updates delivery of root's mail. If the mail update fails, UrbeStack logs the error, keeps the account and retries the update on the next rebuild. The API still returns 201.

The response contains the created account in user. For customers and resellers, home gives the path configured through home_base and uid gives the Linux user ID, or null if the Linux account is missing. Both fields are null for administrators.

As a command

Run as root on the server

Request body

JSON ·UserCreate· 6 fields
nameUsernameRequired
A username consists of lowercase letters, digits and underscores. For the user role, it also serves as the system account name.
passwordstring, up to 128 charactersRequired
emailstring, up to 254 characters
Username of the reseller who will own the customer. An administrator can choose the owner, and customers created by a reseller belong to that reseller.
packagestring, up to 64 characters
roleRole
An admin is an administrator who manages the server, and a user is a hosting customer. A reseller is a hosting customer who has administrator permissions limited to the customers they own.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X POST "$API/users" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "alice@example.com",
    "name": "alice",
    "owner": "alice",
    "package": "basic",
    "password": "Sup3r-Secret-Passphrase",
    "role": "user"
  }'
Response · 201 Created
{
  "user": {
    "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

28 errors, each a status and a sentence
400An administrator has no shell: only a customer has a system account
400Domain name required
400Domain name too long
400Invalid IPv4 address
400Invalid IPv6 address
400Invalid boolean
400Invalid domain name
400Invalid email address
400Invalid package name
400Invalid password hash
400Invalid password: 8 to 128 printable characters
400Invalid port
400Invalid role: admin, user or reseller
400Invalid setting key
400Invalid status
400Invalid system password hash
400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
400Only a customer has an owner: an administrator or a reseller is the administrator's own
400Username '<value>' is reserved
401Authentication required
403A reseller makes customers of their own
403A reseller makes customers of their own: role user
404Setting '<key>' not found
409<who> and its bandwidth for the month is used up:
409<who> and its disk is used up:
409A system account named '<name>' already exists
409The package <p.name> allows <limit>
409User '<name>' already exists
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/post-users/