Users
All endpoints require you to be an admin or the owner and cannot be used with an API token.
Authentication
Get Users
GET
https://demo.getlynx.dev/api/user/list
Cookies
Name | Type | Description |
---|---|---|
token* | String | Your JWT Session |
Create User
POST
https://demo.getlynx.dev/api/user
Works, even when registration is disabled.
Request Body
Name | Type | Description |
---|---|---|
user.username* | String | |
user.password* | String | |
user.email* | String | |
verification.token | String | Your 2FA Token if enabled |
verification.password | String | Your password if 2FA not enabled |
user.role* | String | If owner, this can be "admin" or "standard". If "admin", this field can only be "standard". |
Update user role
POST
https://demo.getlynx.dev/api/user/role
Requires you to be the owner, if the role is set to owner, your account will be demoted to an admin.
Cookies
Name | Type | Description |
---|---|---|
token* | String | Your JWT Session |
Request Body
Name | Type | Description |
---|---|---|
user.role* | String | "owner", "admin" or "standard" |
verification.password | String | Your password if 2FA not enabled |
verification.token | String | Your 2FA Token if enabled |
user.userID | String | User ID |
Delete User
DELETE
https://demo.getlynx.dev/api/user
Cookies
Name | Type | Description |
---|---|---|
token* | String | Your JWT Session |
Request Body
Name | Type | Description |
---|---|---|
user.id* | String | User ID |
verification.password | String | Your password if 2FA not enabled |
verification.token | String | Your 2FA Token if enabled |
Manual Promotion
If you accidentally promote the wrong user or otherwise would like to make yourself an admin again, run these commands:
Connect to your database and enter your password:
Switch to the lynx database:
Demote the old owner to an admin
Promote yourself to owner
Last updated