skills$openclaw/intervals-icu-api
pseuss420

by pseuss

intervals-icu-api – OpenClaw Skill

intervals-icu-api is an OpenClaw Skills integration for coding workflows. Complete guide for accessing and managing training data with the intervals.icu API. Use when working with Intervals.icu athlete profiles, activities, workouts, events, wellness data, and training plans. Covers authentication, retrieving activities with combined data fields, managing calendar events with planned workouts, and creating/updating training data. Includes curl examples for all major operations.

420 stars6.9k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

nameintervals-icu-api
descriptionComplete guide for accessing and managing training data with the intervals.icu API. Use when working with Intervals.icu athlete profiles, activities, workouts, events, wellness data, and training plans. Covers authentication, retrieving activities with combined data fields, managing calendar events with planned workouts, and creating/updating training data. Includes curl examples for all major operations. OpenClaw Skills integration.
ownerpseuss
repositorypseuss/intervals-icu-api
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @pseuss/intervals-icu-api
last updatedFeb 7, 2026

Maintainer

pseuss

pseuss

Maintains intervals-icu-api in the OpenClaw Skills directory.

View GitHub profile
File Explorer
3 files
.
_meta.json
464 B
README.md
9.4 KB
SKILL.md
21.5 KB
SKILL.md

name: intervals-icu-api description: Complete guide for accessing and managing training data with the intervals.icu API. Use when working with Intervals.icu athlete profiles, activities, workouts, events, wellness data, and training plans. Covers authentication, retrieving activities with combined data fields, managing calendar events with planned workouts, and creating/updating training data. Includes curl examples for all major operations.

Intervals.icu API Skill

Comprehensive guide for interacting with the intervals.icu API to manage athlete training data, activities, workouts, and calendar events.

Authentication

API Key Method

Get your Athlete ID and API Key from intervals.icu settings page.

# Using API Key header
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID

Bearer Token Method (OAuth)

# Using Bearer token
curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID

Base URL: https://intervals.icu/api/v1

Date Format: ISO-8601 (e.g., 2024-01-15 or 2024-01-15T10:30:00)


Core Concepts

Athlete ID

Your unique identifier in Intervals.icu. Used in all API endpoints as {id} path parameter.

Activities vs Events

  • Activities: Completed workouts with actual data (GPS, power, HR). Retrieved from /athlete/{id}/activities
  • Events: Planned workouts on your calendar. Retrieved from /athlete/{id}/events

Data Fields

Activities and events can return different fields. Use the fields query parameter to include/exclude specific data points for more efficient queries.


Getting Activities (Completed Workouts)

List Activities for Date Range

Retrieve all activities between two dates, sorted newest to oldest.

# Basic activity list
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities?oldest=2024-01-01&newest=2024-01-31"

# With limit
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities?oldest=2024-01-01&limit=10"

# Specific fields only (more efficient)
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities?oldest=2024-01-01&fields=id,name,start_date_local,type,distance,moving_time,icu_training_load"

# For specific activity type (Ride, Run, Swim, etc.)
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities?oldest=2024-01-01&newest=2024-01-31" | jq '.[] | select(.type == "Ride")'

Combine Activities with External Data

Use fields parameter to combine activity data with contextual information:

# Power, HR, and load data
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities?oldest=2024-01-01&fields=name,icu_weighted_avg_watts,average_heartrate,icu_training_load,icu_atl,icu_ctl"

# Include fatigue and fitness metrics
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities?oldest=2024-01-01&fields=id,name,type,icu_training_load,icu_atl,icu_ctl,perceived_exertion"

# Combine power zones and zone times
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities?oldest=2024-01-01&fields=id,name,distance,moving_time,icu_zone_times,icu_weighted_avg_watts"

# HR zones + intensity data
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities?oldest=2024-01-01&fields=id,name,type,average_heartrate,max_heartrate,icu_hr_zone_times,trimp"

Get Single Activity with Full Details

# Get activity by ID with all data
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/activity/ACTIVITY_ID"

# Get activity with intervals
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/activity/ACTIVITY_ID?intervals=true"

Export Activity Streams (CSV or JSON)

# Get activity streams as JSON
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/activity/ACTIVITY_ID/streams.json"

# Get activity streams as CSV (includes time, power, heart_rate, cadence, etc.)
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/activity/ACTIVITY_ID/streams.csv" \
  --output activity_streams.csv

# Get specific stream types
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/activity/ACTIVITY_ID/streams.json?types=watts,heart_rate,cadence"

