Skip to content

API Overview

The FitRepo API is a JSON REST API that powers both the web app and the MCP server. You can call it directly to build integrations or automate data access.

https://mydatafor.life

If self-hosting, replace with your instance URL.

All API endpoints (except /api/health) require a personal API key sent as a Bearer token:

Authorization: Bearer your-api-key-here

Generate an API key in Settings → MCP API Key.

All responses are JSON. Successful responses return HTTP 2xx. Errors return a JSON body:

{ "error": "Human-readable error message" }

Common status codes:

CodeMeaning
200OK
400Bad request (invalid parameters)
401Unauthorized (missing or invalid API key)
404Not found
409Conflict (e.g. backfill already running)
503Service degraded (see /api/health)

List endpoints accept limit (default 20, max 100) and offset query parameters.

Dates are accepted as YYYY-MM-DD strings. Timestamps are returned as ISO 8601 UTC strings (2025-03-15T07:30:00Z).

MethodPathDescription
GET/api/healthHealthcheck
GET/api/mcp/activitiesList activities
GET/api/mcp/activities/:idGet activity
GET/api/mcp/fitnessFitness timeline (CTL/ATL/TSB)
GET/api/mcp/best-effortsAll-time best efforts
GET/api/mcp/wellnessWellness log
GET/api/mcp/thresholdsThreshold history
GET/api/mcp/profileAthlete profile
POST/api/mcp/keysGenerate API key
DELETE/api/mcp/keysRevoke API key
GET/api/account/exportExport all data (JSON download)
DELETE/api/account/deleteDelete account (GDPR erasure)