/api/auth/register
Creates a new Tenant and admin User in a single database transaction. Returns a signed JWT token you can use to authenticate subsequent requests.
This is the only endpoint that creates a new
Tenant. All other users must be added to an existing tenant after registration.Request body
Admin user email address. Must be unique across all users.
Admin user password. Stored as a bcrypt hash (10 salt rounds).
Name of the business or organization. Becomes the
name field on the created Tenant.Full name of the admin user.
Response
JWT bearer token. Include this in the
Authorization header for all protected API routes.Errors
| Status | Error message | Description |
|---|---|---|
400 | User already exists | A user with the provided email is already registered. |
500 | Registration failed | An unexpected server error occurred. |