Calendar & Planned Workouts

List Calendar Events (Planned Workouts)

Retrieve planned workouts, notes, and training targets from your calendar.

# Get all events in date range
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?oldest=2024-02-01&newest=2024-02-29"

# Get with specific fields
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?oldest=2024-02-01&newest=2024-02-29&fields=id,name,category,start_date_local,description"

# Filter by category (WORKOUT, NOTE, TARGET, FITNESS_DAYS, etc.)
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?oldest=2024-02-01&category=WORKOUT"

# Get workout targets for date range
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?oldest=2024-02-01&category=TARGET"

Get Single Event Details

# Get specific planned workout
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID"

Download Planned Workout File

Export planned workouts in various formats for your training device.

# Download as .zwo (Zwift format)
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID/download.zwo" \
  --output workout.zwo

# Download as .mrc (TrainerRoad format)
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID/download.mrc" \
  --output workout.mrc

# Download as .erg (Wahoo format)
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID/download.erg" \
  --output workout.erg

# Download as .fit (Garmin format)
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID/download.fit" \
  --output workout.fit

# Download multiple workouts as zip
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/workouts.zip?oldest=2024-02-01&newest=2024-02-29&ext=zwo" \
  --output workouts.zip

Creating & Writing Data

Create Manual Activity

Add a manually-logged activity to your training history.

# Basic manual activity
curl -X POST \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Morning Run",
    "type": "Run",
    "start_date_local": "2024-01-15T06:00:00",
    "distance": 10000,
    "moving_time": 3600,
    "description": "Easy morning run"
  }' \
  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities/manual

# With power (cycling activity)
curl -X POST \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Indoor Zwift",
    "type": "Ride",
    "start_date_local": "2024-01-15T18:00:00",
    "moving_time": 3600,
    "icu_joules": 900000,
    "icu_weighted_avg_watts": 250,
    "average_heartrate": 155,
    "trainer": true
  }' \
  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities/manual

# With external ID (for syncing with external systems)
curl -X POST \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Strava Activity",
    "type": "Run",
    "start_date_local": "2024-01-15T07:00:00",
    "distance": 5000,
    "moving_time": 1800,
    "external_id": "strava_12345"
  }' \
  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities/manual

Create Multiple Activities (Bulk)

# Bulk create activities
curl -X POST \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "name": "Monday Easy Run",
      "type": "Run",
      "start_date_local": "2024-01-15T06:00:00",
      "distance": 10000,
      "moving_time": 3600
    },
    {
      "name": "Tuesday Interval Ride",
      "type": "Ride",
      "start_date_local": "2024-01-16T18:00:00",
      "moving_time": 5400,
      "icu_weighted_avg_watts": 280
    }
  ]' \
  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities/manual/bulk

Create Planned Workout (Event on Calendar)

Add a scheduled workout to your calendar for future training.

# Basic planned workout
curl -X POST \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Vo2Max Intervals",
    "category": "WORKOUT",
    "start_date_local": "2024-02-15T18:00:00",
    "description": "6x 4min at 110% FTP with 3min recovery"
  }' \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?upsertOnUid=true"

# Planned workout with Intervals.icu format description
curl -X POST \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sweet Spot Build",
    "category": "WORKOUT",
    "start_date_local": "2024-02-16T18:00:00",
    "description": "[Workout \"Sweet Spot\" \"\" Bike 300\n  [SteadyState 600 88 92 \"\"]\n  [SteadyState 600 88 92 \"\"]\n  [SteadyState 600 88 92 \"\"]\n]"
  }' \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?upsertOnUid=true"

# Create workout from .zwo file contents
curl -X POST \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Zwift Structured Workout",
    "category": "WORKOUT",
    "start_date_local": "2024-02-17T19:00:00",
    "file_contents": "<Workout_Instruction version=\"1\">\n<author></author>\n<name>My Workout</name>\n<description></description>\n<sportType>Bike</sportType>\n<tags></tags>\n<workout>\n<Warmup Duration=\"600\" PowerLow=\"0.5\" PowerHigh=\"0.75\"/>\n<SteadyState Duration=\"1200\" Power=\"0.85\"/>\n</workout>\n</Workout_Instruction>"
  }' \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?upsertOnUid=true"

Create Multiple Events (Bulk)

