Skip to main content

Base URL

The API is available at:
http://localhost:3001
In production, replace with your deployed server URL.

Authentication

The Nurse Handoff Helper API currently uses Supabase for data storage. Some endpoints require:
  • SUPABASE_URL: Your Supabase project URL
  • SUPABASE_ANON_KEY: Public anonymous key for client operations
  • SUPABASE_SERVICE_KEY: Service role key for admin operations (required for /api/nurses/create-accounts)
  • ANTHROPIC_API_KEY: Required for Claude AI endpoints
Set these in your .env file:
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_KEY=your-service-key
ANTHROPIC_API_KEY=your-anthropic-key

Request Format

All POST/PATCH requests should include:
Content-Type: application/json
For image uploads, use:
Content-Type: multipart/form-data

Response Format

All responses are returned in JSON format.

Success Response

{
  "success": true,
  "data": {...}
}

Error Response

{
  "error": "Error message",
  "details": "Additional error details"
}

HTTP Status Codes

Status CodeDescription
200Success
400Bad Request - Invalid parameters or missing required fields
404Not Found - Resource doesn’t exist
500Internal Server Error - Server-side error
503Service Unavailable - Required service (Claude, Supabase) not configured

Error Codes

error
string
Human-readable error message
details
string
Additional error details or stack trace information

Common Errors

Rate Limits

File upload limits:
  • Maximum file size: 10MB
  • Maximum JSON payload: 50MB

API Endpoints

Health Check

Check API and service availability

Image Analysis

Analyze handoff images with AI

Record Summarization

Generate AI-powered handoff summaries

Patients

Manage patient records

Nurses

Manage nurse accounts

Build docs developers (and LLMs) love