Skip to main content
POST
/
users
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
}
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

nome
string
required
User’s name. Maximum 50 characters.
email
string
required
User’s email address. Must be a valid email format and not exceed 100 characters. Must be unique.
senha
string
required
User’s password. Must be between 8 and 255 characters.
roleId
number
required
User’s role ID. Must be an integer greater than or equal to 1.

Response

id_User
string
The newly created user’s unique identifier (UUID).
nome
string
The user’s name.
email
string
The user’s email address.
roleId
number
The user’s role ID.
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
}

Build docs developers (and LLMs) love