Register User

POST /v1/user

Create a new user account. Public endpoint — no auth required. Returns 403 if registration has been disabled platform-wide.

A verification email is dispatched asynchronously after creation; the account is usable immediately for login, but some protocols (UDP, dedicated IPs) are gated behind email verification.

Request body

username string Req
Login handle. Used in the username field of POST /v1/auth/login. Must be unique across the platform; reserved words are rejected.
email string Req
Contact email. Receives the verification link, password resets, and billing notifications. Must be unique.
password string Req
Plaintext password. Server-side: minimum length and complexity enforced; stored as bcrypt hash. Never logged.

Response (201 Created)

id int64
Numeric user ID — your unique account identifier (admin paths like /admin/users/{id} use it; your own self endpoints are id-less, e.g. /user).
username string
Echo of the requested username.
email string
Echo of the requested email.
role string
Always user for self-registration.
email_verified boolean
false at creation. Flips to true when the user clicks the link in the verification email.
plan string
Slug of the default plan assigned to new accounts (typically free).
created_at datetime
RFC 3339 UTC timestamp.

Errors

400 Bad Request
Invalid JSON, missing one of username/email/password, or username/email already exists. The same generic message is returned for "already exists" to prevent enumeration.
403 Forbidden
Self-registration is disabled on this deployment.
Request
curl -X POST "https://api.ngris.com/v1/user" \ -H "Content-Type: application/json" \ -d '{ "username": "alice", "email": "alice@example.com", "password": "s3cur3p@ss!" }'
Python
# Registration is unauthenticated — no SDK helper. Use httpx directly: import httpx resp = httpx.post( "https://api.ngris.com/v1/user", json={ "username": "alice", "email": "alice@example.com", "password": "s3cur3p@ss!", }, timeout=10.0, ) resp.raise_for_status() print(resp.json()["id"])
Response — 201 Created
{ "id": 1024, "username": "alice", "email": "alice@example.com", "role": "user", "email_verified": false, "plan": "free", "plan_id": 1, "status": "active", "created_at": "2026-04-29T12:34:56Z" }
On this page
Register User
Iris