TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Nyverie/reservafacil/llms.txt
Use this file to discover all available pages before exploring further.
/api/usuarios/[id] endpoints allow superadmins to modify or permanently remove user accounts. Both operations require SUPERADMIN role and include a self-protection guard: a superadmin cannot modify or delete their own account, preventing accidental privilege revocation or account loss.
PATCH /api/usuarios/[id]
Partially updates a user record. Accepts any subset of the mutableUsuario fields and merges them into the existing record. The most common use cases are promoting or demoting a user’s rol and toggling their activo status.
Requires SUPERADMIN role.
Path parameter
The CUID of the user to update (e.g.
clx9usr1abc2def). Must not equal the caller’s own ID.Request body
New role to assign to the user. One of:
USUARIO, ADMIN, SUPERADMIN. Changing a user to SUPERADMIN grants them full administrative access.Set to
false to deactivate the account (preventing login), or true to reactivate it.Updated display name for the user.
Updated email address. Must remain unique across all users.
Response 200
The response returns a trimmed user object containing only the identity and access fields — no reservation data or password.
Always
true on success.CUID of the updated user.
Display name after the update.
Email address after the update.
Role after the update. One of:
USUARIO, ADMIN, SUPERADMIN.Account active status after the update.
Error responses
| Status | Body | Description |
|---|---|---|
400 | { "error": "No puedes modificar tu propia cuenta" } | The id in the path matches the caller’s own session ID. |
403 | { "error": "Sin permisos" } | Caller is not authenticated or does not have SUPERADMIN role. |
DELETE /api/usuarios/[id]
Permanently deletes a user account and all associated data. This action is irreversible — there is no soft-delete or recycle mechanism. RequiresSUPERADMIN role.
Path parameter
The CUID of the user to delete. Must not equal the caller’s own ID.
Response 200
Always
true on success.Error responses
| Status | Body | Description |
|---|---|---|
400 | { "error": "No puedes eliminarte a ti mismo" } | The id in the path matches the caller’s own session ID. |
403 | { "error": "Sin permisos" } | Caller is not authenticated or does not have SUPERADMIN role. |