Creates a new professional user (doctor, nurse, or other healthcare professional) with their credentials, specialty, and working hours.
Authentication
Requires a valid JWT token in the Authorization header.
Permissions
- Superuser only: Only users with
is_superuser: true can create professional accounts
- Returns
403 Forbidden if the current user is not a superuser
Request Body
Full name of the professionalExample: "Maria Oliveira"
Password for the professional account (will be hashed)Example: "maria123"
Contact phone numberExample: "456789123"
CRM (Conselho Regional de Medicina) or COREN (Conselho Regional de Enfermagem) registration number (must be unique)Example: "CRM-PR 67890"
Medical specialty or area of expertiseAllowed values:
"Clinica Geral"
"Dermatologia"
"Ginecologia"
"Ortopedia"
"Pediatria"
"Psiquiatria"
"Psicologia"
"Nutrição"
"Fisioterapia"
"Odontologia"
Working hours scheduleAllowed values:
"Manhã (08:00 - 12:00)"
"Tarde (13:00 - 18:00)"
"Noite (18:00 - 22:00)"
"Integral (08:00 - 22:00)"
"Plantão (12h)"
"Plantão (24h)"
Professional biography or descriptionExample: "Médica com 10 anos de experiência"
User type (must be "PROFISSIONAL" for professional users)Example: "PROFISSIONAL"
Whether the professional account is activeExample: true
Whether the professional has superuser/admin privilegesExample: false
Response
Unique identifier for the professional
Full name of the professional
CRM/COREN registration number
User type ("PROFISSIONAL")
curl -X POST https://api.vidaplus.com/profissionais/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"nome": "Maria Oliveira",
"email": "[email protected]",
"senha": "maria123",
"telefone": "456789123",
"crmCoren": "CRM-PR 67890",
"especialidade": "Clinica Geral",
"horario_atendimento": "Plantão (12h)",
"biografia": "Médica com 10 anos de experiência",
"tipo": "PROFISSIONAL",
"is_active": true,
"is_superuser": false
}'
{
"id": 1,
"nome": "Maria Oliveira",
"email": "[email protected]",
"telefone": "456789123",
"crmCoren": "CRM-PR 67890",
"especialidade": "Clinica Geral",
"horario_atendimento": "Plantão (12h)",
"biografia": "Médica com 10 anos de experiência",
"tipo": "PROFISSIONAL",
"is_active": true,
"is_superuser": false
}
Error Codes
| Status Code | Description |
|---|
| 201 | Professional created successfully |
| 403 | User does not have superuser permissions |
| 409 | Email or CRM/COREN already exists |
| 401 | Authentication required |