Create a new user in the system.
Authentication
Requires a valid JWT token in the Authorization header:
Authorization: Bearer {token}
Authorization
You can only create users with a role level lower than your own, except:
- Admins (roleId 1) can create other Admins
Request Body
User’s name. Maximum 50 characters.
User’s email address. Must be a valid email format and not exceed 100 characters. Must be unique.
User’s password. Must be between 8 and 255 characters.
User’s role ID. Must be an integer greater than or equal to 1.
Response
The newly created user’s unique identifier (UUID).
The user’s email address.
curl -X POST https://api.arca.example.com/users \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"nome": "Jane Smith",
"email": "[email protected]",
"senha": "securepass123",
"roleId": 3
}'
{
"id_User": "987fcdeb-51a2-43f7-b456-123456789abc",
"nome": "Jane Smith",
"email": "[email protected]",
"roleId": 3
}