Webhook Create Subscription - TrainingPeaks/PartnersAPI GitHub Wiki

Create Subscription

Creates a new webhook subscription for a person

  • Resource endpoint: v1/webhook/subscriptions
  • HTTP Method: POST
  • OAuth Scope Required: webhook:write-subscriptions

Request

Endpoints

Testing:
https://api.sandbox.trainingpeaks.com/v1/webhook/subscriptions

Production:
https://api.trainingpeaks.com/v1/webhook/subscriptions

Request Body

{
    "AthleteId": 54321,
    "EventType": "workout-created",
    "WebhookUrl": "https://api.mycompany.com/callback"
}
Property Type Description
AthleteId int ID of the person you wish to receive webhooks for
EventType string See below for valid types
WebhookUrl string The URL which will receive a POST upon an event matching the EventType occuring

Valid EventTypes:

workout-created
workout-updated
workout-deleted

Response

The response will be a single JSON object:

{
    "Id": "0d76e887-8e8a-46f4-bb2b-2f66e4fc40ee",
    "AthleteId": 54321,
    "EventType": "workout-created",
    "WebhookUrl": "https://api.mycompany.com/callback",
    "Active": true,
    "CreatedBy": 54321,
    "CreatedOn": "2025-07-24T21:03:05.1324848Z"
}