/api/user
Get the currently logged in user, and perform actions on the current user.
Info
This endpoint requires authentication.
GET Request
Get the currently authenticated user.
Response
Status: 200 OK
Content-Type: application/json
Property | Type | Description |
---|---|---|
user | User | The authenticated user object. |
token | string | The user's token. |
Example
{"user": {"id": "cmb6042f500029kenox2u8npu","username": "admin","createdAt": "2025-05-27T04:13:22.625Z","updatedAt": "2025-05-28T02:20:19.136Z","role": "SUPERADMIN","view": {},"oauthProviders": [],"totpSecret": null,"passkeys": [],"quota": null,"sessions": ["MW4kw66bAsosVnaAB2VyuCRt6Sh2XNfo"]}}
PATCH Request
Update the currently authenticated user.
Body
Content-Type: application/json
Property | Type | Description |
---|---|---|
username | string?~ | New username. Must not be already taken. |
password | string?~ | New password. |
avatar | string?~ | Base64 avatar image string, or null to remove. |
view | UserViewSettings?~ | Object with user interface/view preferences. |
All properties are optional. If a property is not provided, it will not be updated. The same goes for inside the view
object, where only the provided properties will be updated.
Response
Status: 200 OK
Content-Type: application/json
The same response as the GET /api/user
endpoint, with the updated user information.
Error Responses
- 400 Bad Request
- If the username is already taken.
- If any invalid properties are provided.
/api/auth/webauthn
Use a WebAuthn credential to login to an account.
/api/user/avatar
Get a base64 avatar image for the current user. This is the endpoint t...
Last updated: 5/28/2025
Edit this page on GitHub