# Bulk create planned workouts
curl -X POST \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "name": "Easy Spin",
      "category": "WORKOUT",
      "start_date_local": "2024-02-15T18:00:00",
      "description": "60min at 60-65% FTP"
    },
    {
      "name": "Threshold Work",
      "category": "WORKOUT",
      "start_date_local": "2024-02-17T19:00:00",
      "description": "3x 10min at 95-105% FTP"
    },
    {
      "name": "Long Run",
      "category": "WORKOUT",
      "start_date_local": "2024-02-18T07:00:00",
      "description": "90min easy run at conversational pace"
    }
  ]' \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/bulk?upsertOnUid=true&updatePlanApplied=true"

Create Training Target (Goal for Date)

Set a specific training target for a date.

# Create power target
curl -X POST \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "FTP Test Target",
    "category": "TARGET",
    "start_date_local": "2024-02-20T18:00:00",
    "description": "Target power: 300W"
  }' \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?upsertOnUid=true"

# Create duration target
curl -X POST \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Daily Volume Target",
    "category": "TARGET",
    "start_date_local": "2024-02-21T00:00:00",
    "description": "Target: 2 hours training"
  }' \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?upsertOnUid=true"

Updating Data

Update Activity

Modify an existing completed activity.

# Update activity notes and tags
curl -X PUT \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Recovery Ride - Updated",
    "description": "Felt great, good recovery",
    "commute": false
  }' \
  https://intervals.icu/api/v1/activity/ACTIVITY_ID

# Update activity perceived exertion and feel
curl -X PUT \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "perceived_exertion": 7,
    "feel": 8,
    "description": "Good session, felt strong"
  }' \
  https://intervals.icu/api/v1/activity/ACTIVITY_ID

Update Planned Workout (Event)

Modify a scheduled event on your calendar.

# Update workout details
curl -X PUT \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Modified VO2Max Session",
    "description": "8x 3min at 130% FTP with 2min recovery - UPDATED"
  }' \
  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID

# Hide event from athlete view
curl -X PUT \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "hide_from_athlete": true
  }' \
  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID

# Prevent athlete from editing event
curl -X PUT \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "athlete_cannot_edit": true
  }' \
  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID

Update Multiple Events (Date Range)

# Hide all workouts for a week
curl -X PUT \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "hide_from_athlete": true
  }' \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?oldest=2024-02-15&newest=2024-02-22"

Wellness & Recovery Data

Get Wellness Records

Track sleep, fatigue, resting HR, and other wellness metrics.

# Get wellness data for date range
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness?oldest=2024-01-01&newest=2024-01-31"

# Get wellness data as CSV
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness.csv?oldest=2024-01-01&newest=2024-01-31" \
  --output wellness.csv

# Get specific wellness fields
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness?oldest=2024-01-01&fields=id,sleep_secs,soreness,fatigue,resting_hr,notes"

Update Wellness Record

Log wellness data for a specific date.

# Add sleep, HRV, and fatigue
curl -X PUT \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "2024-01-15",
    "sleep_secs": 28800,
    "resting_hr": 52,
    "fatigue": 3,
    "soreness": 2
  }' \
  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness/2024-01-15

# Add notes
curl -X PUT \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "2024-01-15",
    "notes": "Great sleep, feeling recovered"
  }' \
  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness/2024-01-15

Bulk Update Wellness Records

# Update multiple wellness days at once
curl -X PUT \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "id": "2024-01-15",
      "sleep_secs": 28800,
      "resting_hr": 52
    },
    {
      "id": "2024-01-16",
      "sleep_secs": 30600,
      "resting_hr": 50
    },
    {
      "id": "2024-01-17",
      "sleep_secs": 27000,
      "resting_hr": 54
    }
  ]' \
  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness-bulk

Sport Settings & Zones

Get Sport Settings

Retrieve power zones, HR zones, and FTP settings for a sport.

# Get Ride settings
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/sport-settings/Ride"

# Get Run settings
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/sport-settings/Run"

# List all sport settings
curl -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/sport-settings"

Update Sport Settings

Modify power zones, FTP, or HR zones.

# Update FTP and power zones
curl -X PUT \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ftp": 310,
    "power_zones": [0, 114, 152, 191, 229, 267, 310]
  }' \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/sport-settings/Ride?recalcHrZones=false"

# Update LTHR and HR zones
curl -X PUT \
  -H "Authorization: ApiKey API_KEY:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "lthr": 165,
    "hr_zones": [0, 123, 142, 160, 178, 197, 220]
  }' \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/sport-settings/Ride?recalcHrZones=true"

