{
  "opencollection": "1.0.0",
  "info": {
    "name": "TrainingPeaks Partners API",
    "version": "2.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{accessToken}}"
    }
  },
  "items": [
    {
      "info": { "name": "Info", "type": "folder" },
      "items": [
        {
          "info": { "name": "Get API version.", "type": "http" },
          "http": { "method": "GET", "url": "https://api.trainingpeaks.com/v1/info/version" },
          "docs": "Returns API build and version. No OAuth scope required."
        }
      ]
    },
    {
      "info": { "name": "Athlete", "type": "folder" },
      "items": [
        {
          "info": { "name": "Get athlete profile.", "type": "http" },
          "http": { "method": "GET", "url": "https://api.trainingpeaks.com/v1/athlete/profile" },
          "docs": "Scope athlete:profile. The authenticated athlete's profile, including premium/basic status."
        },
        {
          "info": { "name": "Get athlete zones (deprecated).", "type": "http" },
          "http": { "method": "GET", "url": "https://api.trainingpeaks.com/v1/athlete/zones" },
          "docs": "Deprecated. Scope athlete:profile."
        }
      ]
    },
    {
      "info": { "name": "Coach", "type": "folder" },
      "items": [
        {
          "info": { "name": "Get coach profile.", "type": "http" },
          "http": { "method": "GET", "url": "https://api.trainingpeaks.com/v1/coach/profile" },
          "docs": "Scope coach:athletes."
        },
        {
          "info": { "name": "List coach athletes.", "type": "http" },
          "http": { "method": "GET", "url": "https://api.trainingpeaks.com/v1/coach/athletes" },
          "docs": "Scope coach:athletes. Athletes attached to the authenticated coach."
        },
        {
          "info": { "name": "List assistants.", "type": "http" },
          "http": { "method": "GET", "url": "https://api.trainingpeaks.com/v1/coach/assistants" },
          "docs": "Scope coach:athletes."
        },
        {
          "info": { "name": "List assistant athletes.", "type": "http" },
          "http": {
            "method": "GET",
            "url": "https://api.trainingpeaks.com/v1/coach/assistants/:assistantId/athletes",
            "params": [
              { "name": "assistantId", "value": "", "type": "path", "description": "The assistant coach id." }
            ]
          },
          "docs": "Scope coach:athletes."
        }
      ]
    },
    {
      "info": { "name": "Workouts", "type": "folder" },
      "items": [
        {
          "info": { "name": "Get workouts by date range.", "type": "http" },
          "http": {
            "method": "GET",
            "url": "https://api.trainingpeaks.com/v2/workouts/:startDate/:endDate",
            "params": [
              { "name": "startDate", "value": "2026-07-01", "type": "path", "description": "Range start date." },
              { "name": "endDate", "value": "2026-07-07", "type": "path", "description": "Range end date." },
              { "name": "includeDescription", "value": "true", "type": "query", "description": "Include the description field." }
            ]
          },
          "docs": "Scope workouts:read. Planned and completed workouts for the authenticated athlete."
        },
        {
          "info": { "name": "Get athlete workouts by date range.", "type": "http" },
          "http": {
            "method": "GET",
            "url": "https://api.trainingpeaks.com/v2/workouts/:athleteId/:startDate/:endDate",
            "params": [
              { "name": "athleteId", "value": "", "type": "path", "description": "The athlete id." },
              { "name": "startDate", "value": "2026-07-01", "type": "path", "description": "Range start date." },
              { "name": "endDate", "value": "2026-07-07", "type": "path", "description": "Range end date." }
            ]
          },
          "docs": "Scope workouts:read. Coach access to an athlete's workouts."
        },
        {
          "info": { "name": "Get changed workouts.", "type": "http" },
          "http": {
            "method": "GET",
            "url": "https://api.trainingpeaks.com/v2/workouts/changed",
            "params": [
              { "name": "date", "value": "2026-07-01T00:00:00Z", "type": "query", "description": "Changed-since timestamp." }
            ]
          },
          "docs": "Scope workouts:read. Incremental sync of changed workouts."
        },
        {
          "info": { "name": "Get Workout of the Day.", "type": "http" },
          "http": {
            "method": "GET",
            "url": "https://api.trainingpeaks.com/v2/workouts/wod/:date",
            "params": [
              { "name": "date", "value": "2026-07-03", "type": "path", "description": "The WOD date." }
            ]
          },
          "docs": "Scope workouts:wod."
        },
        {
          "info": { "name": "Get structured workout file.", "type": "http" },
          "http": {
            "method": "GET",
            "url": "https://api.trainingpeaks.com/v2/workouts/wod/file/:workoutId/",
            "params": [
              { "name": "workoutId", "value": "", "type": "path", "description": "The planned workout id." },
              { "name": "format", "value": "zwo", "type": "query", "description": "One of fit, erg, mrc, zwo, json." }
            ]
          },
          "docs": "Scope workouts:wod."
        },
        {
          "info": { "name": "Create planned workout.", "type": "http" },
          "http": {
            "method": "POST",
            "url": "https://api.trainingpeaks.com/v2/workouts/plan",
            "body": { "type": "json", "data": "{\n  \"AthleteId\": 54321,\n  \"Title\": \"Threshold Intervals\",\n  \"WorkoutType\": \"Bike\",\n  \"WorkoutDay\": \"2026-07-05T00:00:00Z\",\n  \"TotalTimePlanned\": 1.5\n}" }
          },
          "docs": "Scope workouts:plan. Coach or premium athlete."
        },
        {
          "info": { "name": "Update planned workout.", "type": "http" },
          "http": {
            "method": "PUT",
            "url": "https://api.trainingpeaks.com/v2/workouts/plan/:id",
            "params": [
              { "name": "id", "value": "", "type": "path", "description": "The workout id." }
            ],
            "body": { "type": "json", "data": "{\n  \"Title\": \"Threshold Intervals (updated)\"\n}" }
          },
          "docs": "Scope workouts:plan."
        },
        {
          "info": { "name": "Get workout by id.", "type": "http" },
          "http": {
            "method": "GET",
            "url": "https://api.trainingpeaks.com/v2/workouts/id/:id",
            "params": [
              { "name": "id", "value": "", "type": "path", "description": "The workout id." }
            ]
          },
          "docs": "Scope workouts:read."
        },
        {
          "info": { "name": "Delete workout by id.", "type": "http" },
          "http": {
            "method": "DELETE",
            "url": "https://api.trainingpeaks.com/v2/workouts/id/:id",
            "params": [
              { "name": "id", "value": "", "type": "path", "description": "The workout id." }
            ]
          },
          "docs": "Scope workouts:plan."
        },
        {
          "info": { "name": "Get workout mean-max data (premium).", "type": "http" },
          "http": {
            "method": "GET",
            "url": "https://api.trainingpeaks.com/v2/workouts/id/:id/meanmaxes",
            "params": [
              { "name": "id", "value": "", "type": "path", "description": "The workout id." }
            ]
          },
          "docs": "Scope workouts:read. Premium athlete required."
        },
        {
          "info": { "name": "Get workout time in zones (premium).", "type": "http" },
          "http": {
            "method": "GET",
            "url": "https://api.trainingpeaks.com/v2/workouts/id/:id/timeinzones",
            "params": [
              { "name": "id", "value": "", "type": "path", "description": "The workout id." }
            ]
          },
          "docs": "Scope workouts:read. Premium athlete required."
        },
        {
          "info": { "name": "Get workout details (premium).", "type": "http" },
          "http": {
            "method": "GET",
            "url": "https://api.trainingpeaks.com/v2/workouts/id/:id/details",
            "params": [
              { "name": "id", "value": "", "type": "path", "description": "The workout id." }
            ]
          },
          "docs": "Scope workouts:details. Premium athlete, completed workout, uploaded file required."
        },
        {
          "info": { "name": "Create workout comment.", "type": "http" },
          "http": {
            "method": "POST",
            "url": "https://api.trainingpeaks.com/v2/workouts/:athleteId/id/:workoutId/comment",
            "params": [
              { "name": "athleteId", "value": "", "type": "path", "description": "The athlete id." },
              { "name": "workoutId", "value": "", "type": "path", "description": "The workout id." }
            ],
            "body": { "type": "json", "data": "{\n  \"Comment\": \"Great session, nail the recovery.\"\n}" }
          },
          "docs": "Scope workouts:details. Premium athlete required."
        },
        {
          "info": { "name": "Get strength workouts.", "type": "http" },
          "http": {
            "method": "GET",
            "url": "https://api.trainingpeaks.com/v2/athletes/:athleteId/strength-workouts",
            "params": [
              { "name": "athleteId", "value": "", "type": "path", "description": "The athlete id." }
            ]
          },
          "docs": "Scope workouts:read."
        }
      ]
    },
    {
      "info": { "name": "Metrics", "type": "folder" },
      "items": [
        {
          "info": { "name": "Get metrics by date range (premium).", "type": "http" },
          "http": {
            "method": "GET",
            "url": "https://api.trainingpeaks.com/v2/metrics/:startDate/:endDate",
            "params": [
              { "name": "startDate", "value": "2026-07-01", "type": "path", "description": "Range start date." },
              { "name": "endDate", "value": "2026-07-07", "type": "path", "description": "Range end date." }
            ]
          },
          "docs": "Scope metrics:read. Premium athlete required."
        },
        {
          "info": { "name": "Create metric.", "type": "http" },
          "http": {
            "method": "POST",
            "url": "https://api.trainingpeaks.com/v2/metrics",
            "body": { "type": "json", "data": "{\n  \"AthleteId\": 54321,\n  \"Timestamp\": \"2026-07-03T06:30:00Z\",\n  \"WeightInKilograms\": 72.5,\n  \"RestingHeartRate\": 48\n}" }
          },
          "docs": "Scope metrics:write."
        }
      ]
    },
    {
      "info": { "name": "Nutrition", "type": "folder" },
      "items": [
        {
          "info": { "name": "Get athlete nutrition.", "type": "http" },
          "http": {
            "method": "GET",
            "url": "https://api.trainingpeaks.com/v1/athletes/:athleteId/nutrition",
            "params": [
              { "name": "athleteId", "value": "", "type": "path", "description": "The athlete id." },
              { "name": "startDate", "value": "2026-07-01", "type": "query", "description": "Range start date." },
              { "name": "endDate", "value": "2026-07-07", "type": "query", "description": "Range end date." }
            ]
          },
          "docs": "Scope nutrition:read. Date-range reads require a premium athlete."
        },
        {
          "info": { "name": "Create athlete nutrition.", "type": "http" },
          "http": {
            "method": "POST",
            "url": "https://api.trainingpeaks.com/v1/athletes/:athleteId/nutrition",
            "params": [
              { "name": "athleteId", "value": "", "type": "path", "description": "The athlete id." }
            ],
            "body": { "type": "json", "data": "{\n  \"Date\": \"2026-07-03\",\n  \"Calories\": 2600,\n  \"CarbohydratesInGrams\": 380\n}" }
          },
          "docs": "Scope nutrition:write."
        }
      ]
    },
    {
      "info": { "name": "File", "type": "folder" },
      "items": [
        {
          "info": { "name": "Upload activity file (async).", "type": "http" },
          "http": {
            "method": "POST",
            "url": "https://api.trainingpeaks.com/v3/file",
            "body": { "type": "json", "data": "{\n  \"AthleteId\": 54321,\n  \"FileName\": \"ride.fit\",\n  \"Data\": \"<base64-encoded FIT/TCX/PWX>\"\n}" }
          },
          "docs": "Scope file:write. Supported types: .FIT, .TCX, .PWX. Processed asynchronously."
        }
      ]
    },
    {
      "info": { "name": "Events", "type": "folder" },
      "items": [
        {
          "info": { "name": "Get next event.", "type": "http" },
          "http": { "method": "GET", "url": "https://api.trainingpeaks.com/v2/events/next" },
          "docs": "Scope events:read."
        },
        {
          "info": { "name": "Create event.", "type": "http" },
          "http": {
            "method": "POST",
            "url": "https://api.trainingpeaks.com/v2/events",
            "body": { "type": "json", "data": "{\n  \"Name\": \"State Championship Road Race\",\n  \"Date\": \"2026-09-12\",\n  \"Priority\": \"A\"\n}" }
          },
          "docs": "Scope events:write."
        }
      ]
    },
    {
      "info": { "name": "Routes", "type": "folder" },
      "items": [
        {
          "info": { "name": "Get athlete routes.", "type": "http" },
          "http": {
            "method": "GET",
            "url": "https://api.trainingpeaks.com/v2/athletes/:athleteId/routes",
            "params": [
              { "name": "athleteId", "value": "", "type": "path", "description": "The athlete id." }
            ]
          },
          "docs": "Scope routes:read."
        },
        {
          "info": { "name": "Create athlete route.", "type": "http" },
          "http": {
            "method": "POST",
            "url": "https://api.trainingpeaks.com/v2/athlete/:athleteId/routes",
            "params": [
              { "name": "athleteId", "value": "", "type": "path", "description": "The athlete id." }
            ],
            "body": { "type": "json", "data": "{\n  \"Name\": \"Canyon Loop\",\n  \"Distance\": 42000,\n  \"ElevationGain\": 650\n}" }
          },
          "docs": "Scope routes:write."
        }
      ]
    },
    {
      "info": { "name": "Webhooks (Early Access)", "type": "folder" },
      "items": [
        {
          "info": { "name": "List webhook subscriptions.", "type": "http" },
          "http": { "method": "GET", "url": "https://api.trainingpeaks.com/v1/webhook/subscriptions" },
          "docs": "Scope webhook:read-subscriptions."
        },
        {
          "info": { "name": "Create webhook subscription.", "type": "http" },
          "http": {
            "method": "POST",
            "url": "https://api.trainingpeaks.com/v1/webhook/subscriptions",
            "body": { "type": "json", "data": "{\n  \"AthleteId\": 54321,\n  \"EventType\": \"workout-created\",\n  \"WebhookUrl\": \"https://api.mycompany.com/callback\"\n}" }
          },
          "docs": "Scope webhook:write-subscriptions. EventType: workout-created, workout-updated, workout-deleted."
        },
        {
          "info": { "name": "Update webhook subscription.", "type": "http" },
          "http": {
            "method": "PUT",
            "url": "https://api.trainingpeaks.com/v1/webhook/subscriptions/:subscriptionId",
            "params": [
              { "name": "subscriptionId", "value": "", "type": "path", "description": "The subscription id (uuid)." }
            ],
            "body": { "type": "json", "data": "{\n  \"AthleteId\": 54321,\n  \"EventType\": \"workout-updated\",\n  \"WebhookUrl\": \"https://api.mycompany.com/callback\"\n}" }
          },
          "docs": "Scope webhook:write-subscriptions."
        },
        {
          "info": { "name": "Delete webhook subscription.", "type": "http" },
          "http": {
            "method": "DELETE",
            "url": "https://api.trainingpeaks.com/v1/webhook/subscriptions/:subscriptionId",
            "params": [
              { "name": "subscriptionId", "value": "", "type": "path", "description": "The subscription id (uuid)." }
            ]
          },
          "docs": "Scope webhook:write-subscriptions."
        }
      ]
    }
  ],
  "bundled": true
}
