/api/auth/register
Register a new user account and log them in. Works with invites.
POST Request
Body
Content-Type: application/json
Property | Type | Description |
---|---|---|
username | string | Required. The username for the new account. |
password | string | Required. The password for the new account. |
code | string? | The invite code. Required if invites are enabled. Omit if registration is open. |
Example
{"username": "test","password": "test"}
Response
Status: 200 OK
Content-Type: application/json
Property | Type | Description |
---|---|---|
user | User | The authenticated user object. |
Example
{"user": {"id": "cmb6042f500029kenox2u8npu","username": "admin","createdAt": "2025-05-27T04:13:22.625Z","updatedAt": "2025-05-28T02:20:05.997Z","role": "SUPERADMIN","view": {},"oauthProviders": [],"totpSecret": null,"passkeys": [],"quota": null,"sessions": [],"token": "MTc0ODMxOTIwMjYyNQ==.ejV1UVFRODBJNHltU0VGZWVaTXNzRmc2UFZKUTlIMmg="}}
Error Responses
- 400 Bad Request
- Invites are not enabled but an invite code was provided.
- Invites are enabled but code is missing or invalid.
- Registration is disabled.
- Username or password is missing.
- Username is already taken.
/api/auth/logout
Log out the currently authenticated user and invalidate their current...
/api/auth/webauthn
Use a WebAuthn credential to login to an account.
Last updated: 5/30/2025
Edit this page on GitHub