Create a new user with a specific role (admin only)
curl --request POST \
--url https://api.example.com/auth/create-user \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "<string>",
"password": "<string>",
"role": "<string>"
}
'{
"message": "<string>",
"user": {
"user.id": 123,
"user.name": "<string>",
"user.email": "<string>",
"user.role": "<string>",
"user.createdAt": "<string>"
}
}Documentation Index
Fetch the complete documentation index at: https://mintlify.com/GioTaipe/E-commerce/llms.txt
Use this file to discover all available pages before exploring further.
customer or admin roles. This endpoint is rate-limited to 10 requests per 15-minute window.
admin role in the Authorization header.
Authorization: Bearer <admin_token>
customer or admin.{
"name": "Admin User",
"email": "admin@example.com",
"password": "securePassword123",
"role": "admin"
}
{
"message": "Usuario creado exitosamente",
"user": {
"id": "2",
"name": "Admin User",
"email": "admin@example.com",
"role": "admin",
"createdAt": "2026-03-06T10:30:00.000Z"
}
}
{
"error": "No autorizado"
}
{
"error": "Acceso denegado. Se requieren permisos de administrador"
}
{
"error": "El email ya está en uso"
}
{
"error": "Validation failed",
"details": [
"El rol debe ser 'customer' o 'admin'"
]
}
{
"error": "Demasiados intentos. Intenta de nuevo en 15 minutos."
}
customer and admin/auth/register by allowing role specificationcurl --request POST \
--url https://api.example.com/auth/create-user \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "<string>",
"password": "<string>",
"role": "<string>"
}
'{
"message": "<string>",
"user": {
"user.id": 123,
"user.name": "<string>",
"user.email": "<string>",
"user.role": "<string>",
"user.createdAt": "<string>"
}
}