Overview
The Wellbeing API manages employee wellbeing surveys with a strict 12 surveys per user per year limit. Surveys include AI-powered sentiment analysis and risk level assessment to identify employees needing support.Rate Limiting
Critical Business Rule: Users can submit a maximum of 12 wellbeing surveys per calendar year.- Attempts beyond the limit return
429 Too Many Requests - Limit resets annually on January 1st
- Emergency override available for crisis situations
Endpoints
Submit Survey
POST/api/wellbeing/survey
Submit a wellbeing survey response.
Request Body:
- Automatic sentiment analysis (positive/neutral/negative)
- Risk level assessment (low/medium/high)
- Keyword extraction for support needs
List Surveys
GET/api/wellbeing/surveys
Retrieve survey history (user’s own or admin access).
Query Parameters:
userId: Filter by specific user (admin only)
Check Eligibility
GET/api/wellbeing/eligibility
Check if user can submit another survey.
Response:
Get Statistics
GET/api/wellbeing/stats
Retrieve aggregated wellbeing statistics.
Response:
Survey Structure
Standard Questions
Surveys typically include 8-12 standardized questions:- Stress Level (1-10 scale)
- Work-Life Balance (1-10 scale)
- Support from Colleagues (1-10 scale)
- Mental Health Resources Used (count)
- Overall Job Satisfaction (1-10 scale)
- Open Comments (optional text)
Custom Questions
Organizations can configure additional custom questions:AI Analysis
Sentiment Analysis
- Positive: Scores 7-10, supportive language
- Neutral: Scores 4-6, balanced feedback
- Negative: Scores 1-3, concerning language
Risk Assessment
- Low Risk: Consistent positive scores, no concerning keywords
- Medium Risk: Mixed scores, occasional stress indicators
- High Risk: Low scores, crisis keywords (burnout, depression, suicidal)
Automated Alerts
- High-risk surveys trigger immediate HR notifications
- Medium-risk surveys flagged for follow-up
- Crisis keywords trigger emergency protocols
Business Rules
- Annual Limit: 12 surveys maximum per user per year
- Emergency Override: Crisis situations can bypass limit
- Confidentiality: Surveys anonymized for aggregate reporting
- AI Fallback: Sentiment analysis falls back to neutral if AI unavailable
- Retention: Survey data retained for 7 years for compliance
Privacy & Compliance
Data Protection
- Surveys stored encrypted at rest
- PII automatically redacted from comments
- Access restricted to HR and employee themselves
- Audit trail for all survey access
Compliance
- GDPR compliant data processing
- HIPAA equivalent protections for mental health data
- Regular security audits and penetration testing
