TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/devdavco/backend_1/llms.txt
Use this file to discover all available pages before exploring further.
POST /usuarios/create endpoint registers a new user account in the CoworkingBooking system. You must supply at minimum a nombre and a valid, unique email. Optionally include a password_hash value and a rol to control the user’s access level. If the provided email is already associated with an existing account, the request is rejected with a 400 Bad Request response before any data is written.
Request body
The user’s full display name. Validated with
@NotBlank — cannot be null, empty, or whitespace only. Maximum 100 characters as enforced by the database column.The user’s email address. Validated with
@NotBlank and @Email — must be non-blank and in a valid email format (e.g., [email protected]). Must be unique across all existing users; a duplicate email returns a 400 error (see Error responses below).The password value to store for this user. The server stores and returns this field exactly as provided — no server-side hashing is performed. Callers are responsible for hashing passwords before sending them to this endpoint. Maximum 255 characters.
A role identifier for the user. The server applies no enum constraint on this field. Common values used in the platform are
"admin" and "usuario". Defaults to whatever the underlying database column default is if omitted.Validation rules
| Field | Rules |
|---|---|
nombre | Required. Cannot be blank. |
email | Required. Must be a valid email format. Must not already exist in the database. |
password_hash | Optional. Stored as-is. |
rol | Optional. Free-form string — no enum enforcement. |
Request
Response
201 Created
On success, returns a201 Created status with the newly created Usuario object in the response body.
The auto-generated primary key assigned to the new user by the database.
The user’s full display name as stored.
The user’s email address as stored.
The password value exactly as it was supplied in the request.
The role identifier as stored.
Error responses
400 Bad Request — duplicate email
If the suppliedemail already belongs to an existing user, UsuarioAlreadyExistsException is thrown and the RestExceptionHandler converts it into the following response:
The
type value is "email-alredy-exist" (note the intentional spelling as found in the source). Use this exact string when pattern-matching error types client-side.400 Bad Request — validation failure
Ifnombre is blank or email is blank or malformed, Spring’s bean validation returns a 400 error with details about which fields failed.