API Reference/api/auth/api/auth/register

/api/auth/register

POST
Register a user

Info
  • Having administrator permissions will allow access to this endpoint despite having both FEATURES_INVITES and FEATURES_USER_REGISTRATION disabled.
  • Having super administrator permissions will allow the administrator field to be used.

Body (JSON)

Field NameTypeDescription
codestringThe invite code
usernamestringThe username
passwordstringThe password
administratorbooleanWhether to grant admin

200
Ok (JSON)

Returns a user object

400
Bad Request (JSON)

  • This endpoint is unavailable due to current configurations - Both registration and invites are disabled.

  • Already logged in - The non-administrator user is already logged in.

  • Bad invite - The invite code provided is invalid due to it either being used/expired or invalid.

  • Bad Username/Password - There are 3 cases where this occurs

    • The username already exists
    • An invite code is provided despite being disabled
    • Either username or password in the body's request is missing.

POST
Create a user (admin)

Info
Info

Requires administrator privileges

Body (JSON)

Field NameTypeDescription
usernamestringThe username of the user
passwordstringThe password of the user
administratorbooleanWhether the user is an administrator

200
Ok (JSON)

Returns a user object

400
Bad Request (JSON)

Last updated: 3/2/2024
Edit this page on GitHub