Common Use Cases

Workflow: Sync Training Data with External System

#!/bin/bash

ATHLETE_ID="YOUR_ATHLETE_ID"
API_KEY="YOUR_API_KEY"
DATE="2024-01-15"

# 1. Get completed activities
ACTIVITIES=$(curl -s -H "Authorization: ApiKey $ATHLETE_ID:$API_KEY" \
  "https://intervals.icu/api/v1/athlete/$ATHLETE_ID/activities?oldest=$DATE&newest=$DATE&fields=id,name,type,distance,icu_training_load")

# 2. Get planned workouts for today
EVENTS=$(curl -s -H "Authorization: ApiKey $ATHLETE_ID:$API_KEY" \
  "https://intervals.icu/api/v1/athlete/$ATHLETE_ID/events?oldest=$DATE&newest=$DATE&category=WORKOUT")

# 3. Get wellness data
WELLNESS=$(curl -s -H "Authorization: ApiKey $ATHLETE_ID:$API_KEY" \
  "https://intervals.icu/api/v1/athlete/$ATHLETE_ID/wellness/$DATE")

echo "Activities: $ACTIVITIES"
echo "Events: $EVENTS"
echo "Wellness: $WELLNESS"

Workflow: Create Weekly Training Plan

#!/bin/bash

ATHLETE_ID="YOUR_ATHLETE_ID"
API_KEY="YOUR_API_KEY"

# Define workouts for the week
WORKOUTS='[
  {
    "name": "Monday - Easy Spin",
    "category": "WORKOUT",
    "start_date_local": "2024-02-19T18:00:00",
    "description": "60min at 60-65% FTP"
  },
  {
    "name": "Tuesday - VO2Max",
    "category": "WORKOUT",
    "start_date_local": "2024-02-20T18:00:00",
    "description": "6x 4min at 110% FTP with 3min recovery"
  },
  {
    "name": "Wednesday - Recovery",
    "category": "WORKOUT",
    "start_date_local": "2024-02-21T18:00:00",
    "description": "45min easy"
  },
  {
    "name": "Thursday - Threshold",
    "category": "WORKOUT",
    "start_date_local": "2024-02-22T19:00:00",
    "description": "2x 15min at 95-105% FTP"
  },
  {
    "name": "Friday - Rest Day",
    "category": "NOTE",
    "start_date_local": "2024-02-23T00:00:00",
    "description": "Rest and recovery"
  },
  {
    "name": "Saturday - Long Ride",
    "category": "WORKOUT",
    "start_date_local": "2024-02-24T09:00:00",
    "description": "150min at Zone 2"
  },
  {
    "name": "Sunday - Easy Recovery",
    "category": "WORKOUT",
    "start_date_local": "2024-02-25T10:00:00",
    "description": "60min easy spin"
  }
]'

# Create all workouts at once
curl -X POST \
  -H "Authorization: ApiKey $ATHLETE_ID:$API_KEY" \
  -H "Content-Type: application/json" \
  -d "$WORKOUTS" \
  "https://intervals.icu/api/v1/athlete/$ATHLETE_ID/events/bulk?upsertOnUid=true&updatePlanApplied=true"

Workflow: Analyze Week Data

#!/bin/bash

ATHLETE_ID="YOUR_ATHLETE_ID"
API_KEY="YOUR_API_KEY"

# Get activities with load and zone data for the week
curl -s -H "Authorization: ApiKey $ATHLETE_ID:$API_KEY" \
  "https://intervals.icu/api/v1/athlete/$ATHLETE_ID/activities?oldest=2024-01-08&newest=2024-01-14&fields=name,type,distance,icu_training_load,icu_zone_times,average_heartrate" | \
  jq '[.[] | {name: .name, load: .icu_training_load, zones: .icu_zone_times, hr: .average_heartrate}]'

Important Notes

Rate Limiting

Be respectful with API calls. Don't hammer the API with rapid successive requests.

Field Selection

Use the fields parameter to request only the data you need. This improves performance and reduces payload size.

Date Formats

Always use ISO-8601 format: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS

Upsert Parameter

When creating events, use upsertOnUid=true to update existing events with matching UIDs instead of creating duplicates.

External IDs

Use external_id when syncing data from other systems to avoid duplicates on re-sync.

Forum Discussion

For more detailed API information, see: API Access Forum Post


