Authentication

User authentication operations

Register a new user

post
/auth/register

Creates a new user account.

Body
emailstring · emailRequired

User's email address.

passwordstring · passwordRequired

User's password (at least 6 characters).

rolestring · enumRequired

The role of the user.

Possible values:
Responses
post
/auth/register

Log in a user

post
/auth/login

Authenticates a user and returns access and refresh tokens.

Body
emailstring · emailRequired

User's email address.

passwordstring · passwordRequired

User's password.

Responses
200

User logged in successfully.

application/json
post
/auth/login

Log out a user

get
/auth/logout

Logs out the currently authenticated user.

Authorizations
accessTokenstringRequired
Responses
200

User logged out successfully.

No content

get
/auth/logout

No content

Refresh access token

get
/auth/refresh

Refreshes the access token using the refresh token.

Authorizations
accessTokenstringRequired
Responses
200

Access token refreshed successfully.

application/json
get
/auth/refresh

Verify email address

get
/auth/email/verify/{code}

Verifies a user's email address using a verification code.

Path parameters
codestringRequired

The email verification code.

Responses
200

Email verified successfully.

No content

get
/auth/email/verify/{code}

No content

Send password reset email

post
/auth/password/forgot

Sends a password reset email to the user.

Body
emailstring · emailRequired

User's email address.

Responses
200

Password reset email sent successfully.

No content

post
/auth/password/forgot

No content

Reset password

post
/auth/password/reset

Resets the user's password using a verification code.

Body
passwordstring · passwordRequired

The new password (at least 6 characters).

verificationCodestringRequired

The password reset verification code.

Responses
200

Password reset successfully.

No content

post
/auth/password/reset

No content