{
  "schemaVersion": "1.0",
  "item": {
    "slug": "intervals-icu-api",
    "name": "Intervals Icu Api",
    "source": "tencent",
    "type": "skill",
    "category": "效率提升",
    "sourceUrl": "https://clawhub.ai/pseuss/intervals-icu-api",
    "canonicalUrl": "https://clawhub.ai/pseuss/intervals-icu-api",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/intervals-icu-api",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=intervals-icu-api",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/intervals-icu-api"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/intervals-icu-api",
    "agentPageUrl": "https://openagent3.xyz/skills/intervals-icu-api/agent",
    "manifestUrl": "https://openagent3.xyz/skills/intervals-icu-api/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/intervals-icu-api/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Intervals.icu API Skill",
        "body": "Comprehensive guide for interacting with the intervals.icu API to manage athlete training data, activities, workouts, and calendar events."
      },
      {
        "title": "API Key Method",
        "body": "Get your Athlete ID and API Key from intervals.icu settings page.\n\n# Using API Key header\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID"
      },
      {
        "title": "Bearer Token Method (OAuth)",
        "body": "# Using Bearer token\ncurl -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID\n\nBase URL: https://intervals.icu/api/v1\n\nDate Format: ISO-8601 (e.g., 2024-01-15 or 2024-01-15T10:30:00)"
      },
      {
        "title": "Athlete ID",
        "body": "Your unique identifier in Intervals.icu. Used in all API endpoints as {id} path parameter."
      },
      {
        "title": "Activities vs Events",
        "body": "Activities: Completed workouts with actual data (GPS, power, HR). Retrieved from /athlete/{id}/activities\nEvents: Planned workouts on your calendar. Retrieved from /athlete/{id}/events"
      },
      {
        "title": "Data Fields",
        "body": "Activities and events can return different fields. Use the fields query parameter to include/exclude specific data points for more efficient queries."
      },
      {
        "title": "List Activities for Date Range",
        "body": "Retrieve all activities between two dates, sorted newest to oldest.\n\n# Basic activity list\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities?oldest=2024-01-01&newest=2024-01-31\"\n\n# With limit\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities?oldest=2024-01-01&limit=10\"\n\n# Specific fields only (more efficient)\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"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\"\n\n# For specific activity type (Ride, Run, Swim, etc.)\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities?oldest=2024-01-01&newest=2024-01-31\" | jq '.[] | select(.type == \"Ride\")'"
      },
      {
        "title": "Combine Activities with External Data",
        "body": "Use fields parameter to combine activity data with contextual information:\n\n# Power, HR, and load data\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"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\"\n\n# Include fatigue and fitness metrics\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"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\"\n\n# Combine power zones and zone times\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"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\"\n\n# HR zones + intensity data\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"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\""
      },
      {
        "title": "Get Single Activity with Full Details",
        "body": "# Get activity by ID with all data\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/activity/ACTIVITY_ID\"\n\n# Get activity with intervals\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/activity/ACTIVITY_ID?intervals=true\""
      },
      {
        "title": "Export Activity Streams (CSV or JSON)",
        "body": "# Get activity streams as JSON\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/activity/ACTIVITY_ID/streams.json\"\n\n# Get activity streams as CSV (includes time, power, heart_rate, cadence, etc.)\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/activity/ACTIVITY_ID/streams.csv\" \\\n  --output activity_streams.csv\n\n# Get specific stream types\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/activity/ACTIVITY_ID/streams.json?types=watts,heart_rate,cadence\""
      },
      {
        "title": "List Calendar Events (Planned Workouts)",
        "body": "Retrieve planned workouts, notes, and training targets from your calendar.\n\n# Get all events in date range\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?oldest=2024-02-01&newest=2024-02-29\"\n\n# Get with specific fields\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"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\"\n\n# Filter by category (WORKOUT, NOTE, TARGET, FITNESS_DAYS, etc.)\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?oldest=2024-02-01&category=WORKOUT\"\n\n# Get workout targets for date range\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?oldest=2024-02-01&category=TARGET\""
      },
      {
        "title": "Get Single Event Details",
        "body": "# Get specific planned workout\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID\""
      },
      {
        "title": "Download Planned Workout File",
        "body": "Export planned workouts in various formats for your training device.\n\n# Download as .zwo (Zwift format)\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID/download.zwo\" \\\n  --output workout.zwo\n\n# Download as .mrc (TrainerRoad format)\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID/download.mrc\" \\\n  --output workout.mrc\n\n# Download as .erg (Wahoo format)\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID/download.erg\" \\\n  --output workout.erg\n\n# Download as .fit (Garmin format)\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID/download.fit\" \\\n  --output workout.fit\n\n# Download multiple workouts as zip\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/workouts.zip?oldest=2024-02-01&newest=2024-02-29&ext=zwo\" \\\n  --output workouts.zip"
      },
      {
        "title": "Create Manual Activity",
        "body": "Add a manually-logged activity to your training history.\n\n# Basic manual activity\ncurl -X POST \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Morning Run\",\n    \"type\": \"Run\",\n    \"start_date_local\": \"2024-01-15T06:00:00\",\n    \"distance\": 10000,\n    \"moving_time\": 3600,\n    \"description\": \"Easy morning run\"\n  }' \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities/manual\n\n# With power (cycling activity)\ncurl -X POST \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Indoor Zwift\",\n    \"type\": \"Ride\",\n    \"start_date_local\": \"2024-01-15T18:00:00\",\n    \"moving_time\": 3600,\n    \"icu_joules\": 900000,\n    \"icu_weighted_avg_watts\": 250,\n    \"average_heartrate\": 155,\n    \"trainer\": true\n  }' \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities/manual\n\n# With external ID (for syncing with external systems)\ncurl -X POST \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Strava Activity\",\n    \"type\": \"Run\",\n    \"start_date_local\": \"2024-01-15T07:00:00\",\n    \"distance\": 5000,\n    \"moving_time\": 1800,\n    \"external_id\": \"strava_12345\"\n  }' \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities/manual"
      },
      {
        "title": "Create Multiple Activities (Bulk)",
        "body": "# Bulk create activities\ncurl -X POST \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[\n    {\n      \"name\": \"Monday Easy Run\",\n      \"type\": \"Run\",\n      \"start_date_local\": \"2024-01-15T06:00:00\",\n      \"distance\": 10000,\n      \"moving_time\": 3600\n    },\n    {\n      \"name\": \"Tuesday Interval Ride\",\n      \"type\": \"Ride\",\n      \"start_date_local\": \"2024-01-16T18:00:00\",\n      \"moving_time\": 5400,\n      \"icu_weighted_avg_watts\": 280\n    }\n  ]' \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities/manual/bulk"
      },
      {
        "title": "Create Planned Workout (Event on Calendar)",
        "body": "Add a scheduled workout to your calendar for future training.\n\n# Basic planned workout\ncurl -X POST \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Vo2Max Intervals\",\n    \"category\": \"WORKOUT\",\n    \"start_date_local\": \"2024-02-15T18:00:00\",\n    \"description\": \"6x 4min at 110% FTP with 3min recovery\"\n  }' \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?upsertOnUid=true\"\n\n# Planned workout with Intervals.icu format description\ncurl -X POST \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Sweet Spot Build\",\n    \"category\": \"WORKOUT\",\n    \"start_date_local\": \"2024-02-16T18:00:00\",\n    \"description\": \"[Workout \\\"Sweet Spot\\\" \\\"\\\" Bike 300\\n  [SteadyState 600 88 92 \\\"\\\"]\\n  [SteadyState 600 88 92 \\\"\\\"]\\n  [SteadyState 600 88 92 \\\"\\\"]\\n]\"\n  }' \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?upsertOnUid=true\"\n\n# Create workout from .zwo file contents\ncurl -X POST \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Zwift Structured Workout\",\n    \"category\": \"WORKOUT\",\n    \"start_date_local\": \"2024-02-17T19:00:00\",\n    \"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>\"\n  }' \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?upsertOnUid=true\""
      },
      {
        "title": "Create Multiple Events (Bulk)",
        "body": "# Bulk create planned workouts\ncurl -X POST \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[\n    {\n      \"name\": \"Easy Spin\",\n      \"category\": \"WORKOUT\",\n      \"start_date_local\": \"2024-02-15T18:00:00\",\n      \"description\": \"60min at 60-65% FTP\"\n    },\n    {\n      \"name\": \"Threshold Work\",\n      \"category\": \"WORKOUT\",\n      \"start_date_local\": \"2024-02-17T19:00:00\",\n      \"description\": \"3x 10min at 95-105% FTP\"\n    },\n    {\n      \"name\": \"Long Run\",\n      \"category\": \"WORKOUT\",\n      \"start_date_local\": \"2024-02-18T07:00:00\",\n      \"description\": \"90min easy run at conversational pace\"\n    }\n  ]' \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/bulk?upsertOnUid=true&updatePlanApplied=true\""
      },
      {
        "title": "Create Training Target (Goal for Date)",
        "body": "Set a specific training target for a date.\n\n# Create power target\ncurl -X POST \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"FTP Test Target\",\n    \"category\": \"TARGET\",\n    \"start_date_local\": \"2024-02-20T18:00:00\",\n    \"description\": \"Target power: 300W\"\n  }' \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?upsertOnUid=true\"\n\n# Create duration target\ncurl -X POST \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Daily Volume Target\",\n    \"category\": \"TARGET\",\n    \"start_date_local\": \"2024-02-21T00:00:00\",\n    \"description\": \"Target: 2 hours training\"\n  }' \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?upsertOnUid=true\""
      },
      {
        "title": "Update Activity",
        "body": "Modify an existing completed activity.\n\n# Update activity notes and tags\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Recovery Ride - Updated\",\n    \"description\": \"Felt great, good recovery\",\n    \"commute\": false\n  }' \\\n  https://intervals.icu/api/v1/activity/ACTIVITY_ID\n\n# Update activity perceived exertion and feel\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"perceived_exertion\": 7,\n    \"feel\": 8,\n    \"description\": \"Good session, felt strong\"\n  }' \\\n  https://intervals.icu/api/v1/activity/ACTIVITY_ID"
      },
      {
        "title": "Update Planned Workout (Event)",
        "body": "Modify a scheduled event on your calendar.\n\n# Update workout details\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Modified VO2Max Session\",\n    \"description\": \"8x 3min at 130% FTP with 2min recovery - UPDATED\"\n  }' \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID\n\n# Hide event from athlete view\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"hide_from_athlete\": true\n  }' \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID\n\n# Prevent athlete from editing event\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"athlete_cannot_edit\": true\n  }' \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID"
      },
      {
        "title": "Update Multiple Events (Date Range)",
        "body": "# Hide all workouts for a week\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"hide_from_athlete\": true\n  }' \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?oldest=2024-02-15&newest=2024-02-22\""
      },
      {
        "title": "Get Wellness Records",
        "body": "Track sleep, fatigue, resting HR, and other wellness metrics.\n\n# Get wellness data for date range\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness?oldest=2024-01-01&newest=2024-01-31\"\n\n# Get wellness data as CSV\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness.csv?oldest=2024-01-01&newest=2024-01-31\" \\\n  --output wellness.csv\n\n# Get specific wellness fields\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness?oldest=2024-01-01&fields=id,sleep_secs,soreness,fatigue,resting_hr,notes\""
      },
      {
        "title": "Update Wellness Record",
        "body": "Log wellness data for a specific date.\n\n# Add sleep, HRV, and fatigue\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"id\": \"2024-01-15\",\n    \"sleep_secs\": 28800,\n    \"resting_hr\": 52,\n    \"fatigue\": 3,\n    \"soreness\": 2\n  }' \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness/2024-01-15\n\n# Add notes\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"id\": \"2024-01-15\",\n    \"notes\": \"Great sleep, feeling recovered\"\n  }' \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness/2024-01-15"
      },
      {
        "title": "Bulk Update Wellness Records",
        "body": "# Update multiple wellness days at once\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[\n    {\n      \"id\": \"2024-01-15\",\n      \"sleep_secs\": 28800,\n      \"resting_hr\": 52\n    },\n    {\n      \"id\": \"2024-01-16\",\n      \"sleep_secs\": 30600,\n      \"resting_hr\": 50\n    },\n    {\n      \"id\": \"2024-01-17\",\n      \"sleep_secs\": 27000,\n      \"resting_hr\": 54\n    }\n  ]' \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness-bulk"
      },
      {
        "title": "Get Sport Settings",
        "body": "Retrieve power zones, HR zones, and FTP settings for a sport.\n\n# Get Ride settings\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/sport-settings/Ride\"\n\n# Get Run settings\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/sport-settings/Run\"\n\n# List all sport settings\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/sport-settings\""
      },
      {
        "title": "Update Sport Settings",
        "body": "Modify power zones, FTP, or HR zones.\n\n# Update FTP and power zones\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"ftp\": 310,\n    \"power_zones\": [0, 114, 152, 191, 229, 267, 310]\n  }' \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/sport-settings/Ride?recalcHrZones=false\"\n\n# Update LTHR and HR zones\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"lthr\": 165,\n    \"hr_zones\": [0, 123, 142, 160, 178, 197, 220]\n  }' \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/sport-settings/Ride?recalcHrZones=true\""
      },
      {
        "title": "Workflow: Sync Training Data with External System",
        "body": "#!/bin/bash\n\nATHLETE_ID=\"YOUR_ATHLETE_ID\"\nAPI_KEY=\"YOUR_API_KEY\"\nDATE=\"2024-01-15\"\n\n# 1. Get completed activities\nACTIVITIES=$(curl -s -H \"Authorization: ApiKey $ATHLETE_ID:$API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/$ATHLETE_ID/activities?oldest=$DATE&newest=$DATE&fields=id,name,type,distance,icu_training_load\")\n\n# 2. Get planned workouts for today\nEVENTS=$(curl -s -H \"Authorization: ApiKey $ATHLETE_ID:$API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/$ATHLETE_ID/events?oldest=$DATE&newest=$DATE&category=WORKOUT\")\n\n# 3. Get wellness data\nWELLNESS=$(curl -s -H \"Authorization: ApiKey $ATHLETE_ID:$API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/$ATHLETE_ID/wellness/$DATE\")\n\necho \"Activities: $ACTIVITIES\"\necho \"Events: $EVENTS\"\necho \"Wellness: $WELLNESS\""
      },
      {
        "title": "Workflow: Create Weekly Training Plan",
        "body": "#!/bin/bash\n\nATHLETE_ID=\"YOUR_ATHLETE_ID\"\nAPI_KEY=\"YOUR_API_KEY\"\n\n# Define workouts for the week\nWORKOUTS='[\n  {\n    \"name\": \"Monday - Easy Spin\",\n    \"category\": \"WORKOUT\",\n    \"start_date_local\": \"2024-02-19T18:00:00\",\n    \"description\": \"60min at 60-65% FTP\"\n  },\n  {\n    \"name\": \"Tuesday - VO2Max\",\n    \"category\": \"WORKOUT\",\n    \"start_date_local\": \"2024-02-20T18:00:00\",\n    \"description\": \"6x 4min at 110% FTP with 3min recovery\"\n  },\n  {\n    \"name\": \"Wednesday - Recovery\",\n    \"category\": \"WORKOUT\",\n    \"start_date_local\": \"2024-02-21T18:00:00\",\n    \"description\": \"45min easy\"\n  },\n  {\n    \"name\": \"Thursday - Threshold\",\n    \"category\": \"WORKOUT\",\n    \"start_date_local\": \"2024-02-22T19:00:00\",\n    \"description\": \"2x 15min at 95-105% FTP\"\n  },\n  {\n    \"name\": \"Friday - Rest Day\",\n    \"category\": \"NOTE\",\n    \"start_date_local\": \"2024-02-23T00:00:00\",\n    \"description\": \"Rest and recovery\"\n  },\n  {\n    \"name\": \"Saturday - Long Ride\",\n    \"category\": \"WORKOUT\",\n    \"start_date_local\": \"2024-02-24T09:00:00\",\n    \"description\": \"150min at Zone 2\"\n  },\n  {\n    \"name\": \"Sunday - Easy Recovery\",\n    \"category\": \"WORKOUT\",\n    \"start_date_local\": \"2024-02-25T10:00:00\",\n    \"description\": \"60min easy spin\"\n  }\n]'\n\n# Create all workouts at once\ncurl -X POST \\\n  -H \"Authorization: ApiKey $ATHLETE_ID:$API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d \"$WORKOUTS\" \\\n  \"https://intervals.icu/api/v1/athlete/$ATHLETE_ID/events/bulk?upsertOnUid=true&updatePlanApplied=true\""
      },
      {
        "title": "Workflow: Analyze Week Data",
        "body": "#!/bin/bash\n\nATHLETE_ID=\"YOUR_ATHLETE_ID\"\nAPI_KEY=\"YOUR_API_KEY\"\n\n# Get activities with load and zone data for the week\ncurl -s -H \"Authorization: ApiKey $ATHLETE_ID:$API_KEY\" \\\n  \"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\" | \\\n  jq '[.[] | {name: .name, load: .icu_training_load, zones: .icu_zone_times, hr: .average_heartrate}]'"
      },
      {
        "title": "Rate Limiting",
        "body": "Be respectful with API calls. Don't hammer the API with rapid successive requests."
      },
      {
        "title": "Field Selection",
        "body": "Use the fields parameter to request only the data you need. This improves performance and reduces payload size."
      },
      {
        "title": "Date Formats",
        "body": "Always use ISO-8601 format: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS"
      },
      {
        "title": "Upsert Parameter",
        "body": "When creating events, use upsertOnUid=true to update existing events with matching UIDs instead of creating duplicates."
      },
      {
        "title": "External IDs",
        "body": "Use external_id when syncing data from other systems to avoid duplicates on re-sync."
      },
      {
        "title": "Forum Discussion",
        "body": "For more detailed API information, see: API Access Forum Post"
      },
      {
        "title": "Response Status Codes",
        "body": "200: Success\n201: Created successfully (activities, events)\n400: Bad request (invalid parameters)\n401: Unauthorized (invalid API key or token)\n404: Not found (invalid IDs)\n429: Rate limited (too many requests)\n500: Server error\n\nCheck response headers for error details and rate limit information."
      }
    ],
    "body": "Intervals.icu API Skill\n\nComprehensive guide for interacting with the intervals.icu API to manage athlete training data, activities, workouts, and calendar events.\n\nAuthentication\nAPI Key Method\n\nGet your Athlete ID and API Key from intervals.icu settings page.\n\n# Using API Key header\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID\n\nBearer Token Method (OAuth)\n# Using Bearer token\ncurl -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID\n\n\nBase URL: https://intervals.icu/api/v1\n\nDate Format: ISO-8601 (e.g., 2024-01-15 or 2024-01-15T10:30:00)\n\nCore Concepts\nAthlete ID\n\nYour unique identifier in Intervals.icu. Used in all API endpoints as {id} path parameter.\n\nActivities vs Events\nActivities: Completed workouts with actual data (GPS, power, HR). Retrieved from /athlete/{id}/activities\nEvents: Planned workouts on your calendar. Retrieved from /athlete/{id}/events\nData Fields\n\nActivities and events can return different fields. Use the fields query parameter to include/exclude specific data points for more efficient queries.\n\nGetting Activities (Completed Workouts)\nList Activities for Date Range\n\nRetrieve all activities between two dates, sorted newest to oldest.\n\n# Basic activity list\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities?oldest=2024-01-01&newest=2024-01-31\"\n\n# With limit\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities?oldest=2024-01-01&limit=10\"\n\n# Specific fields only (more efficient)\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"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\"\n\n# For specific activity type (Ride, Run, Swim, etc.)\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities?oldest=2024-01-01&newest=2024-01-31\" | jq '.[] | select(.type == \"Ride\")'\n\nCombine Activities with External Data\n\nUse fields parameter to combine activity data with contextual information:\n\n# Power, HR, and load data\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"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\"\n\n# Include fatigue and fitness metrics\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"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\"\n\n# Combine power zones and zone times\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"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\"\n\n# HR zones + intensity data\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"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\"\n\nGet Single Activity with Full Details\n# Get activity by ID with all data\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/activity/ACTIVITY_ID\"\n\n# Get activity with intervals\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/activity/ACTIVITY_ID?intervals=true\"\n\nExport Activity Streams (CSV or JSON)\n# Get activity streams as JSON\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/activity/ACTIVITY_ID/streams.json\"\n\n# Get activity streams as CSV (includes time, power, heart_rate, cadence, etc.)\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/activity/ACTIVITY_ID/streams.csv\" \\\n  --output activity_streams.csv\n\n# Get specific stream types\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/activity/ACTIVITY_ID/streams.json?types=watts,heart_rate,cadence\"\n\nCalendar & Planned Workouts\nList Calendar Events (Planned Workouts)\n\nRetrieve planned workouts, notes, and training targets from your calendar.\n\n# Get all events in date range\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?oldest=2024-02-01&newest=2024-02-29\"\n\n# Get with specific fields\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"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\"\n\n# Filter by category (WORKOUT, NOTE, TARGET, FITNESS_DAYS, etc.)\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?oldest=2024-02-01&category=WORKOUT\"\n\n# Get workout targets for date range\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?oldest=2024-02-01&category=TARGET\"\n\nGet Single Event Details\n# Get specific planned workout\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID\"\n\nDownload Planned Workout File\n\nExport planned workouts in various formats for your training device.\n\n# Download as .zwo (Zwift format)\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID/download.zwo\" \\\n  --output workout.zwo\n\n# Download as .mrc (TrainerRoad format)\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID/download.mrc\" \\\n  --output workout.mrc\n\n# Download as .erg (Wahoo format)\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID/download.erg\" \\\n  --output workout.erg\n\n# Download as .fit (Garmin format)\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID/download.fit\" \\\n  --output workout.fit\n\n# Download multiple workouts as zip\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/workouts.zip?oldest=2024-02-01&newest=2024-02-29&ext=zwo\" \\\n  --output workouts.zip\n\nCreating & Writing Data\nCreate Manual Activity\n\nAdd a manually-logged activity to your training history.\n\n# Basic manual activity\ncurl -X POST \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Morning Run\",\n    \"type\": \"Run\",\n    \"start_date_local\": \"2024-01-15T06:00:00\",\n    \"distance\": 10000,\n    \"moving_time\": 3600,\n    \"description\": \"Easy morning run\"\n  }' \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities/manual\n\n# With power (cycling activity)\ncurl -X POST \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Indoor Zwift\",\n    \"type\": \"Ride\",\n    \"start_date_local\": \"2024-01-15T18:00:00\",\n    \"moving_time\": 3600,\n    \"icu_joules\": 900000,\n    \"icu_weighted_avg_watts\": 250,\n    \"average_heartrate\": 155,\n    \"trainer\": true\n  }' \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities/manual\n\n# With external ID (for syncing with external systems)\ncurl -X POST \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Strava Activity\",\n    \"type\": \"Run\",\n    \"start_date_local\": \"2024-01-15T07:00:00\",\n    \"distance\": 5000,\n    \"moving_time\": 1800,\n    \"external_id\": \"strava_12345\"\n  }' \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities/manual\n\nCreate Multiple Activities (Bulk)\n# Bulk create activities\ncurl -X POST \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[\n    {\n      \"name\": \"Monday Easy Run\",\n      \"type\": \"Run\",\n      \"start_date_local\": \"2024-01-15T06:00:00\",\n      \"distance\": 10000,\n      \"moving_time\": 3600\n    },\n    {\n      \"name\": \"Tuesday Interval Ride\",\n      \"type\": \"Ride\",\n      \"start_date_local\": \"2024-01-16T18:00:00\",\n      \"moving_time\": 5400,\n      \"icu_weighted_avg_watts\": 280\n    }\n  ]' \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/activities/manual/bulk\n\nCreate Planned Workout (Event on Calendar)\n\nAdd a scheduled workout to your calendar for future training.\n\n# Basic planned workout\ncurl -X POST \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Vo2Max Intervals\",\n    \"category\": \"WORKOUT\",\n    \"start_date_local\": \"2024-02-15T18:00:00\",\n    \"description\": \"6x 4min at 110% FTP with 3min recovery\"\n  }' \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?upsertOnUid=true\"\n\n# Planned workout with Intervals.icu format description\ncurl -X POST \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Sweet Spot Build\",\n    \"category\": \"WORKOUT\",\n    \"start_date_local\": \"2024-02-16T18:00:00\",\n    \"description\": \"[Workout \\\"Sweet Spot\\\" \\\"\\\" Bike 300\\n  [SteadyState 600 88 92 \\\"\\\"]\\n  [SteadyState 600 88 92 \\\"\\\"]\\n  [SteadyState 600 88 92 \\\"\\\"]\\n]\"\n  }' \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?upsertOnUid=true\"\n\n# Create workout from .zwo file contents\ncurl -X POST \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Zwift Structured Workout\",\n    \"category\": \"WORKOUT\",\n    \"start_date_local\": \"2024-02-17T19:00:00\",\n    \"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>\"\n  }' \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?upsertOnUid=true\"\n\nCreate Multiple Events (Bulk)\n# Bulk create planned workouts\ncurl -X POST \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[\n    {\n      \"name\": \"Easy Spin\",\n      \"category\": \"WORKOUT\",\n      \"start_date_local\": \"2024-02-15T18:00:00\",\n      \"description\": \"60min at 60-65% FTP\"\n    },\n    {\n      \"name\": \"Threshold Work\",\n      \"category\": \"WORKOUT\",\n      \"start_date_local\": \"2024-02-17T19:00:00\",\n      \"description\": \"3x 10min at 95-105% FTP\"\n    },\n    {\n      \"name\": \"Long Run\",\n      \"category\": \"WORKOUT\",\n      \"start_date_local\": \"2024-02-18T07:00:00\",\n      \"description\": \"90min easy run at conversational pace\"\n    }\n  ]' \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/bulk?upsertOnUid=true&updatePlanApplied=true\"\n\nCreate Training Target (Goal for Date)\n\nSet a specific training target for a date.\n\n# Create power target\ncurl -X POST \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"FTP Test Target\",\n    \"category\": \"TARGET\",\n    \"start_date_local\": \"2024-02-20T18:00:00\",\n    \"description\": \"Target power: 300W\"\n  }' \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?upsertOnUid=true\"\n\n# Create duration target\ncurl -X POST \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Daily Volume Target\",\n    \"category\": \"TARGET\",\n    \"start_date_local\": \"2024-02-21T00:00:00\",\n    \"description\": \"Target: 2 hours training\"\n  }' \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?upsertOnUid=true\"\n\nUpdating Data\nUpdate Activity\n\nModify an existing completed activity.\n\n# Update activity notes and tags\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Recovery Ride - Updated\",\n    \"description\": \"Felt great, good recovery\",\n    \"commute\": false\n  }' \\\n  https://intervals.icu/api/v1/activity/ACTIVITY_ID\n\n# Update activity perceived exertion and feel\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"perceived_exertion\": 7,\n    \"feel\": 8,\n    \"description\": \"Good session, felt strong\"\n  }' \\\n  https://intervals.icu/api/v1/activity/ACTIVITY_ID\n\nUpdate Planned Workout (Event)\n\nModify a scheduled event on your calendar.\n\n# Update workout details\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Modified VO2Max Session\",\n    \"description\": \"8x 3min at 130% FTP with 2min recovery - UPDATED\"\n  }' \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID\n\n# Hide event from athlete view\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"hide_from_athlete\": true\n  }' \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID\n\n# Prevent athlete from editing event\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"athlete_cannot_edit\": true\n  }' \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events/EVENT_ID\n\nUpdate Multiple Events (Date Range)\n# Hide all workouts for a week\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"hide_from_athlete\": true\n  }' \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/events?oldest=2024-02-15&newest=2024-02-22\"\n\nWellness & Recovery Data\nGet Wellness Records\n\nTrack sleep, fatigue, resting HR, and other wellness metrics.\n\n# Get wellness data for date range\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness?oldest=2024-01-01&newest=2024-01-31\"\n\n# Get wellness data as CSV\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness.csv?oldest=2024-01-01&newest=2024-01-31\" \\\n  --output wellness.csv\n\n# Get specific wellness fields\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness?oldest=2024-01-01&fields=id,sleep_secs,soreness,fatigue,resting_hr,notes\"\n\nUpdate Wellness Record\n\nLog wellness data for a specific date.\n\n# Add sleep, HRV, and fatigue\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"id\": \"2024-01-15\",\n    \"sleep_secs\": 28800,\n    \"resting_hr\": 52,\n    \"fatigue\": 3,\n    \"soreness\": 2\n  }' \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness/2024-01-15\n\n# Add notes\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"id\": \"2024-01-15\",\n    \"notes\": \"Great sleep, feeling recovered\"\n  }' \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness/2024-01-15\n\nBulk Update Wellness Records\n# Update multiple wellness days at once\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[\n    {\n      \"id\": \"2024-01-15\",\n      \"sleep_secs\": 28800,\n      \"resting_hr\": 52\n    },\n    {\n      \"id\": \"2024-01-16\",\n      \"sleep_secs\": 30600,\n      \"resting_hr\": 50\n    },\n    {\n      \"id\": \"2024-01-17\",\n      \"sleep_secs\": 27000,\n      \"resting_hr\": 54\n    }\n  ]' \\\n  https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/wellness-bulk\n\nSport Settings & Zones\nGet Sport Settings\n\nRetrieve power zones, HR zones, and FTP settings for a sport.\n\n# Get Ride settings\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/sport-settings/Ride\"\n\n# Get Run settings\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/sport-settings/Run\"\n\n# List all sport settings\ncurl -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/sport-settings\"\n\nUpdate Sport Settings\n\nModify power zones, FTP, or HR zones.\n\n# Update FTP and power zones\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"ftp\": 310,\n    \"power_zones\": [0, 114, 152, 191, 229, 267, 310]\n  }' \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/sport-settings/Ride?recalcHrZones=false\"\n\n# Update LTHR and HR zones\ncurl -X PUT \\\n  -H \"Authorization: ApiKey API_KEY:YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"lthr\": 165,\n    \"hr_zones\": [0, 123, 142, 160, 178, 197, 220]\n  }' \\\n  \"https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID/sport-settings/Ride?recalcHrZones=true\"\n\nCommon Use Cases\nWorkflow: Sync Training Data with External System\n#!/bin/bash\n\nATHLETE_ID=\"YOUR_ATHLETE_ID\"\nAPI_KEY=\"YOUR_API_KEY\"\nDATE=\"2024-01-15\"\n\n# 1. Get completed activities\nACTIVITIES=$(curl -s -H \"Authorization: ApiKey $ATHLETE_ID:$API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/$ATHLETE_ID/activities?oldest=$DATE&newest=$DATE&fields=id,name,type,distance,icu_training_load\")\n\n# 2. Get planned workouts for today\nEVENTS=$(curl -s -H \"Authorization: ApiKey $ATHLETE_ID:$API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/$ATHLETE_ID/events?oldest=$DATE&newest=$DATE&category=WORKOUT\")\n\n# 3. Get wellness data\nWELLNESS=$(curl -s -H \"Authorization: ApiKey $ATHLETE_ID:$API_KEY\" \\\n  \"https://intervals.icu/api/v1/athlete/$ATHLETE_ID/wellness/$DATE\")\n\necho \"Activities: $ACTIVITIES\"\necho \"Events: $EVENTS\"\necho \"Wellness: $WELLNESS\"\n\nWorkflow: Create Weekly Training Plan\n#!/bin/bash\n\nATHLETE_ID=\"YOUR_ATHLETE_ID\"\nAPI_KEY=\"YOUR_API_KEY\"\n\n# Define workouts for the week\nWORKOUTS='[\n  {\n    \"name\": \"Monday - Easy Spin\",\n    \"category\": \"WORKOUT\",\n    \"start_date_local\": \"2024-02-19T18:00:00\",\n    \"description\": \"60min at 60-65% FTP\"\n  },\n  {\n    \"name\": \"Tuesday - VO2Max\",\n    \"category\": \"WORKOUT\",\n    \"start_date_local\": \"2024-02-20T18:00:00\",\n    \"description\": \"6x 4min at 110% FTP with 3min recovery\"\n  },\n  {\n    \"name\": \"Wednesday - Recovery\",\n    \"category\": \"WORKOUT\",\n    \"start_date_local\": \"2024-02-21T18:00:00\",\n    \"description\": \"45min easy\"\n  },\n  {\n    \"name\": \"Thursday - Threshold\",\n    \"category\": \"WORKOUT\",\n    \"start_date_local\": \"2024-02-22T19:00:00\",\n    \"description\": \"2x 15min at 95-105% FTP\"\n  },\n  {\n    \"name\": \"Friday - Rest Day\",\n    \"category\": \"NOTE\",\n    \"start_date_local\": \"2024-02-23T00:00:00\",\n    \"description\": \"Rest and recovery\"\n  },\n  {\n    \"name\": \"Saturday - Long Ride\",\n    \"category\": \"WORKOUT\",\n    \"start_date_local\": \"2024-02-24T09:00:00\",\n    \"description\": \"150min at Zone 2\"\n  },\n  {\n    \"name\": \"Sunday - Easy Recovery\",\n    \"category\": \"WORKOUT\",\n    \"start_date_local\": \"2024-02-25T10:00:00\",\n    \"description\": \"60min easy spin\"\n  }\n]'\n\n# Create all workouts at once\ncurl -X POST \\\n  -H \"Authorization: ApiKey $ATHLETE_ID:$API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d \"$WORKOUTS\" \\\n  \"https://intervals.icu/api/v1/athlete/$ATHLETE_ID/events/bulk?upsertOnUid=true&updatePlanApplied=true\"\n\nWorkflow: Analyze Week Data\n#!/bin/bash\n\nATHLETE_ID=\"YOUR_ATHLETE_ID\"\nAPI_KEY=\"YOUR_API_KEY\"\n\n# Get activities with load and zone data for the week\ncurl -s -H \"Authorization: ApiKey $ATHLETE_ID:$API_KEY\" \\\n  \"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\" | \\\n  jq '[.[] | {name: .name, load: .icu_training_load, zones: .icu_zone_times, hr: .average_heartrate}]'\n\nImportant Notes\nRate Limiting\n\nBe respectful with API calls. Don't hammer the API with rapid successive requests.\n\nField Selection\n\nUse the fields parameter to request only the data you need. This improves performance and reduces payload size.\n\nDate Formats\n\nAlways use ISO-8601 format: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS\n\nUpsert Parameter\n\nWhen creating events, use upsertOnUid=true to update existing events with matching UIDs instead of creating duplicates.\n\nExternal IDs\n\nUse external_id when syncing data from other systems to avoid duplicates on re-sync.\n\nForum Discussion\n\nFor more detailed API information, see: API Access Forum Post\n\nResponse Status Codes\n200: Success\n201: Created successfully (activities, events)\n400: Bad request (invalid parameters)\n401: Unauthorized (invalid API key or token)\n404: Not found (invalid IDs)\n429: Rate limited (too many requests)\n500: Server error\n\nCheck response headers for error details and rate limit information."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/pseuss/intervals-icu-api",
    "publisherUrl": "https://clawhub.ai/pseuss/intervals-icu-api",
    "owner": "pseuss",
    "version": "2.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/intervals-icu-api",
    "downloadUrl": "https://openagent3.xyz/downloads/intervals-icu-api",
    "agentUrl": "https://openagent3.xyz/skills/intervals-icu-api/agent",
    "manifestUrl": "https://openagent3.xyz/skills/intervals-icu-api/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/intervals-icu-api/agent.md"
  }
}