- Method:
POST
- Request Body:
fullName
: String (user's full name)- Validation: 1-50 characters long
username
: String (chosen username)- Validation: 1-20 characters long, alphanumeric
email
: String (user's email address)- Validation: Valid email address format
/^[^\s@]+@[^\s@]+\.[^\s@]+$/
- Validation: Valid email address format
password
: String (user's password)- Validation: 8-50 characters long, at least one uppercase, one lowercase, one number, and one special character
confirmPassword
: String (user's password confirmation)- Validation: Must match
password
- Validation: Must match
- Success Response:
accessToken
: String (JWT token for authentication)refreshToken
: String (JWT token for refreshing access token)
- Description: Registers new users and provides a session token.
- Method:
POST
- Request Body:
emailOrUsername
: String (email or username of the user)- Validation: Should be either email or username
password
: String (user's password)- Validation: non-empty,
- Success Response:
accessToken
: String (JWT token for authentication)refreshToken
: String (JWT token for refreshing access token)
- Description: Logs in existing users and provides a session token.
-
Method:
GET
-
Success Response:
user
: Objectid
: String (user's ID)name
: String (user's full name)emails
: Objectemail
: String (user's email address)verified
: Boolean (whether the email is verified)
avatar
: String (user's avatar URL)idp
: String (identity provider)roles
: Array (user's roles)
createAt
: String (session creation date)expires
: String (session expiration date)accessToken
: String (JWT token for authentication)authProvider
: String (authentication provider)
-
Description: Retrieves session details of the current user.
- Method:
POST
- Request Body:
email
: String (user's email)verificationCode
: String (verification code sent to the email)
- Success Response:
message
: String ("Email verified successfully." if successful)
- Description: Verifies the user's email address.
- Method:
POST
- Request Body:
email
: String (user's email)
- Success Response:
message
: String ("Email verification message sent successfully." if successful)
- Description: Resends the verification email to the user.
- Method:
POST
- Request Body:
- None
- Success Response:
accessToken
: String (JWT token for authentication)refreshToken
: String (JWT token for refreshing access token)
- Description: Refreshes the access token.
- Methods:
POST
- Request Body:
name
: String (name of the key)
- Success Response:
id
: String (key ID)key
: String (key value)
- Description: Creates a new key for the user.
- Methods:
GET
- Success Response:
keys
: Array (list of user keys)
- Description: Retrieves all keys of the user.
- Methods:
DELETE
- Request Body:
id
: String (key ID)
- Success Response:
message
: String ("Key deleted." if successful)
- Description: Deletes a key of the user.
- Methods:
PATCH
- Request Body:
id
: String (key ID)name
: String (new name of the key)
- Success Response:
id
: String (key ID)name
: String (new name of the key)
- Description: Updates the name of a key of the user.
- Method:
GET
- Success Response:
transactions
: Array (list of user transactions)
- Description: Retrieves all transactions of the user.
- Method:
PATCH
- Request Body:
name
: String (optional, new full name)- Validation: 1-50 characters long
username
: String (optional, new username)- Validation: 1-20 characters long, alphanumeric
email
: String (optional, new email)- Validation: Valid email address format
/^[^\s@]+@[^\s@]+\.[^\s@]+$/
- Validation: Valid email address format
oldPassword
: String (optional, old password, required ifpassword
is provided)- Validation: 8-50 characters long, at least one uppercase, one lowercase, one number, and one special character
password
: String (optional, new password)- Validation: 8-50 characters long, at least one uppercase, one lowercase, one number, and one special character
confirmPassword
: String (optional, new password confirmation)- Validation: Must match
password
- Validation: Must match
- Success Response:
message
: String ("User updated successfully." if successful)
- Description: Updates the user's profile.
- Data Format: JSON
- Authentication: Bearer Token (included in the header of authenticated requests)
- Base URL: "https://dev-api.pawan.krd"
- Error Response:
status
: Boolean (false)error
: Objectmessage
: String (error message)type
: String (error type)
hint
: String (error hint)discord
: String (discord server URL)support
: String (support email address)
- Description: Returns an error response.