Response Status Codes

  • 200: Success
  • 201: Created successfully (activities, events)
  • 400: Bad request (invalid parameters)
  • 401: Unauthorized (invalid API key or token)
  • 404: Not found (invalid IDs)
  • 429: Rate limited (too many requests)
  • 500: Server error

Check response headers for error details and rate limit information.

README.md

Intervals.icu API Skill

A comprehensive Claude Skill for working with the intervals.icu API. Provides clear guidance on authenticating, retrieving training activities, managing calendar events, and logging wellness data.

Overview

This skill enables you to:

  • Get Activities: Retrieve completed workouts with power, heart rate, and load data
  • Manage Calendar: Create, update, and delete planned workouts on your training calendar
  • Combine Data: Use field selectors to pull activities with contextual metrics (fitness, fatigue, zones)
  • Log Wellness: Track sleep, soreness, resting HR, and recovery metrics
  • Upload Data: Create manual activities and bulk-import training sessions
  • Export Workouts: Download planned workouts in device formats (.zwo, .mrc, .erg, .fit)

Quick Start

1. Get Your Credentials

Visit intervals.icu settings and find:

  • Your Athlete ID
  • Your API Key

2. Authenticate

Two authentication methods are supported:

API Key Method:

curl -H "Authorization: ApiKey YOUR_ATHLETE_ID:YOUR_API_KEY" \
  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID

Bearer Token (OAuth):

curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID

3. Common Operations

List activities for a date range:

curl -H "Authorization: ApiKey YOUR_ATHLETE_ID:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities?oldest=2024-01-01&newest=2024-01-31"

Get planned workouts:

curl -H "Authorization: ApiKey YOUR_ATHLETE_ID:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?oldest=2024-02-01&newest=2024-02-29&category=WORKOUT"

Create a planned workout:

curl -X POST \
  -H "Authorization: ApiKey YOUR_ATHLETE_ID:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sweet Spot Build",
    "category": "WORKOUT",
    "start_date_local": "2024-02-16T18:00:00",
    "description": "3x 10min at 88-92% FTP"
  }' \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?upsertOnUid=true"

Log wellness data:

curl -X PUT \
  -H "Authorization: ApiKey YOUR_ATHLETE_ID:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "2024-01-15",
    "sleep_secs": 28800,
    "resting_hr": 52,
    "fatigue": 3
  }' \
  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness/2024-01-15

Key Features

Activities with Combined Data

Pull activities with specific data fields for efficient queries:

# Power, HR, and training load
curl -H "Authorization: ApiKey YOUR_ATHLETE_ID:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities?oldest=2024-01-01&fields=name,icu_weighted_avg_watts,average_heartrate,icu_training_load,icu_atl,icu_ctl"

# Zone times and intensity
curl -H "Authorization: ApiKey YOUR_ATHLETE_ID:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities?oldest=2024-01-01&fields=id,name,distance,moving_time,icu_zone_times,icu_weighted_avg_watts"

Calendar Management

Create weekly training plans:

# Bulk create workouts for the week
curl -X POST \
  -H "Authorization: ApiKey YOUR_ATHLETE_ID:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {"name": "Easy Spin", "category": "WORKOUT", "start_date_local": "2024-02-15T18:00:00", "description": "60min at 60-65% FTP"},
    {"name": "VO2Max", "category": "WORKOUT", "start_date_local": "2024-02-20T18:00:00", "description": "6x 4min at 110% FTP"},
    {"name": "Recovery", "category": "WORKOUT", "start_date_local": "2024-02-21T18:00:00", "description": "45min easy"}
  ]' \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/bulk?upsertOnUid=true&updatePlanApplied=true"

Structured Workouts

Download planned workouts in device formats:

# Zwift format
curl -H "Authorization: ApiKey YOUR_ATHLETE_ID:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID/download.zwo" \
  --output workout.zwo

# TrainerRoad format
curl -H "Authorization: ApiKey YOUR_ATHLETE_ID:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID/download.mrc" \
  --output workout.mrc

# Garmin format
curl -H "Authorization: ApiKey YOUR_ATHLETE_ID:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID/download.fit" \
  --output workout.fit

Wellness Tracking

Bulk update recovery metrics:

curl -X PUT \
  -H "Authorization: ApiKey YOUR_ATHLETE_ID:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {"id": "2024-01-15", "sleep_secs": 28800, "resting_hr": 52},
    {"id": "2024-01-16", "sleep_secs": 30600, "resting_hr": 50},
    {"id": "2024-01-17", "sleep_secs": 27000, "resting_hr": 54}
  ]' \
  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness-bulk

