Connect AI to Your Training

Give your favorite AI a deep understanding of your training. Analyze fitness metrics, create and manage your training plan, manage your calendar, and schedule new workouts.

Get Connected Developer API

Your AI Training Assistant

Connect the AI of your choice to TrainerDay with our MCP

Claude

Add as a custom connector in Claude settings — log in with TrainerDay, no API key needed.

Get started →

ChatGPT

Add as a custom MCP server in ChatGPT settings — log in with TrainerDay, no API key needed. Free accounts work.

Get started →

Gemini

Add as a custom app on gemini.google.com

Add as a custom app on gemini.google.com (US only for now), or use Gemini CLI anywhere.

mdash; log in with TrainerDay, no API key needed. Gemini CLI works too.

Get started →

Developer API

Build custom integrations with the TrainerDay REST API

⚡

Personal API Keys

Generate a key instantly to access your own data. No OAuth setup needed for personal use.

📅

REST API

Full access to calendars, workouts, activities, and athlete data. Explore in Swagger →

🔗

OAuth 2.0 for Apps

For apps that riders connect their TrainerDay account to. Create one yourself for up to 10 users; apps with real users can request a review for more.

Learn more →

API Endpoints

Method Endpoint Description Scope
GET /api/v1/athlete Your profile, FTP, zones athlete:read
GET /api/v1/calendar Calendar workouts (startDate, endDate) calendar:read
POST /api/v1/calendar/events Create calendar event calendar:write
PUT /api/v1/calendar/events/:id Update calendar event calendar:write
DELETE /api/v1/calendar/events/:id Delete calendar event calendar:write
GET /api/v1/activities Completed activities activities:read
POST /api/v1/activities/upload Upload activity file (TCX/GPX/FIT) activities:write

Quick Start

# 1. Get your API key at /developer

# 2. Fetch your athlete profile
curl -H "Authorization: Bearer td_your_api_key" \
  https://api.trainerday.com/api/v1/athlete

# 3. Read your calendar
curl -H "Authorization: Bearer td_your_api_key" \
  "https://api.trainerday.com/api/v1/calendar?startDate=2026-01-01&endDate=2026-01-31"

# 4. Add a workout to your calendar
curl -X POST -H "Authorization: Bearer td_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"calendarDate":"2026-01-15","embedWorkout":{"title":"Easy Spin","durationMinutes":30,"segments":[[10,50,50],[10,60,60],[10,45,45]]}}' \
  https://api.trainerday.com/api/v1/calendar/events

OAuth 2.0 for Third-Party Apps

For apps

OAuth 2.0 is for apps whose users connect their own TrainerDay accounts. It works in two levels:

  • Development. Any paid TrainerDay member can create an OAuth app here and use it right away, with up to 10 connected users. Riders see a note that TrainerDay has not reviewed the app.
  • Reviewed. For existing apps with real users. Request a review with a link where we can see your app, and we lift the user limit.

Already have an app with users, or want to talk first? Contact us and we can set you up directly.

Only want your own data? A personal API key is simpler.

Create Your OAuth App

Tell us the app's name, describe it in a sentence or two and add a redirect URI (http://localhost is allowed for development). You get a client_id and client_secret at once.

Your OAuth Apps

Redirect User to Authorize

GET https://api.trainerday.com/oauth/authorize?
  client_id=YOUR_CLIENT_ID&
  response_type=code&
  redirect_uri=https://yourapp.com/callback&
  scope=athlete:read calendar:read

Exchange Code for Tokens

POST https://api.trainerday.com/oauth/token
Content-Type: application/x-www-form-urlencoded

grant_type=authorization_code&
code=AUTH_CODE&
redirect_uri=https://yourapp.com/callback&
client_id=YOUR_CLIENT_ID&
client_secret=YOUR_CLIENT_SECRET

Make API Requests

curl -H "Authorization: Bearer ACCESS_TOKEN" \
  https://api.trainerday.com/api/v1/athlete

Access tokens expire after 6 hours. Use the refresh token to get a new one via grant_type=refresh_token.

Available Scopes

athlete:read View profile
athlete:write Edit profile
workout:read View workouts
workout:write Create workouts
calendar:read View calendar
calendar:write Modify calendar
activities:read View activities
activities:write Upload activities

Additional OAuth Endpoints

POST /oauth/token Exchange code or refresh token
POST /oauth/token/revoke Revoke a token
POST /oauth/token/introspection Validate a token