Skip to main content
POST
/
api
/
mentorship
/
ask
Ask Mentor
curl --request POST \
  --url https://api.example.com/api/mentorship/ask \
  --header 'Content-Type: application/json' \
  --data '
{
  "question": "<string>",
  "context": {
    "context.position": "<string>",
    "context.department": "<string>",
    "context.area": "<string>"
  }
}
'
{
  "success": true,
  "message": "<string>",
  "data": {
    "data.response": {
      "data.response.response": "<string>",
      "data.response.timestamp": "<string>",
      "data.response.context": "<string>"
    }
  }
}

Overview

The mentorship endpoint provides AI-powered guidance and support for healthcare workers. Using Claude AI, it offers emotional and professional advice, practical solutions for day-to-day situations, help with ethical dilemmas, and motivational support.

Authentication

This endpoint requires authentication. Include a valid JWT token in the Authorization header.
Authorization: Bearer YOUR_JWT_TOKEN

Request Body

question
string
required
The question or concern from the healthcare worker. Must be between 10-500 characters.
context
object
Additional context to personalize the mentorship response.

Response

success
boolean
Indicates if the request was successful
message
string
Response message
data
object

AI Behavior

The CUIDO mentor is configured to:
  • Provide emotional and professional support for healthcare workers
  • Give practical, applicable advice for real-world situations
  • Help with ethical dilemmas and patient communication
  • Offer motivational support
  • Respond in Spanish with a warm, empathetic tone
  • Keep responses under 200 words
  • Recommend consulting supervisors for serious medical issues
  • Always end with a follow-up question

Examples

curl -X POST https://api.cuido.com/api/mentorship/ask \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "question": "Me siento agotado después de turnos largos. ¿Cómo puedo manejar mejor el estrés?",
    "context": {
      "position": "enfermero",
      "department": "urgencias",
      "area": "emocional"
    }
  }'

Response Example

{
  "success": true,
  "message": "Respuesta de mentoría generada",
  "data": {
    "response": {
      "response": "Entiendo perfectamente lo que sientes. El agotamiento en urgencias es muy común. Te recomiendo: 1) Establece límites claros entre trabajo y vida personal, 2) Practica técnicas de respiración durante el turno (5 minutos cada 3 horas), 3) Comparte tus sentimientos con compañeros de confianza, 4) Considera hablar con tu supervisor sobre la rotación de turnos. Recuerda: cuidarte a ti mismo te permite cuidar mejor a los pacientes. ¿Has intentado alguna técnica de relajación que te haya funcionado antes?",
      "timestamp": "2024-01-15T10:30:00.000Z",
      "context": "emocional"
    }
  }
}

Error Responses

{
  "success": false,
  "message": "Validation error",
  "errors": [
    {
      "field": "question",
      "message": "La pregunta debe tener al menos 10 caracteres"
    }
  ]
}

Integration Details

The mentorship service integrates with:
  • Claude AI Service (src/services/claudeService.js:15) - Generates AI responses with temperature 0.8 and max 800 tokens
  • Logger (src/services/mentorshipService.js:22) - Logs interactions for analytics

Source Code References

  • Route: src/routes/mentorshipRoutes.js:12
  • Controller: src/controllers/mentorshipController.js:5
  • Service: src/services/mentorshipService.js:10
  • Validator: src/validators/cuidoValidators.js:32

Build docs developers (and LLMs) love