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

nome
string
required
Full name of the professionalExample: "Maria Oliveira"
email
string
required
Email address (must be unique)Example: "[email protected]"
senha
string
required
Password for the professional account (will be hashed)Example: "maria123"
telefone
string
required
Contact phone numberExample: "456789123"
crmCoren
string
required
CRM (Conselho Regional de Medicina) or COREN (Conselho Regional de Enfermagem) registration number (must be unique)Example: "CRM-PR 67890"
especialidade
string
required
Medical specialty or area of expertiseAllowed values:
  • "Clinica Geral"
  • "Dermatologia"
  • "Ginecologia"
  • "Ortopedia"
  • "Pediatria"
  • "Psiquiatria"
  • "Psicologia"
  • "Nutrição"
  • "Fisioterapia"
  • "Odontologia"
horario_atendimento
string
required
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)"
biografia
string
required
Professional biography or descriptionExample: "Médica com 10 anos de experiência"
tipo
string
required
User type (must be "PROFISSIONAL" for professional users)Example: "PROFISSIONAL"
is_active
boolean
required
Whether the professional account is activeExample: true
is_superuser
boolean
required
Whether the professional has superuser/admin privilegesExample: false

Response

id
integer
Unique identifier for the professional
nome
string
Full name of the professional
email
string
Email address
telefone
string
Contact phone number
crmCoren
string
CRM/COREN registration number
especialidade
string
Medical specialty
horario_atendimento
string
Working hours schedule
biografia
string
Professional biography
tipo
string
User type ("PROFISSIONAL")
is_active
boolean
Account active status
is_superuser
boolean
Superuser status
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 CodeDescription
201Professional created successfully
403User does not have superuser permissions
409Email or CRM/COREN already exists
401Authentication required

Build docs developers (and LLMs) love