Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ferneybaron/user-management-api/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
Registers a new user in the system. All fields are required and will be validated before the user is created.
Request Body
Unique username for the user. Must be between 3 and 50 characters.Validation:
- Required
- Min length: 3 characters
- Max length: 50 characters
Example: jdoe
User’s email address. Must be a valid email format.Validation:
- Required
- Must be a valid email address
Example: jdoe@example.com
User’s first name.Validation:
- Required
- Max length: 100 characters
Example: John
User’s last name.Validation:
- Required
- Max length: 100 characters
Example: Doe
User’s role in the system.Validation:
- Required
- Must be one of:
ADMIN, USER, GUEST
Example: USER
Response
Unique identifier for the user, automatically generated.Example: 0f4df2de-fffb-4a24-9891-381ecf4f0f87
The user’s username.Example: jdoe
The user’s email address.Example: jdoe@example.com
The user’s first name.Example: John
The user’s last name.Example: Doe
The user’s role.Example: USER
ISO 8601 timestamp when the user was created.Example: 2024-01-15T10:30:00
ISO 8601 timestamp when the user was last updated.Example: 2024-01-15T10:30:00
Whether the user account is active. New users are active by default.Example: true
Status Codes
User created successfully
Validation error - one or more required fields are missing or invalid
User with the provided username already exists
An unexpected error occurred
Example Request
curl -X POST http://localhost:8080/api/v1/users \
-H 'Content-Type: application/json' \
-d '{
"username": "jdoe",
"email": "jdoe@example.com",
"firstName": "John",
"lastName": "Doe",
"role": "USER"
}'
Example Response
{
"id": "0f4df2de-fffb-4a24-9891-381ecf4f0f87",
"username": "jdoe",
"email": "jdoe@example.com",
"firstName": "John",
"lastName": "Doe",
"role": "USER",
"createdAt": "2024-01-15T10:30:00",
"updatedAt": "2024-01-15T10:30:00",
"active": true
}
Error Response Examples
Validation Error (400)
{
"type": "about:blank",
"title": "Validation Failed",
"status": 400,
"detail": "username: username is required; email: email must be a valid email address",
"timestamp": "2024-01-15T10:30:00"
}
User Already Exists (409)
{
"type": "about:blank",
"title": "User Already Exists",
"status": 409,
"detail": "User with username 'jdoe' already exists",
"timestamp": "2024-01-15T10:30:00"
}