Swagger

Auth

6 endpoints.

6 endpoints

Auth

POST/auth/registerRegister

Register a new user with name, email, and password (min 8 chars). Emails a verification code (when EMAIL_PROVIDER=console, the gateway logs the code to its console). Returns 400 if the email is from a disposable/throwaway domain ({ "error": "Disposable email addresses are not allowed" }). Returns 429 Too Many Requests if the rate limit is exceeded — this endpoint is strictly limited to prevent email bombing (check the Retry-After response header).

Authentication: None

Input — request body

name string required
Display name
email string required
User email address
password string required
Password, minimum 8 characters
confirmPassword string required
Must match password

Input — example request

{
  "name": "Jane Dev",
  "email": "user@example.com",
  "password": "********",
  "confirmPassword": "********"
}

Output — example response (200)

{
  "message": "Verification email sent",
  "email": "user@example.com"
}

Output — every status this endpoint answers with

StatusWhen
200Verification email sent
400Invalid request body or disposable email address not allowed
409Email already registered AND verified (sign in instead)
429Rate limited
500Internal server error
Open in Swagger
POST/auth/verifyVerify email

Verify the email with the 10-character code sent during registration. Returns a session JWT used for the project & API-key management endpoints. (The API key itself is minted later — see Projects & API Keys.) Returns 429 Too Many Requests if the rate limit is exceeded (check the Retry-After response header).

Authentication: None

Input — request body

token string required
The verification code emailed at registration

Input — example request

{
  "token": "A1B2C3D4E5"
}

Output — example response (200)

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "message": "Email verified.",
  "systemRole": "client_admin"
}

Output — every status this endpoint answers with

StatusWhen
200Verified + session token
400Invalid request body or query parameters
429Rate limit exceeded — retry after the number of seconds in the `Retry-After` response header
500Internal server error
Open in Swagger
POST/auth/loginLogin

Authenticate with email and password. Returns a session JWT (for the project & API-key management endpoints) plus the caller's platform systemRole (owner | system_admin | client_admin). Returns 429 Too Many Requests if the rate limit is exceeded (check the Retry-After response header).

Authentication: None

Input — request body

email string required
User email
password string required
User password

Input — example request

{
  "email": "user@example.com",
  "password": "********"
}

Output — example response (200)

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "email": "user@example.com",
  "systemRole": "client_admin"
}

Output — every status this endpoint answers with

StatusWhen
200Session token
400Invalid request body or query parameters
401Missing or invalid credentials
429Rate limit exceeded — retry after the number of seconds in the `Retry-After` response header
500Internal server error
Open in Swagger
POST/auth/resendResend code

Resend the email verification code for an unverified account. Requests are rate-limited to one per minute. Returns 429 Too Many Requests if the rate limit is exceeded — this endpoint is strictly limited to prevent email bombing (check the Retry-After response header).

Authentication: None

Input — request body

email string required
User email

Input — example request

{
  "email": "user@example.com"
}

Output — example response (200)

{
  "message": "New verification code sent",
  "email": "user@example.com"
}

Output — every status this endpoint answers with

StatusWhen
200New code sent
400Invalid request body or query parameters
404Resource not found
409Already verified
429Cooldown active
500Internal server error
Open in Swagger
POST/auth/change-passwordChange password

Change the signed-in user's password. Verifies currentPassword; newPassword must be at least 8 characters and match confirmPassword.

Authentication: Bearer JWT (client session)

Input — request body

currentPassword string required
Current password
newPassword string required
New password, minimum 8 characters
confirmPassword string required
Must match newPassword

Input — example request

{
  "currentPassword": "********",
  "newPassword": "********",
  "confirmPassword": "********"
}

Output — example response (200)

{
  "message": "Password updated."
}

Output — every status this endpoint answers with

StatusWhen
200Password updated
400Invalid request body or query parameters
401Missing or invalid credentials
500Internal server error
Open in Swagger
GET/auth/current-userCurrent user

Returns the signed-in user with their live platform systemRole (owner | system_admin | client_admin), read from the DB — so a role change is reflected on the next load without re-login.

Authentication: Bearer JWT (client session)

Output — example response (200)

{
  "id": "ugtp_user_a1b2c3d4e5f6",
  "email": "user@example.com",
  "name": "Jane Dev",
  "systemRole": "client_admin"
}

Output — every status this endpoint answers with

StatusWhen
200Current user
401Missing or invalid credentials
500Internal server error
Open in Swagger