API Endpoints Overview

Activities

  • GET /athlete/{id}/activities - List completed workouts
  • POST /athlete/{id}/activities/manual - Create manual activity
  • PUT /activity/{id} - Update activity
  • GET /activity/{id} - Get activity details
  • GET /activity/{id}/streams.csv - Export activity data

Calendar Events

  • GET /athlete/{id}/events - List planned workouts
  • POST /athlete/{id}/events - Create event
  • PUT /athlete/{id}/events/{eventId} - Update event
  • DELETE /athlete/{id}/events/{eventId} - Delete event
  • POST /athlete/{id}/events/bulk - Bulk create events

Wellness

  • GET /athlete/{id}/wellness - Get wellness records
  • PUT /athlete/{id}/wellness/{date} - Update wellness for date
  • PUT /athlete/{id}/wellness-bulk - Bulk update wellness

Sport Settings

  • GET /athlete/{id}/sport-settings - List sport settings
  • PUT /athlete/{id}/sport-settings/{sport} - Update zones and FTP

Date Formats

Always use ISO-8601 format:

  • Date only: 2024-01-15
  • Date and time: 2024-01-15T10:30:00

Field Selection

Use the fields parameter to request only needed data (improves performance):

# Request specific fields instead of all
curl -H "Authorization: ApiKey YOUR_ATHLETE_ID:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities?oldest=2024-01-01&fields=id,name,type,distance,icu_training_load"

Common Fields

Activity Fields

  • id - Activity ID
  • name - Activity name
  • type - Activity type (Ride, Run, Swim, etc.)
  • distance - Distance in meters
  • moving_time - Moving time in seconds
  • icu_weighted_avg_watts - Average power (cycling)
  • average_heartrate - Average heart rate
  • max_heartrate - Max heart rate
  • icu_training_load - Training load score
  • icu_atl - Acute training load
  • icu_ctl - Chronic training load
  • icu_zone_times - Time in each power zone
  • icu_hr_zone_times - Time in each HR zone
  • perceived_exertion - Perceived exertion (1-10)

Event Fields

  • id - Event ID
  • name - Event name
  • category - Event category (WORKOUT, NOTE, TARGET, etc.)
  • start_date_local - Event start time
  • description - Event description/workout details
  • hide_from_athlete - Hide from athlete view
  • athlete_cannot_edit - Lock from athlete edits

Wellness Fields

  • id - Date (ISO-8601)
  • sleep_secs - Sleep duration in seconds
  • resting_hr - Resting heart rate
  • fatigue - Fatigue level (1-10)
  • soreness - Soreness level (1-10)
  • notes - Daily notes

Response Codes

CodeMeaning
200Success
201Created successfully
400Bad request (invalid parameters)
401Unauthorized (invalid API key)
404Not found (invalid ID)
429Rate limited (slow down)
500Server error

Use Cases

Track Weekly Training

Pull activities + wellness data to analyze week:

# Get activities with load metrics
curl -H "Authorization: ApiKey YOUR_ATHLETE_ID:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities?oldest=2024-01-08&newest=2024-01-14&fields=name,type,icu_training_load,average_heartrate"

# Get wellness for the week
curl -H "Authorization: ApiKey YOUR_ATHLETE_ID:YOUR_API_KEY" \
  "https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness?oldest=2024-01-08&newest=2024-01-14"

Create Training Plan

Bulk upload week of workouts:

# See "Calendar Management" section for example

Sync with External System

Export and import training data between tools using external_ids.

Monitor Fitness

Track Acute/Chronic Training Load (ATL/CTL) over time to monitor fitness and fatigue.

Documentation

For complete API documentation, see:

Tips

  • Rate Limiting: Don't hammer the API. Use reasonable delays between requests.
  • Bulk Operations: Use bulk endpoints (/bulk) instead of multiple single requests.
  • Field Selection: Always specify needed fields with fields parameter.
  • Upsert: Use upsertOnUid=true to update instead of duplicate when creating events.
  • External IDs: Use external_id for syncing across systems.

License

This skill is provided as-is for use with Intervals.icu API.

Resources

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

  • OpenClaw CLI installed and configured.
  • Language: Markdown
  • License: MIT
  • Topics:

FAQ

How do I install intervals-icu-api?

Run openclaw add @pseuss/intervals-icu-api in your terminal. This installs intervals-icu-api into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/pseuss/intervals-icu-api. Review commits and README documentation before installing.