WeSleep API - Sleep Intelligence for Wellness Platforms

Detectamos tendencias, no enfermedades.

Our proprietary algorithm learns each user's sleep patterns and wakes them at the optimal moment in their cycle. Integrate WeSleep into your app or platform — without building anything from scratch.

WeSleep iPad Dashboard

Powerful Sleep Analytics

Comprehensive sleep data and insights to enhance your healthcare platform

Sleep Cycle Analysis

Detailed tracking of sleep stages, cycles, and patterns with millisecond precision

Smart Predictive Alarm

Patented algorithm analyzes user history to find the optimal wake-up moment within a 30-minute window, avoiding deep sleep phases and sleep inertia

Preventive Health Analysis

AI-powered analysis of HRV, sleep phases, and SpO₂ trends to detect health deterioration patterns before they become chronic conditions

Dual-Layer Insights

Weekly user engagement summaries and monthly clinical anomaly detection with proactive referral recommendations

White-Label Solution

B2B SaaS model designed for seamless integration into healthcare insurance ecosystems with your branding

No-Diagnosis AI System

Advanced LLM analysis with strict constraints to provide insights without medical diagnoses, acting as an early warning system

B2B SaaS for Wellness Platforms

White-label solution designed to enhance patient retention and reduce medical costs through preventative care

Patient Retention

Daily smart alarm usage creates high engagement with your insurance platform, building lasting member relationships

Cost Reduction

Early detection through monthly anomaly alerts prevents expensive chronic treatments, reducing overall healthcare costs

Multi-Tenant Architecture

FastAPI backend with PostgreSQL, supporting multiple insurance providers with complete data isolation

How WeSleep Works

From wearable data to actionable health insights

Data Flow
1. Wearable Data Ingestion
   POST /api/v1/webhooks/wearable/
   → Raw sleep data securely ingested and normalized

2. Smart Alarm Prediction
   POST /api/v1/sleep/smart-alarm
   → Optimal wake-up window calculated in real time

3. Weekly User Insights
   GET /api/v1/insights/weekly/{user_id}
   → Personalized engagement summaries

4. Monthly Trend Detection
   GET /api/v1/insights/monthly/{user_id}
   → Sustained pattern alerts, no diagnosis

Key Metrics Analyzed

  • Heart Rate Variability (HRV) - Recovery and stress indicator
  • Sleep Phases Distribution - Light, deep, and REM patterns
  • Blood Oxygen (SpO₂) - Respiratory quality indicator
  • Sleep Efficiency - Quality vs time in bed ratio
  • Trend Analysis - Intra-month deterioration patterns
  • AI-Powered Reasoning - Proprietary sleep-intelligence engine with built-in no-diagnosis safeguards

Seamless Integration

Get started in minutes with our developer-friendly API

JavaScript
const response = await fetch('https://api.wesleep.pro/smart-alarm', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    sleep_record_id: '0134ff3c-3f60-8c46-8e4e-c0dd218c4e3a',
    target_time: '2026-02-12T07:00:00Z'
  })
});

const alarm = await response.json();
console.log(alarm);
// { suggested_time: "2026-02-12T06:45:00Z", confidence: 0.9, ... }

Developer-Friendly Features

  • FastAPI-based architecture with clear documentation
  • Ready-to-use frontend dashboard for data visualization
  • Webhook support for real-time updates
  • Comprehensive error handling
  • Rate limiting and monitoring

Comprehensive Documentation

Everything you need to integrate sleep intelligence into your platform

Getting Started

Quick start guide and authentication setup

Read More →

API Reference

Complete API documentation with examples

Read More →

SDKs & Libraries

Official SDKs for popular programming languages

Read More →

Webhooks

Real-time data updates and event notifications

Read More →