v1

latestOpenAPI 3.0.32026-07-26172157253.6 KB
Client

Register new user

Creates a new user account. When email verification is required, a delivery failure is returned as an error after the account is created. Retry delivery with POST /api/auth/email/send-verification instead of registering the same email again.

post/api/auth/users

Query parameters

client_type'web' | 'mobile' | 'desktop' | 'server'

Client type determines how refresh tokens are returned:

  • web: Refresh token stored in httpOnly cookie, csrfToken returned in response
  • mobile/desktop/server: refreshToken returned directly in response body

Request body

emailstring email required
passwordstring required

Password meeting configured requirements (check /api/auth/email/config for current requirements)

namestring
redirectTostring uri

Used for link-based email verification. The email link always opens an InsForge backend endpoint first; after the token is verified, InsForge redirects the browser to this URL. This URL must be included in allowedRedirectUrls. Recommended: use your app's sign-in page.

Example request

{
  "email": "user@example.com",
  "password": "securepassword123",
  "name": "John Doe"
}

Response

User created successfully

accessTokenstring nullable

JWT authentication token (null if email verification required)

csrfTokenstring nullable

CSRF token for use with refresh endpoint (web clients only, null if email verification required)

refreshTokenstring nullable

Refresh token for mobile/desktop/server clients (null for web clients or if email verification required)

requireEmailVerificationboolean

Whether email verification is required before login