{"openapi":"3.1.0","info":{"title":"Vekta API","version":"0.2.0","description":"Read and manage your training data and your athletes' data. In paths, `userId` is the id of a user from `GET /users`, or `me` for yourself.\n\nYou can only access a user's data while they have an active Vekta subscription. For your own data, you need to be subscribed. For an athlete's data, the athlete needs to be subscribed (your own subscription doesn't matter), and you need to be a coach or admin in a workspace where they're an athlete.\n\nIf you have no link to a user or resource, you get a 404 `not_found`, as if it didn't exist. If you do have a link (it's you, one of your athletes, or something you can see) but you're not allowed to do this, you get a 403 with the reason: `subscription_required` if the user isn't subscribed, `forbidden` if only someone else can do it (for example the creator, or the coaches of the workspace it was created in).\n\nYou can make 300 requests per minute per API key, and 30 per minute for each user you query, so fetching several users in parallel is fine. Over the limit, you get a 429 with a `Retry-After` header.\n\nApps can also access the data of the Vekta users who connect them, with OAuth: contact Vekta to get access. An access token is sent the same way and only reaches the data of the user who connected the app (`me`). The endpoints accepting it list their scope in their security requirements. An app can make 30 requests per minute for each user who connected it."},"paths":{"/users":{"get":{"tags":["Users"],"operationId":"users.listUsers","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"InsufficientScopeError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsufficientScopeError"}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"Everyone who is an athlete in a workspace where you're a coach or admin.\n\nUse their ids as `userId` in the other endpoints. For your own data, use `me`.","summary":"List your athletes"}},"/users/{userId}":{"get":{"tags":["Users"],"operationId":"users.getProfile","parameters":[{"name":"userId","in":"path","schema":{"type":"string","description":"Id of a user you have access to (see `GET /users`), or `me` for yourself","examples":["me","usr_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"UserProfile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfile"}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"Your profile, or one of your athletes'.\n\nResponds with:\n- `404 not_found`: the user doesn't exist or isn't one of your athletes.\n- `403 subscription_required`: the user (or you, for `me`) doesn't have an active Vekta subscription.\n- `400 bad_request`: invalid parameters or payload.","summary":"Get a user's profile"}},"/users/{userId}/activities":{"get":{"tags":["Activities"],"operationId":"activities.listActivities","parameters":[{"name":"userId","in":"path","schema":{"type":"string","description":"Id of a user you have access to (see `GET /users`), or `me` for yourself","examples":["me","usr_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"required":true},{"name":"from","in":"query","schema":{"type":"string","description":"First date to include (YYYY-MM-DD)","format":"date","examples":["2026-08-01"]},"required":false},{"name":"to","in":"query","schema":{"type":"string","description":"Last date to include (YYYY-MM-DD)","format":"date","examples":["2026-08-31"]},"required":false}],"security":[{"bearer":[]},{"oauth2":["activities:read"]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Activity"}}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"The user's activities, with their laps, climbs, pool lengths and comments.\n\nMost recent first. You can filter by date (local time).\n\nResponds with:\n- `404 not_found`: the user doesn't exist or isn't one of your athletes.\n- `403 subscription_required`: the user (or you, for `me`) doesn't have an active Vekta subscription.\n- `400 bad_request`: invalid parameters or payload.","summary":"List a user's activities"}},"/activities/{activityId}/streams":{"get":{"tags":["Activities"],"operationId":"activities.getStreams","parameters":[{"name":"activityId","in":"path","schema":{"type":"string","description":"Id of an activity, from `GET /users/{userId}/activities`","examples":["act_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"required":true}],"security":[{"bearer":[]},{"oauth2":["activities:read"]}],"responses":{"200":{"description":"The activity's recorded data, as one list per field. All lists have the same length, and the same index is the same moment. A field is missing if the activity didn't record it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityStreams"}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"Everything the activity recorded over time, as one list per field.\n\nThis endpoint only counts toward the per API key rate limit.\n\nResponds with:\n- `404 not_found`: the activity has no recorded data, doesn't exist, or isn't yours or one of your athletes'.\n- `403 subscription_required`: the activity's owner doesn't have an active Vekta subscription.\n- `400 bad_request`: invalid parameters or payload.","summary":"Get an activity's streams"}},"/activities/{activityId}/best-efforts":{"get":{"tags":["Activities"],"operationId":"activities.getBestEfforts","parameters":[{"name":"activityId","in":"path","schema":{"type":"string","description":"Id of an activity, from `GET /users/{userId}/activities`","examples":["act_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"required":true}],"security":[{"bearer":[]},{"oauth2":["activities:read"]}],"responses":{"200":{"description":"The activity's best efforts. Each list only appears for the sports it applies to, so other sports get an empty object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityBestEfforts"}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"The activity's best efforts: best average power and heart rate for each duration, and fastest time for each distance.\n\nFor cycling, power efforts also come after different amounts of work, to show power when tired. This endpoint only counts toward the per API key rate limit.\n\nResponds with:\n- `404 not_found`: the activity doesn't exist, or isn't yours or one of your athletes'.\n- `403 subscription_required`: the activity's owner doesn't have an active Vekta subscription.\n- `400 bad_request`: invalid parameters or payload.","summary":"Get an activity's best efforts"}},"/activities/{activityId}/comments":{"post":{"tags":["Activity comments"],"operationId":"activityComments.createActivityComment","parameters":[{"name":"activityId","in":"path","schema":{"type":"string","description":"Id of an activity, from `GET /users/{userId}/activities`","examples":["act_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"required":true}],"security":[{"bearer":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityComment"}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"Adds a comment to the activity, under your name.\n\nThe activity's owner and their coaches get a notification in the mobile app. This endpoint only counts toward the per API key rate limit.\n\nResponds with:\n- `404 not_found`: the activity doesn't exist, or isn't yours or one of your athletes'.\n- `403 subscription_required`: the activity's owner doesn't have an active Vekta subscription.\n- `400 bad_request`: invalid parameters or payload.","summary":"Comment an activity","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityCommentPayload"}}},"required":true}}},"/activity-comments/{activityCommentId}":{"patch":{"tags":["Activity comments"],"operationId":"activityComments.updateActivityComment","parameters":[{"name":"activityCommentId","in":"path","schema":{"type":"string","description":"Id of a comment, from the `comments` of an activity, or from the response when you create one","examples":["act_01JK4W2N9XQ3F5H7B8C6D2E9GV"]},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"ActivityComment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityComment"}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"Replaces the content of a comment you wrote.\n\nResponds with:\n- `404 not_found`: the comment doesn't exist, or is on an activity that isn't yours or one of your athletes'.\n- `403 subscription_required`: the activity's owner doesn't have an active Vekta subscription.\n- `403 forbidden`: someone else (or Vekta) wrote the comment.\n- `400 bad_request`: invalid parameters or payload.","summary":"Edit a comment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityCommentPayload"}}},"required":true}},"delete":{"tags":["Activity comments"],"operationId":"activityComments.deleteActivityComment","parameters":[{"name":"activityCommentId","in":"path","schema":{"type":"string","description":"Id of a comment, from the `comments` of an activity, or from the response when you create one","examples":["act_01JK4W2N9XQ3F5H7B8C6D2E9GV"]},"required":true}],"security":[{"bearer":[]}],"responses":{"204":{"description":"<No Content>"},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"Deletes a comment you wrote.\n\nResponds with:\n- `404 not_found`: the comment doesn't exist, or is on an activity that isn't yours or one of your athletes'.\n- `403 subscription_required`: the activity's owner doesn't have an active Vekta subscription.\n- `403 forbidden`: someone else (or Vekta) wrote the comment.\n- `400 bad_request`: invalid parameters or payload.","summary":"Delete a comment"}},"/training-collections":{"get":{"tags":["Training collections"],"operationId":"trainingCollections.listTrainingCollections","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainingCollection"}}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"InsufficientScopeError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsufficientScopeError"}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"The workout templates in your library.\n\nUse their ids to prescribe them to yourself or your athletes. No subscription needed.","summary":"List your training collections"},"post":{"tags":["Training collections"],"operationId":"trainingCollections.createTrainingCollection","parameters":[],"security":[{"bearer":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingCollection"}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"InsufficientScopeError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsufficientScopeError"}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"Adds a workout template to your library. No subscription needed.\n\nThe steps can't use zones, because a template isn't tied to an athlete: see [Workout structure](https://docs.joinvekta.com/structure).\n\nResponds with:\n- `400 bad_request`: a field, target or zones type the sport doesn't support, steps on a sport other than cycling, running and swimming, or other invalid parameters or payload.","summary":"Create a training collection","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTrainingCollection"}}},"required":true}}},"/training-collections/{trainingCollectionId}":{"patch":{"tags":["Training collections"],"operationId":"trainingCollections.updateTrainingCollection","parameters":[{"name":"trainingCollectionId","in":"path","schema":{"type":"string","description":"Id of one of your training collections, from `GET /training-collections`","examples":["tcl_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A workout template from your library. Its targets are converted for the athlete when you prescribe it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingCollection"}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"InsufficientScopeError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsufficientScopeError"}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"Changes one of your training collections. Fields you don't send stay the same. Prescriptions already made from it don't change.\n\nResponds with:\n- `404 not_found`: the collection doesn't exist or isn't yours.\n- `400 bad_request`: an empty payload, a field, target or zones type the sport doesn't support, a duration or distance that can't be changed, a sport change without a new structure, or other invalid parameters or payload.","summary":"Update a training collection","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTrainingCollection"}}},"required":true}},"delete":{"tags":["Training collections"],"operationId":"trainingCollections.deleteTrainingCollection","parameters":[{"name":"trainingCollectionId","in":"path","schema":{"type":"string","description":"Id of one of your training collections, from `GET /training-collections`","examples":["tcl_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"required":true}],"security":[{"bearer":[]}],"responses":{"204":{"description":"<No Content>"},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"InsufficientScopeError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsufficientScopeError"}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"Removes the collection from your library. Prescriptions already made from it don't change.\n\nResponds with:\n- `404 not_found`: the collection doesn't exist or isn't yours.\n- `400 bad_request`: invalid parameters or payload.","summary":"Delete a training collection"}},"/users/{userId}/training-prescriptions":{"get":{"tags":["Training prescriptions"],"operationId":"trainingPrescriptions.listTrainingPrescriptions","parameters":[{"name":"userId","in":"path","schema":{"type":"string","description":"Id of a user you have access to (see `GET /users`), or `me` for yourself","examples":["me","usr_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"required":true},{"name":"from","in":"query","schema":{"type":"string","description":"First date to include (YYYY-MM-DD)","format":"date","examples":["2026-08-01"]},"required":false},{"name":"to","in":"query","schema":{"type":"string","description":"Last date to include (YYYY-MM-DD)","format":"date","examples":["2026-08-31"]},"required":false}],"security":[{"bearer":[]},{"oauth2":["training-plan:read"]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainingPrescription"}}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"The user's planned workouts, most recent first.\n\nYou can filter by date. Hidden prescriptions are only returned to the person who created them.\n\nResponds with:\n- `404 not_found`: the user doesn't exist or isn't one of your athletes.\n- `403 subscription_required`: the user (or you, for `me`) doesn't have an active Vekta subscription.\n- `400 bad_request`: invalid parameters or payload.","summary":"List a user's training prescriptions"},"post":{"tags":["Training prescriptions"],"operationId":"trainingPrescriptions.createTrainingPrescription","parameters":[{"name":"userId","in":"path","schema":{"type":"string","description":"Id of a user you have access to (see `GET /users`), or `me` for yourself","examples":["me","usr_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"required":true}],"security":[{"bearer":[]},{"oauth2":["training-plan:write"]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPrescriptionWithDeviceSyncs"}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"Plans a workout for the user on a given date, from scratch or from one of your training collections.\n\nVekta converts the steps for the user and estimates the workout from them: see [Workout structure](https://docs.joinvekta.com/structure).\n\nUnless it's hidden, a workout with steps is sent to the user's connected devices (Garmin, Wahoo, COROS, Zwift, Hammerhead). `deviceSyncs` tells you what happened on each one.\n\nWhen you create it for one of your athletes, it's added to the workspace where you coach them. If you coach them in several workspaces, send `workspaceId`.\n\nResponds with:\n- `404 not_found`: the collection isn't yours, `workspaceId` isn't a workspace where you coach this athlete, or the user doesn't exist or isn't one of your athletes.\n- `403 subscription_required`: the user (or you, for `me`) doesn't have an active Vekta subscription.\n- `400 bad_request`: `title` or `sport` is missing (without a collection), a field, target or zones type the sport doesn't support, steps on a sport other than cycling, running and swimming, a target that needs a zone or metric the user doesn't have, `workspaceId` is sent for `me` or missing while you coach the athlete in several workspaces, or other invalid parameters or payload.","summary":"Prescribe a workout","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTrainingPrescription"}}},"required":true}}},"/training-prescriptions/{trainingPrescriptionId}":{"patch":{"tags":["Training prescriptions"],"operationId":"trainingPrescriptions.updateTrainingPrescription","parameters":[{"name":"trainingPrescriptionId","in":"path","schema":{"type":"string","description":"Id of a training prescription, from `GET /users/{userId}/training-prescriptions`","examples":["tpr_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"required":true}],"security":[{"bearer":[]},{"oauth2":["training-plan:write"]}],"responses":{"200":{"description":"TrainingPrescriptionWithDeviceSyncs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingPrescriptionWithDeviceSyncs"}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"Changes a prescription. Fields you don't send stay the same.\n\nNew steps are converted with the user's current zones and metrics. Some fields can't be changed while the steps decide them: see [Workout structure](https://docs.joinvekta.com/structure).\n\nChanges are sent to the workout on the user's devices. `deviceSyncs` tells you what happened on each one.\n\nResponds with:\n- `404 not_found`: the prescription doesn't exist, or isn't yours or one of your athletes'.\n- `403 subscription_required`: that user doesn't have an active Vekta subscription.\n- `403 forbidden`: the prescription was created in a workspace where you aren't a coach or admin, or someone other than its creator changes `hidden`.\n- `400 bad_request`: an empty payload, a field, target or zones type the sport doesn't support, a duration, distance or work that can't be changed, a sport change without a new structure, a target that needs a zone or metric the user doesn't have, or other invalid parameters or payload.","summary":"Update a training prescription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTrainingPrescription"}}},"required":true}},"delete":{"tags":["Training prescriptions"],"operationId":"trainingPrescriptions.deleteTrainingPrescription","parameters":[{"name":"trainingPrescriptionId","in":"path","schema":{"type":"string","description":"Id of a training prescription, from `GET /users/{userId}/training-prescriptions`","examples":["tpr_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"required":true}],"security":[{"bearer":[]},{"oauth2":["training-plan:write"]}],"responses":{"200":{"description":"DeletedTrainingPrescription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedTrainingPrescription"}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"Deletes the prescription and removes the workout from the user's devices.\n\n`deviceSyncs` tells you whether it was removed from each one.\n\nResponds with:\n- `404 not_found`: the prescription doesn't exist, or isn't yours or one of your athletes'.\n- `403 subscription_required`: that user doesn't have an active Vekta subscription.\n- `403 forbidden`: the prescription was created in a workspace where you aren't a coach or admin.\n- `400 bad_request`: invalid parameters or payload.","summary":"Delete a training prescription"}},"/users/{userId}/notes":{"get":{"tags":["Notes"],"operationId":"notes.listNotes","parameters":[{"name":"userId","in":"path","schema":{"type":"string","description":"Id of a user you have access to (see `GET /users`), or `me` for yourself","examples":["me","usr_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"required":true},{"name":"from","in":"query","schema":{"type":"string","description":"First date to include (YYYY-MM-DD)","format":"date","examples":["2026-08-01"]},"required":false},{"name":"to","in":"query","schema":{"type":"string","description":"Last date to include (YYYY-MM-DD)","format":"date","examples":["2026-08-31"]},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Note"}}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"The user's notes, most recent first.\n\nYou can filter by date. Notes hidden until a later date are only returned to the person who created them.\n\nResponds with:\n- `404 not_found`: the user doesn't exist or isn't one of your athletes.\n- `403 subscription_required`: the user (or you, for `me`) doesn't have an active Vekta subscription.\n- `400 bad_request`: invalid parameters or payload.","summary":"List a user's notes"},"post":{"tags":["Notes"],"operationId":"notes.createNote","parameters":[{"name":"userId","in":"path","schema":{"type":"string","description":"Id of a user you have access to (see `GET /users`), or `me` for yourself","examples":["me","usr_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"required":true}],"security":[{"bearer":[]},{"oauth2":["notes:write"]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"Adds a note to the user's calendar, under your name.\n\nWhen you create it for one of your athletes, it's added to the workspace where you coach them. If you coach them in several workspaces, send `workspaceId`.\n\nResponds with:\n- `404 not_found`: `workspaceId` isn't a workspace where you coach this athlete, or the user doesn't exist or isn't one of your athletes.\n- `403 subscription_required`: the user (or you, for `me`) doesn't have an active Vekta subscription.\n- `400 bad_request`: `workspaceId` is sent for `me` or missing while you coach the athlete in several workspaces, or other invalid parameters or payload.","summary":"Create a note","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNote"}}},"required":true}}},"/notes/{noteId}":{"patch":{"tags":["Notes"],"operationId":"notes.updateNote","parameters":[{"name":"noteId","in":"path","schema":{"type":"string","description":"Id of a note, from `GET /users/{userId}/notes`","examples":["not_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"required":true}],"security":[{"bearer":[]},{"oauth2":["notes:write"]}],"responses":{"200":{"description":"Note","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"Changes a note. Fields you don't send stay the same.\n\nResponds with:\n- `404 not_found`: the note doesn't exist, is hidden from you, or isn't yours or one of your athletes'.\n- `403 subscription_required`: that user doesn't have an active Vekta subscription.\n- `403 forbidden`: the note was created in a workspace where you aren't a coach or admin, or someone other than its creator changes `hideUntil`.\n- `400 bad_request`: an empty payload, or other invalid parameters or payload.","summary":"Update a note","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNote"}}},"required":true}},"delete":{"tags":["Notes"],"operationId":"notes.deleteNote","parameters":[{"name":"noteId","in":"path","schema":{"type":"string","description":"Id of a note, from `GET /users/{userId}/notes`","examples":["not_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"required":true}],"security":[{"bearer":[]},{"oauth2":["notes:write"]}],"responses":{"204":{"description":"<No Content>"},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"Deletes the note.\n\nResponds with:\n- `404 not_found`: the note doesn't exist, is hidden from you, or isn't yours or one of your athletes'.\n- `403 subscription_required`: that user doesn't have an active Vekta subscription.\n- `403 forbidden`: the note was created in a workspace where you aren't a coach or admin.\n- `400 bad_request`: invalid parameters or payload.","summary":"Delete a note"}},"/users/{userId}/events":{"get":{"tags":["Events"],"operationId":"events.listEvents","parameters":[{"name":"userId","in":"path","schema":{"type":"string","description":"Id of a user you have access to (see `GET /users`), or `me` for yourself","examples":["me","usr_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"required":true},{"name":"from","in":"query","schema":{"type":"string","description":"First date to include (YYYY-MM-DD)","format":"date","examples":["2026-08-01"]},"required":false},{"name":"to","in":"query","schema":{"type":"string","description":"Last date to include (YYYY-MM-DD)","format":"date","examples":["2026-08-31"]},"required":false}],"security":[{"bearer":[]},{"oauth2":["training-plan:read"]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Event"}}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"The user's planned events and races, most recent first.\n\nYou can filter by date.\n\nResponds with:\n- `404 not_found`: the user doesn't exist or isn't one of your athletes.\n- `403 subscription_required`: the user (or you, for `me`) doesn't have an active Vekta subscription.\n- `400 bad_request`: invalid parameters or payload.","summary":"List a user's events"},"post":{"tags":["Events"],"operationId":"events.createEvent","parameters":[{"name":"userId","in":"path","schema":{"type":"string","description":"Id of a user you have access to (see `GET /users`), or `me` for yourself","examples":["me","usr_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"required":true}],"security":[{"bearer":[]},{"oauth2":["training-plan:write"]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"Adds an event or race to the user's calendar.\n\nThe sub sport must match the sport. Distance, elevation gain, work and carb intake are only accepted for sports that have them.\n\nWhen you create it for one of your athletes, it's added to the workspace where you coach them. If you coach them in several workspaces, send `workspaceId`.\n\nResponds with:\n- `404 not_found`: `workspaceId` isn't a workspace where you coach this athlete, or the user doesn't exist or isn't one of your athletes.\n- `403 subscription_required`: the user (or you, for `me`) doesn't have an active Vekta subscription.\n- `400 bad_request`: a sub sport or field the sport doesn't support, `workspaceId` is sent for `me` or missing while you coach the athlete in several workspaces, or other invalid parameters or payload.","summary":"Create an event","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEvent"}}},"required":true}}},"/events/{eventId}":{"patch":{"tags":["Events"],"operationId":"events.updateEvent","parameters":[{"name":"eventId","in":"path","schema":{"type":"string","description":"Id of an event, from `GET /users/{userId}/events`","examples":["evt_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"required":true}],"security":[{"bearer":[]},{"oauth2":["training-plan:write"]}],"responses":{"200":{"description":"Event","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"Changes an event. Fields you don't send stay the same. The same sport rules as on creation apply.\n\nResponds with:\n- `404 not_found`: the event doesn't exist, or isn't yours or one of your athletes'.\n- `403 subscription_required`: that user doesn't have an active Vekta subscription.\n- `403 forbidden`: the event was created in a workspace where you aren't a coach or admin.\n- `400 bad_request`: an empty payload, a sub sport or field the sport doesn't support, or other invalid parameters or payload.","summary":"Update an event","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEvent"}}},"required":true}},"delete":{"tags":["Events"],"operationId":"events.deleteEvent","parameters":[{"name":"eventId","in":"path","schema":{"type":"string","description":"Id of an event, from `GET /users/{userId}/events`","examples":["evt_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"required":true}],"security":[{"bearer":[]},{"oauth2":["training-plan:write"]}],"responses":{"204":{"description":"<No Content>"},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"Deletes the event.\n\nResponds with:\n- `404 not_found`: the event doesn't exist, or isn't yours or one of your athletes'.\n- `403 subscription_required`: that user doesn't have an active Vekta subscription.\n- `403 forbidden`: the event was created in a workspace where you aren't a coach or admin.\n- `400 bad_request`: invalid parameters or payload.","summary":"Delete an event"}},"/users/{userId}/metrics":{"get":{"tags":["Metrics"],"operationId":"metrics.listMetrics","parameters":[{"name":"userId","in":"path","schema":{"type":"string","description":"Id of a user you have access to (see `GET /users`), or `me` for yourself","examples":["me","usr_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"required":true},{"name":"from","in":"query","schema":{"type":"string","description":"First date to include (YYYY-MM-DD)","format":"date","examples":["2026-08-01"]},"required":false},{"name":"to","in":"query","schema":{"type":"string","description":"Last date to include (YYYY-MM-DD)","format":"date","examples":["2026-08-31"]},"required":false}],"security":[{"bearer":[]},{"oauth2":["metrics:read"]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Metric"}}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"All of the user's body and performance metrics over time, ordered by date.\n\nYou can filter by date.\n\nResponds with:\n- `404 not_found`: the user doesn't exist or isn't one of your athletes.\n- `403 subscription_required`: the user (or you, for `me`) doesn't have an active Vekta subscription.\n- `400 bad_request`: invalid parameters or payload.","summary":"List a user's metrics"}},"/users/{userId}/sleeps":{"get":{"tags":["Sleeps"],"operationId":"sleep.listSleeps","parameters":[{"name":"userId","in":"path","schema":{"type":"string","description":"Id of a user you have access to (see `GET /users`), or `me` for yourself","examples":["me","usr_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"required":true},{"name":"from","in":"query","schema":{"type":"string","description":"First date to include (YYYY-MM-DD)","format":"date","examples":["2026-08-01"]},"required":false},{"name":"to","in":"query","schema":{"type":"string","description":"Last date to include (YYYY-MM-DD)","format":"date","examples":["2026-08-31"]},"required":false}],"security":[{"bearer":[]},{"oauth2":["sleeps:read"]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Sleep"}}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"The user's nights of sleep, most recent first.\n\nYou can filter by date (using the `day` field).\n\nResponds with:\n- `404 not_found`: the user doesn't exist or isn't one of your athletes.\n- `403 subscription_required`: the user (or you, for `me`) doesn't have an active Vekta subscription.\n- `400 bad_request`: invalid parameters or payload.","summary":"List a user's sleeps"}},"/users/{userId}/wellness-answers":{"get":{"tags":["Wellness"],"operationId":"wellness.listWellnessAnswers","parameters":[{"name":"userId","in":"path","schema":{"type":"string","description":"Id of a user you have access to (see `GET /users`), or `me` for yourself","examples":["me","usr_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"required":true},{"name":"from","in":"query","schema":{"type":"string","description":"First date to include (YYYY-MM-DD)","format":"date","examples":["2026-08-01"]},"required":false},{"name":"to","in":"query","schema":{"type":"string","description":"Last date to include (YYYY-MM-DD)","format":"date","examples":["2026-08-31"]},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WellnessAnswer"}}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"ForbiddenError | InsufficientScopeError","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"}]}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"The user's answers to the wellness check-in questions, most recent first.\n\nEach item answers one question. Answers with the same `date` come from the same check-in. You can filter by date.\n\nResponds with:\n- `404 not_found`: the user doesn't exist or isn't one of your athletes.\n- `403 subscription_required`: the user (or you, for `me`) doesn't have an active Vekta subscription.\n- `400 bad_request`: invalid parameters or payload.","summary":"List a user's wellness answers"}},"/workspaces/{workspaceId}/invitations":{"post":{"tags":["Workspaces"],"operationId":"workspaces.createInvitation","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string","description":"Id of a workspace where you're an admin or coach (see `workspaces` in `GET /users/me`)","examples":["wke_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"required":true}],"security":[{"bearer":[]}],"responses":{"201":{"description":"WorkspaceInvitation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceInvitation"}}}},"400":{"description":"BadRequestError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"InsufficientScopeError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsufficientScopeError"}}}},"404":{"description":"NotFoundError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"RateLimitedError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}},"headers":{"retry-after":{"schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}}}},"description":"Invites someone by email to join the workspace as an athlete or coach.\n\nIf this email already has a pending invitation to the workspace, you get the same code back and it's valid for two more days. Set `sendInvitationEmail` to true to have Vekta email the code. This endpoint only counts toward the per API key rate limit.\n\nResponds with:\n- `404 not_found`: the workspace doesn't exist, or you aren't one of its admins or coaches.\n- `400 bad_request`: invalid parameters or payload.","summary":"Invite someone to a workspace","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceInvitation"}}},"required":true}}}},"components":{"schemas":{"BadRequestError":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"]},"error":{"type":"string","description":"Human-readable explanation of the error","examples":["Invalid query: Expected YYYY-MM-DD."]}},"required":["code","error"],"additionalProperties":false},"RateLimitedError":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"]},"error":{"type":"string","description":"Human-readable explanation of the error","examples":["Rate limit of 30 requests per minute exceeded, retry after the `Retry-After` header."]}},"required":["code","error"],"additionalProperties":false},"InsufficientScopeError":{"type":"object","properties":{"code":{"type":"string","enum":["insufficient_scope"]},"error":{"type":"string","description":"Human-readable explanation of the error","examples":["This access token is missing the activities:read scope."]}},"required":["code","error"],"additionalProperties":false},"UnauthorizedError":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"]},"error":{"type":"string","description":"Human-readable explanation of the error","examples":["Invalid API key."]}},"required":["code","error"],"additionalProperties":false},"NotFoundError":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"]},"error":{"type":"string","description":"Human-readable explanation of the error","examples":["Athlete not found."]}},"required":["code","error"],"additionalProperties":false},"WorkspaceInvitation":{"type":"object","properties":{"id":{"type":"string","examples":["win_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"email":{"type":"string","examples":["athlete@example.com"]},"role":{"type":"string","enum":["athlete","coach","admin"],"examples":["athlete"]},"code":{"type":"string","description":"6-character code to join the workspace","examples":["7XK2QW"]},"expiresAt":{"type":"string","description":"ISO 8601 UTC","examples":["2026-08-28T09:30:00.000Z"]}},"required":["id","email","role","code","expiresAt"],"additionalProperties":false},"CreateWorkspaceInvitation":{"type":"object","properties":{"email":{"type":"string","format":"email","examples":["athlete@example.com"]},"role":{"type":"string","enum":["athlete","coach"],"examples":["athlete"]},"sendInvitationEmail":{"type":"boolean","description":"If true, Vekta emails the code to the person. Defaults to false.","examples":[true]}},"required":["email","role"],"additionalProperties":false},"ForbiddenError":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","subscription_required"],"description":"`subscription_required`: the user doesn't have an active Vekta subscription. `forbidden`: you can see the resource, but you're not allowed to do this."},"error":{"type":"string","description":"Human-readable explanation of the error","examples":["This athlete has no active Vekta subscription."]}},"required":["code","error"],"additionalProperties":false},"WellnessAnswer":{"type":"object","properties":{"id":{"type":"string","examples":["uar_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"date":{"type":"string","format":"date","examples":["2026-08-01"]},"question":{"type":"object","properties":{"label":{"type":"string","examples":["Soreness","Stress","Sleep","Fatigue"]},"text":{"type":"string","examples":["How tired do you feel?"]}},"required":["label","text"],"additionalProperties":false},"answer":{"type":"object","properties":{"value":{"type":"number","examples":[4]},"text":{"type":"string","description":"The text of the answer with this `value`, as shown to the user","examples":["Fresh"]}},"required":["value","text"],"additionalProperties":false}},"required":["id","date","question","answer"],"additionalProperties":false},"Sleep":{"type":"object","properties":{"id":{"type":"string","examples":["slp_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"day":{"type":"string","description":"The date the user woke up (local time)","format":"date","examples":["2026-08-01"]},"startedAt":{"type":"string","examples":["2026-07-31 22:45:00+00"]},"endedAt":{"type":"string","examples":["2026-08-01 06:30:00+00"]},"utcOffset":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In minutes from UTC","examples":[120]},"startedAtLocal":{"type":"string","examples":["2026-08-01 00:45:00+00"]},"endedAtLocal":{"type":"string","examples":["2026-08-01 08:30:00+00"]},"totalDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In seconds, light + REM + deep + no data","examples":[27900]},"inBedDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In seconds","examples":[29700]},"awakeDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In seconds, awake while in bed","examples":[1800]},"lightDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In seconds","examples":[14400]},"remDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In seconds","examples":[7200]},"deepDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In seconds","examples":[5400]},"noDataDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In seconds, time with no data from the device","examples":[900]},"averageHrv":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In ms, RMSSD","examples":[62]},"restingHeartRate":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[46]},"skinBodyTemperature":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[33.8]},"skinBodyTemperatureDeviation":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In °C, compared to the user's usual value","examples":[0.2]}},"required":["id","day","startedAt","endedAt","utcOffset","startedAtLocal","endedAtLocal","totalDuration","inBedDuration","awakeDuration","lightDuration","remDuration","deepDuration","noDataDuration","averageHrv","restingHeartRate","skinBodyTemperature","skinBodyTemperatureDeviation"],"additionalProperties":false,"description":"A night of sleep recorded by a connected device"},"Metric":{"type":"object","properties":{"id":{"type":"string","examples":["mtr_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"type":{"type":"string","enum":["weight","critical power","w prime","d prime","max power","vo2max","critical speed","max heart rate","spo2","body fat"],"examples":["weight"]},"value":{"type":"number","description":"In `unit`","examples":[71.5]},"unit":{"anyOf":[{"type":"string","enum":["kg","kJ","W","J","mL/min/kg","m/s","bpm","%","m"]},{"type":"null"}],"examples":["kg"]},"source":{"anyOf":[{"type":"string","enum":["user","vekta"]},{"type":"null"}],"description":"`user`: entered by the user. `vekta`: estimated by Vekta.","examples":["user"]},"date":{"type":"string","format":"date","examples":["2026-08-01"]},"sport":{"type":"string","enum":["global","cycling","running","swimming"],"examples":["global"]}},"required":["id","type","value","unit","source","date","sport"],"additionalProperties":false},"Event":{"type":"object","properties":{"id":{"type":"string","examples":["evt_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"createdBy":{"type":"string","description":"Id of who created it: the user or one of their coaches","examples":["usr_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The workspace it was created in. Null when the user created it for themselves. Only the coaches and admins of this workspace can change or delete it.","examples":["wke_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"name":{"type":"string","examples":["Gran Fondo"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":[null]},"date":{"type":"string","format":"date","examples":["2026-09-14"]},"time":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Local start time (HH:MM:SS)","examples":["09:30:00"]},"sport":{"type":"string","enum":["cycling","running","swimming","training","multisport","walking","crossCountrySkiing","alpineSkiing","rowing","hiking","hiit","fitnessEquipment","racket","tennis","golf","standUpPaddleboarding","snowboarding","meditation","kayaking","soccer","rockClimbing","iceSkating","windsurfing","mixedMartialArts","sailing","mountaineering","surfing","boating","basketball","eBiking","hockey","snowshoeing","inlineSkating","kitesurfing","mobility","tactical","hunting","fishing","jumpRope","boxing","floorClimbing","snorkeling","motorcycling","baseball","paddling","canoeing","rafting","rugby","discGolf","wakeboarding","wakesurfing","waterTubing","waterSkiing","waterSport","snowmobiling","dance","flying","americanFootball","diving","cricket","volleyball","wheelchairPushWalk","wheelchairPushRun","paraSport","hangGliding","skyDiving","jumpmaster","horsebackRiding","driving","motorSports","shooting","archery","winterSport","videoGaming","geocaching","lacrosse","poolApnea","teamSport","grinding","transition","generic"],"examples":["cycling"]},"subSport":{"anyOf":[{"type":"string","enum":["generic","treadmill","street","trail","track","spin","indoorCycling","road","mountain","downhill","recumbent","cyclocross","handCycling","trackCycling","indoorRowing","elliptical","stairClimbing","lapSwimming","openWater","flexibilityTraining","strengthTraining","warmUp","match","exercise","challenge","indoorSkiing","cardioTraining","indoorWalking","eBikeFitness","bmx","casualWalking","speedWalking","bikeToRunTransition","runToBikeTransition","swimToBikeTransition","atv","motocross","backcountry","resort","rcDrone","wingsuit","whitewater","skateSkiing","yoga","pilates","indoorRunning","gravelCycling","eBikeMountain","commuting","mixedSurface","navigate","trackMe","map","singleGasDiving","multiGasDiving","gaugeDiving","apneaDiving","apneaHunting","virtualActivity","obstacle","breathing","ccrDiving","sailRace","expedition","ultra","indoorClimbing","bouldering","hiit","indoorGrinding","huntingWithDogs","amrap","emom","tabata","esport","triathlon","duathlon","brick","swimRun","adventureRace","truckerWorkout","pickleball","padel","indoorWheelchairWalk","indoorWheelchairRun","indoorHandCycling","field","ice","ultimate","platform","squash","badminton","racquetball","tableTennis","overland","trollingMotor","flyCanopy","flyParaglide","flyParamotor","flyPressurized","flyNavigate","flyTimer","flyAltimeter","flyWx","flyVfr","flyIfr","dynamicApnea","enduro","rucking","rally","poolTriathlon","eBikeEnduro","timeTrial"]},{"type":"null"}],"examples":["road"]},"distance":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In meters","examples":[120000]},"elevationGain":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In meters","examples":[2400]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In seconds","examples":[18000]},"work":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In kJ","examples":[3200]},"carbIntake":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In g/h","examples":[60]},"activityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The paired activity, once it's done","examples":[null]}},"required":["id","createdBy","workspaceId","name","description","date","time","sport","subSport","distance","elevationGain","duration","work","carbIntake","activityId"],"additionalProperties":false},"UpdateEvent":{"type":"object","properties":{"name":{"type":"string","examples":["Gran Fondo"]},"date":{"type":"string","description":"Local date (YYYY-MM-DD)","format":"date","examples":["2026-09-14"]},"sport":{"type":"string","enum":["cycling","running","swimming","training","multisport","walking","crossCountrySkiing","alpineSkiing","rowing","hiking","hiit","fitnessEquipment","racket","tennis","golf","standUpPaddleboarding","snowboarding","meditation","kayaking","soccer","rockClimbing","iceSkating","windsurfing","mixedMartialArts","sailing","mountaineering","surfing","boating","basketball","eBiking","hockey","snowshoeing","inlineSkating","kitesurfing","mobility","tactical","hunting","fishing","jumpRope","boxing","floorClimbing","snorkeling","motorcycling","baseball","paddling","canoeing","rafting","rugby","discGolf","wakeboarding","wakesurfing","waterTubing","waterSkiing","waterSport","snowmobiling","dance","flying","americanFootball","diving","cricket","volleyball","wheelchairPushWalk","wheelchairPushRun","paraSport","hangGliding","skyDiving","jumpmaster","horsebackRiding","driving","motorSports","shooting","archery","winterSport","videoGaming","geocaching","lacrosse","poolApnea","teamSport","grinding","transition","generic"],"description":"Fields the new sport doesn't have are reset, unless you send them.","examples":["cycling"]},"description":{"anyOf":[{"type":"string","examples":["Hilly course, start at the back of the peloton"]},{"type":"null"}]},"time":{"anyOf":[{"type":"string","description":"Local start time (HH:MM or HH:MM:SS)","format":"time","examples":["09:30"]},{"type":"null"}]},"subSport":{"anyOf":[{"type":"string","enum":["generic","treadmill","street","trail","track","spin","indoorCycling","road","mountain","downhill","recumbent","cyclocross","handCycling","trackCycling","indoorRowing","elliptical","stairClimbing","lapSwimming","openWater","flexibilityTraining","strengthTraining","warmUp","match","exercise","challenge","indoorSkiing","cardioTraining","indoorWalking","eBikeFitness","bmx","casualWalking","speedWalking","bikeToRunTransition","runToBikeTransition","swimToBikeTransition","atv","motocross","backcountry","resort","rcDrone","wingsuit","whitewater","skateSkiing","yoga","pilates","indoorRunning","gravelCycling","eBikeMountain","commuting","mixedSurface","navigate","trackMe","map","singleGasDiving","multiGasDiving","gaugeDiving","apneaDiving","apneaHunting","virtualActivity","obstacle","breathing","ccrDiving","sailRace","expedition","ultra","indoorClimbing","bouldering","hiit","indoorGrinding","huntingWithDogs","amrap","emom","tabata","esport","triathlon","duathlon","brick","swimRun","adventureRace","truckerWorkout","pickleball","padel","indoorWheelchairWalk","indoorWheelchairRun","indoorHandCycling","field","ice","ultimate","platform","squash","badminton","racquetball","tableTennis","overland","trollingMotor","flyCanopy","flyParaglide","flyParamotor","flyPressurized","flyNavigate","flyTimer","flyAltimeter","flyWx","flyVfr","flyIfr","dynamicApnea","enduro","rucking","rally","poolTriathlon","eBikeEnduro","timeTrial"]},{"type":"null"}],"description":"Must be a sub sport of `sport`","examples":["road"]},"distance":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000000},{"type":"null"}],"description":"In meters. Only for sports with a distance (cycling, running, swimming...)","examples":[120000]},"elevationGain":{"anyOf":[{"type":"integer","minimum":1,"maximum":32767},{"type":"null"}],"description":"In meters. Only for sports with an elevation gain (cycling, running, hiking...)","examples":[2400]},"duration":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"In seconds","examples":[18000]},"work":{"anyOf":[{"type":"integer","minimum":1,"maximum":2147483647},{"type":"null"}],"description":"In kJ. Only for sports with a work estimate (cycling, running, rowing...)","examples":[3200]},"carbIntake":{"anyOf":[{"type":"number","enum":[10,20,30,40,50,60,70,80,90,100,110,120]},{"type":"null"}],"description":"In g/h. Only for endurance sports","examples":[60]}},"additionalProperties":false,"minProperties":1},"CreateEvent":{"type":"object","properties":{"name":{"type":"string","examples":["Gran Fondo"]},"date":{"type":"string","description":"Local date (YYYY-MM-DD)","format":"date","examples":["2026-09-14"]},"sport":{"type":"string","enum":["cycling","running","swimming","training","multisport","walking","crossCountrySkiing","alpineSkiing","rowing","hiking","hiit","fitnessEquipment","racket","tennis","golf","standUpPaddleboarding","snowboarding","meditation","kayaking","soccer","rockClimbing","iceSkating","windsurfing","mixedMartialArts","sailing","mountaineering","surfing","boating","basketball","eBiking","hockey","snowshoeing","inlineSkating","kitesurfing","mobility","tactical","hunting","fishing","jumpRope","boxing","floorClimbing","snorkeling","motorcycling","baseball","paddling","canoeing","rafting","rugby","discGolf","wakeboarding","wakesurfing","waterTubing","waterSkiing","waterSport","snowmobiling","dance","flying","americanFootball","diving","cricket","volleyball","wheelchairPushWalk","wheelchairPushRun","paraSport","hangGliding","skyDiving","jumpmaster","horsebackRiding","driving","motorSports","shooting","archery","winterSport","videoGaming","geocaching","lacrosse","poolApnea","teamSport","grinding","transition","generic"],"examples":["cycling"]},"description":{"anyOf":[{"type":"string","examples":["Hilly course, start at the back of the peloton"]},{"type":"null"}]},"time":{"anyOf":[{"type":"string","description":"Local start time (HH:MM or HH:MM:SS)","format":"time","examples":["09:30"]},{"type":"null"}]},"subSport":{"anyOf":[{"type":"string","enum":["generic","treadmill","street","trail","track","spin","indoorCycling","road","mountain","downhill","recumbent","cyclocross","handCycling","trackCycling","indoorRowing","elliptical","stairClimbing","lapSwimming","openWater","flexibilityTraining","strengthTraining","warmUp","match","exercise","challenge","indoorSkiing","cardioTraining","indoorWalking","eBikeFitness","bmx","casualWalking","speedWalking","bikeToRunTransition","runToBikeTransition","swimToBikeTransition","atv","motocross","backcountry","resort","rcDrone","wingsuit","whitewater","skateSkiing","yoga","pilates","indoorRunning","gravelCycling","eBikeMountain","commuting","mixedSurface","navigate","trackMe","map","singleGasDiving","multiGasDiving","gaugeDiving","apneaDiving","apneaHunting","virtualActivity","obstacle","breathing","ccrDiving","sailRace","expedition","ultra","indoorClimbing","bouldering","hiit","indoorGrinding","huntingWithDogs","amrap","emom","tabata","esport","triathlon","duathlon","brick","swimRun","adventureRace","truckerWorkout","pickleball","padel","indoorWheelchairWalk","indoorWheelchairRun","indoorHandCycling","field","ice","ultimate","platform","squash","badminton","racquetball","tableTennis","overland","trollingMotor","flyCanopy","flyParaglide","flyParamotor","flyPressurized","flyNavigate","flyTimer","flyAltimeter","flyWx","flyVfr","flyIfr","dynamicApnea","enduro","rucking","rally","poolTriathlon","eBikeEnduro","timeTrial"]},{"type":"null"}],"description":"Must be a sub sport of `sport`","examples":["road"]},"distance":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000000},{"type":"null"}],"description":"In meters. Only for sports with a distance (cycling, running, swimming...)","examples":[120000]},"elevationGain":{"anyOf":[{"type":"integer","minimum":1,"maximum":32767},{"type":"null"}],"description":"In meters. Only for sports with an elevation gain (cycling, running, hiking...)","examples":[2400]},"duration":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"In seconds","examples":[18000]},"work":{"anyOf":[{"type":"integer","minimum":1,"maximum":2147483647},{"type":"null"}],"description":"In kJ. Only for sports with a work estimate (cycling, running, rowing...)","examples":[3200]},"carbIntake":{"anyOf":[{"type":"number","enum":[10,20,30,40,50,60,70,80,90,100,110,120]},{"type":"null"}],"description":"In g/h. Only for endurance sports","examples":[60]},"workspaceId":{"type":"string","description":"The workspace to create it in, when the user is one of your athletes. Only needed if you coach them in several workspaces. Not accepted for `me`.","examples":["wke_01JGXW3KQ2B8C4D5E6F7G8H9J0"]}},"required":["name","date","sport"],"additionalProperties":false},"Note":{"type":"object","properties":{"id":{"type":"string","examples":["not_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"createdBy":{"type":"string","description":"Id of who created it: the user or one of their coaches","examples":["usr_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The workspace it was created in. Null when the user created it for themselves. Only the coaches and admins of this workspace can change or delete it.","examples":["wke_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"hideUntil":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only the creator can see it until this date (YYYY-MM-DD). `9999-12-31` hides it forever. Null means the user and their coaches can see it.","format":"date","examples":[null]},"type":{"type":"string","enum":["rest day","availability","training","medical","nutrition","mental","other"],"examples":["training"]},"title":{"type":"string","examples":["Race week reminders"]},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["Keep the intensity low and hydrate well."]},"date":{"type":"string","format":"date","examples":["2026-08-10"]},"time":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Local time (HH:MM:SS)","examples":[null]}},"required":["id","createdBy","workspaceId","hideUntil","type","title","content","date","time"],"additionalProperties":false},"UpdateNote":{"type":"object","properties":{"title":{"type":"string","examples":["Race week reminders"]},"date":{"type":"string","description":"Local date (YYYY-MM-DD)","format":"date","examples":["2026-08-10"]},"type":{"type":"string","enum":["rest day","availability","training","medical","nutrition","mental","other"],"examples":["training"]},"content":{"anyOf":[{"type":"string","examples":["Keep the intensity low and hydrate well."]},{"type":"null"}]},"time":{"anyOf":[{"type":"string","description":"Local time (HH:MM or HH:MM:SS)","format":"time","examples":["18:00"]},{"type":"null"}]},"hideUntil":{"anyOf":[{"type":"string","description":"Only you can see the note until this date (YYYY-MM-DD). Use `9999-12-31` to hide it forever. Only the note's creator can change this.","format":"date","examples":["2026-08-17"]},{"type":"null"}]}},"additionalProperties":false,"minProperties":1},"CreateNote":{"type":"object","properties":{"title":{"type":"string","examples":["Race week reminders"]},"date":{"type":"string","description":"Local date (YYYY-MM-DD)","format":"date","examples":["2026-08-10"]},"type":{"type":"string","enum":["rest day","availability","training","medical","nutrition","mental","other"],"description":"Defaults to `other`","examples":["training"]},"content":{"anyOf":[{"type":"string","examples":["Keep the intensity low and hydrate well."]},{"type":"null"}]},"time":{"anyOf":[{"type":"string","description":"Local time (HH:MM or HH:MM:SS)","format":"time","examples":["18:00"]},{"type":"null"}]},"hideUntil":{"anyOf":[{"type":"string","description":"Only you can see the note until this date (YYYY-MM-DD). Use `9999-12-31` to hide it forever. Only the note's creator can change this.","format":"date","examples":["2026-08-17"]},{"type":"null"}]},"workspaceId":{"type":"string","description":"The workspace to create it in, when the user is one of your athletes. Only needed if you coach them in several workspaces. Not accepted for `me`.","examples":["wke_01JGXW3KQ2B8C4D5E6F7G8H9J0"]}},"required":["title","date"],"additionalProperties":false},"DeletedTrainingPrescription":{"type":"object","properties":{"deviceSyncs":{"type":"array","items":{"$ref":"#/components/schemas/DeviceSync"},"description":"One item per device the workout was on"}},"required":["deviceSyncs"],"additionalProperties":false},"DeviceSync":{"type":"object","properties":{"provider":{"type":"string","enum":["garmin","wahoo","oura","whoop","zwift","hammerhead","coros"],"examples":["garmin"]},"action":{"type":"string","enum":["created","updated","deleted","skipped"],"description":"What Vekta did on the device. `created`: the workout was added. `updated`: the workout on the device was updated. `deleted`: the workout was removed, because the prescription is hidden or deleted, or the device no longer accepts it. `skipped`: nothing was done, because the workout can't go on this device.","examples":["created"]},"succeeded":{"type":"boolean","description":"Whether it worked. The prescription is saved either way. Always true for `skipped`.","examples":[true]},"message":{"type":"string","description":"What happened, or why the workout can't go on this device. A generic message if it failed.","examples":["Pushed to the device."]}},"required":["provider","action","succeeded","message"],"additionalProperties":false},"TrainingPrescriptionWithDeviceSyncs":{"type":"object","properties":{"trainingPrescription":{"$ref":"#/components/schemas/TrainingPrescription"},"deviceSyncs":{"type":"array","items":{"$ref":"#/components/schemas/DeviceSync"},"description":"One item per device platform the athlete has connected. Empty if the prescription has no steps."}},"required":["trainingPrescription","deviceSyncs"],"additionalProperties":false},"TrainingPrescription":{"type":"object","properties":{"id":{"type":"string","examples":["tpr_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"prescribedBy":{"type":"string","description":"Id of who created it: the user or one of their coaches","examples":["usr_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The workspace it was created in. Null when the user created it for themselves. Only the coaches and admins of this workspace can change or delete it.","examples":["wke_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"hidden":{"type":"boolean","description":"Only its creator can see it, and it isn't sent to the athlete's devices while it's hidden.","examples":[false]},"date":{"type":"string","format":"date","examples":["2026-08-12"]},"time":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Local time (HH:MM:SS)","examples":["06:30:00"]},"title":{"type":"string","examples":["3 x 12 min threshold"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":[null]},"sport":{"type":"string","enum":["cycling","running","swimming","training","multisport","walking","crossCountrySkiing","alpineSkiing","rowing","hiking","hiit","fitnessEquipment","racket","tennis","golf","standUpPaddleboarding","snowboarding","meditation","kayaking","soccer","rockClimbing","iceSkating","windsurfing","mixedMartialArts","sailing","mountaineering","surfing","boating","basketball","eBiking","hockey","snowshoeing","inlineSkating","kitesurfing","mobility","tactical","hunting","fishing","jumpRope","boxing","floorClimbing","snorkeling","motorcycling","baseball","paddling","canoeing","rafting","rugby","discGolf","wakeboarding","wakesurfing","waterTubing","waterSkiing","waterSport","snowmobiling","dance","flying","americanFootball","diving","cricket","volleyball","wheelchairPushWalk","wheelchairPushRun","paraSport","hangGliding","skyDiving","jumpmaster","horsebackRiding","driving","motorSports","shooting","archery","winterSport","videoGaming","geocaching","lacrosse","poolApnea","teamSport","grinding","transition","generic"],"examples":["cycling"]},"subSport":{"anyOf":[{"type":"string","enum":["generic","treadmill","street","trail","track","spin","indoorCycling","road","mountain","downhill","recumbent","cyclocross","handCycling","trackCycling","indoorRowing","elliptical","stairClimbing","lapSwimming","openWater","flexibilityTraining","strengthTraining","warmUp","match","exercise","challenge","indoorSkiing","cardioTraining","indoorWalking","eBikeFitness","bmx","casualWalking","speedWalking","bikeToRunTransition","runToBikeTransition","swimToBikeTransition","atv","motocross","backcountry","resort","rcDrone","wingsuit","whitewater","skateSkiing","yoga","pilates","indoorRunning","gravelCycling","eBikeMountain","commuting","mixedSurface","navigate","trackMe","map","singleGasDiving","multiGasDiving","gaugeDiving","apneaDiving","apneaHunting","virtualActivity","obstacle","breathing","ccrDiving","sailRace","expedition","ultra","indoorClimbing","bouldering","hiit","indoorGrinding","huntingWithDogs","amrap","emom","tabata","esport","triathlon","duathlon","brick","swimRun","adventureRace","truckerWorkout","pickleball","padel","indoorWheelchairWalk","indoorWheelchairRun","indoorHandCycling","field","ice","ultimate","platform","squash","badminton","racquetball","tableTennis","overland","trollingMotor","flyCanopy","flyParaglide","flyParamotor","flyPressurized","flyNavigate","flyTimer","flyAltimeter","flyWx","flyVfr","flyIfr","dynamicApnea","enduro","rucking","rally","poolTriathlon","eBikeEnduro","timeTrial"]},{"type":"null"}],"examples":["road"]},"trainingStimulus":{"anyOf":[{"type":"string","enum":["neuromuscular","anaerobic","vo2max","threshold","tempo","aerobic","recovery","lactate clearance","durability","activation","test","race","heat"]},{"type":"null"}],"examples":["threshold"]},"structure":{"anyOf":[{"$ref":"#/components/schemas/StructureOutput"},{"type":"null"}],"description":"The steps of the workout. Null if it has none. See [Workout structure](https://docs.joinvekta.com/structure)."},"zonesType":{"anyOf":[{"type":"string","enum":["power","speed","heartRate"]},{"type":"null"}],"description":"The main target of the steps","examples":["power"]},"distance":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In meters","examples":[null]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In seconds","examples":[4500]},"freeDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In seconds, the time given to each free step","examples":[600]},"elevationGain":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In meters","examples":[null]},"averagePower":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In watts","examples":[210]},"work":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In kJ","examples":[950]},"calories":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In kcal","examples":[980]},"rpe":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"1 (very easy) to 10 (max effort)","examples":[7]},"carbIntake":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In g/h","examples":[60]},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":[null]},"activityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The paired activity, once it's done","examples":[null]}},"required":["id","prescribedBy","workspaceId","hidden","date","time","title","description","sport","subSport","trainingStimulus","structure","zonesType","distance","duration","freeDuration","elevationGain","averagePower","work","calories","rpe","carbIntake","comment","activityId"],"additionalProperties":false},"StructureOutput":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/StructureStepOutput"},{"$ref":"#/components/schemas/StructureRepetitionOutput"}]}},"StructureRepetitionOutput":{"type":"object","properties":{"type":{"type":"string","enum":["repetition"]},"nRepetitions":{"type":"number","examples":[4]},"steps":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/StructureStepOutput"},{"$ref":"#/components/schemas/StructureRepetitionOutput"}]}}},"required":["type","nRepetitions","steps"],"additionalProperties":false,"description":"A block of steps done `nRepetitions` times"},"StructureStepOutput":{"type":"object","properties":{"type":{"type":"string","enum":["step"]},"label":{"type":"string","enum":["warm up","active","intra-recovery","rest","cool down","maximum"],"examples":["active"]},"intensity":{"$ref":"#/components/schemas/StructureIntensityOutput"},"length":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["free"]}},"required":["type"],"additionalProperties":false,"title":"Free","description":"The athlete decides when to move on"},{"type":"object","properties":{"type":{"type":"string","enum":["duration"]},"duration":{"type":"number","description":"In seconds","examples":[1200]}},"required":["type","duration"],"additionalProperties":false,"title":"Duration"},{"type":"object","properties":{"type":{"type":"string","enum":["distance"]},"distance":{"type":"number","description":"In meters","examples":[5000]}},"required":["type","distance"],"additionalProperties":false,"title":"Distance"}]}},"required":["type","label","intensity","length"],"additionalProperties":false},"StructureIntensityOutput":{"type":"object","properties":{"vektaIntensity":{"anyOf":[{"type":"string","enum":["neuromuscular","anaerobic","vo2max","threshold","aerobic","recovery","tempo"]},{"type":"null"}],"description":"Classified by Vekta","examples":["threshold"]},"zone":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The athlete's zone this step is in","examples":["Z4"]},"stroke":{"anyOf":[{"type":"string","enum":["freestyle","backstroke","breaststroke","butterfly","drill","mixed","im","imByRound","rimo"]},{"type":"null"}],"examples":["freestyle"]},"passive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Swim rest spent at the wall, with no target","examples":[true]},"fromPower":{"anyOf":[{"type":"string","enum":["zone","metric","absolute"]},{"type":"null"}],"examples":["zone"]},"fromHeartRate":{"anyOf":[{"type":"string","enum":["zone","metric","absolute"]},{"type":"null"}],"examples":["zone"]},"minPower":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In watts","examples":[250]},"maxPower":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In watts","examples":[280]},"minPowerThresholdPercentage":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In % of critical power","examples":[95]},"maxPowerThresholdPercentage":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In % of critical power","examples":[106]},"minHeartRate":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[160]},"maxHeartRate":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[172]},"minMaxHeartRatePercentage":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In % of max heart rate","examples":[85]},"maxMaxHeartRatePercentage":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In % of max heart rate","examples":[91]},"minCadence":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[85]},"maxCadence":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[95]},"fromSpeed":{"anyOf":[{"type":"string","enum":["zone","metric","absolute"]},{"type":"null"}],"examples":["zone"]},"minSpeed":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In m/s (float)","examples":[3.6]},"maxSpeed":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In m/s (float)","examples":[4.2]},"minSpeedThresholdPercentage":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In % of critical speed","examples":[92]},"maxSpeedThresholdPercentage":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In % of critical speed","examples":[104]}},"required":["vektaIntensity","zone","fromHeartRate","minHeartRate","maxHeartRate","minMaxHeartRatePercentage","maxMaxHeartRatePercentage"],"additionalProperties":false},"UpdateTrainingPrescription":{"type":"object","properties":{"date":{"type":"string","description":"Local date (YYYY-MM-DD)","format":"date","examples":["2026-08-13"]},"sport":{"type":"string","enum":["cycling","running","swimming","training","multisport","walking","crossCountrySkiing","alpineSkiing","rowing","hiking","hiit","fitnessEquipment","racket","tennis","golf","standUpPaddleboarding","snowboarding","meditation","kayaking","soccer","rockClimbing","iceSkating","windsurfing","mixedMartialArts","sailing","mountaineering","surfing","boating","basketball","eBiking","hockey","snowshoeing","inlineSkating","kitesurfing","mobility","tactical","hunting","fishing","jumpRope","boxing","floorClimbing","snorkeling","motorcycling","baseball","paddling","canoeing","rafting","rugby","discGolf","wakeboarding","wakesurfing","waterTubing","waterSkiing","waterSport","snowmobiling","dance","flying","americanFootball","diving","cricket","volleyball","wheelchairPushWalk","wheelchairPushRun","paraSport","hangGliding","skyDiving","jumpmaster","horsebackRiding","driving","motorSports","shooting","archery","winterSport","videoGaming","geocaching","lacrosse","poolApnea","teamSport","grinding","transition","generic"],"description":"Fields the new sport doesn't have are reset, unless you send them. If the prescription has steps, also send a new `structure` (or `structure: null`).","examples":["running"]},"hidden":{"type":"boolean","description":"Only the prescription's creator can change this. Unhiding sends the workout to the athlete's devices, and hiding removes it.","examples":[false]},"subSport":{"anyOf":[{"type":"string","enum":["generic","treadmill","street","trail","track","spin","indoorCycling","road","mountain","downhill","recumbent","cyclocross","handCycling","trackCycling","indoorRowing","elliptical","stairClimbing","lapSwimming","openWater","flexibilityTraining","strengthTraining","warmUp","match","exercise","challenge","indoorSkiing","cardioTraining","indoorWalking","eBikeFitness","bmx","casualWalking","speedWalking","bikeToRunTransition","runToBikeTransition","swimToBikeTransition","atv","motocross","backcountry","resort","rcDrone","wingsuit","whitewater","skateSkiing","yoga","pilates","indoorRunning","gravelCycling","eBikeMountain","commuting","mixedSurface","navigate","trackMe","map","singleGasDiving","multiGasDiving","gaugeDiving","apneaDiving","apneaHunting","virtualActivity","obstacle","breathing","ccrDiving","sailRace","expedition","ultra","indoorClimbing","bouldering","hiit","indoorGrinding","huntingWithDogs","amrap","emom","tabata","esport","triathlon","duathlon","brick","swimRun","adventureRace","truckerWorkout","pickleball","padel","indoorWheelchairWalk","indoorWheelchairRun","indoorHandCycling","field","ice","ultimate","platform","squash","badminton","racquetball","tableTennis","overland","trollingMotor","flyCanopy","flyParaglide","flyParamotor","flyPressurized","flyNavigate","flyTimer","flyAltimeter","flyWx","flyVfr","flyIfr","dynamicApnea","enduro","rucking","rally","poolTriathlon","eBikeEnduro","timeTrial"]},{"type":"null"}],"description":"Must be a sub sport of `sport`","examples":["road"]},"structure":{"anyOf":[{"$ref":"#/components/schemas/StructurePrescriptionInput"},{"type":"null"}],"description":"Send `null` to remove the steps."},"zonesType":{"type":"string","enum":["power","speed","heartRate"],"description":"The main target of the steps. Required when you send `structure`, and not accepted without it. See [Workout structure](https://docs.joinvekta.com/structure).","examples":["power"]},"duration":{"anyOf":[{"type":"integer","minimum":1,"maximum":2147483647},{"type":"null"}],"description":"In seconds. With a structure, Vekta computes it from the steps when it can. See [Workout structure](https://docs.joinvekta.com/structure).","examples":[4500]},"distance":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000000},{"type":"null"}],"description":"In meters. Only for sports with a distance. With a structure, Vekta computes it from the steps when it can. See [Workout structure](https://docs.joinvekta.com/structure).","examples":[40000]},"elevationGain":{"anyOf":[{"type":"integer","minimum":1,"maximum":32767},{"type":"null"}],"description":"In meters. Only for sports with an elevation gain","examples":[600]},"work":{"anyOf":[{"type":"integer","minimum":1,"maximum":2147483647},{"type":"null"}],"description":"In kJ. Only for sports with a work estimate. With a structure, Vekta computes it from the steps when it can. See [Workout structure](https://docs.joinvekta.com/structure).","examples":[950]},"time":{"anyOf":[{"type":"string","description":"Local start time (HH:MM or HH:MM:SS)","format":"time","examples":["06:30"]},{"type":"null"}]},"title":{"type":"string","examples":["3 x 12 min threshold"]},"description":{"anyOf":[{"type":"string","examples":["Stay seated on the efforts"]},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","description":"Comment from the coach","examples":["Felt strong"]},{"type":"null"}]},"trainingStimulus":{"anyOf":[{"type":"string","enum":["neuromuscular","anaerobic","vo2max","threshold","tempo","aerobic","recovery","lactate clearance","durability","activation","test","race","heat"]},{"type":"null"}],"examples":["threshold"]},"rpe":{"anyOf":[{"type":"integer","minimum":1,"maximum":10,"description":"1 (very easy) to 10 (max effort)","examples":[7]},{"type":"null"}]},"carbIntake":{"anyOf":[{"type":"number","enum":[10,20,30,40,50,60,70,80,90,100,110,120]},{"type":"null"}],"description":"In g/h. Only for endurance sports. If you don't send it, Vekta can estimate it from the steps. See [Workout structure](https://docs.joinvekta.com/structure).","examples":[60]}},"additionalProperties":false,"minProperties":1},"StructurePrescriptionInput":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/StructurePrescriptionStepInput"},{"$ref":"#/components/schemas/StructurePrescriptionRepetitionInput"}]},"minItems":1,"description":"The steps of the workout, for cycling, running and swimming. See [Workout structure](https://docs.joinvekta.com/structure)."},"StructurePrescriptionRepetitionInput":{"type":"object","properties":{"type":{"type":"string","enum":["repetition"]},"nRepetitions":{"type":"integer","minimum":1,"maximum":9007199254740991,"examples":[4]},"steps":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/StructurePrescriptionStepInput"},{"$ref":"#/components/schemas/StructurePrescriptionNestedRepetitionInput"}]},"minItems":1}},"required":["type","nRepetitions","steps"],"additionalProperties":false,"description":"A block of steps done `nRepetitions` times. Repetitions can be nested up to 3 levels deep."},"StructurePrescriptionNestedRepetitionInput":{"type":"object","properties":{"type":{"type":"string","enum":["repetition"]},"nRepetitions":{"type":"integer","minimum":1,"maximum":9007199254740991,"examples":[4]},"steps":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/StructurePrescriptionStepInput"},{"$ref":"#/components/schemas/StructurePrescriptionInnermostRepetitionInput"}]},"minItems":1}},"required":["type","nRepetitions","steps"],"additionalProperties":false,"description":"A repetition inside another repetition"},"StructurePrescriptionInnermostRepetitionInput":{"type":"object","properties":{"type":{"type":"string","enum":["repetition"]},"nRepetitions":{"type":"integer","minimum":1,"maximum":9007199254740991,"examples":[4]},"steps":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/StructurePrescriptionStepInput"}]},"minItems":1}},"required":["type","nRepetitions","steps"],"additionalProperties":false,"description":"A repetition at the third level. Can only contain steps."},"StructurePrescriptionStepInput":{"type":"object","properties":{"type":{"type":"string","enum":["step"]},"label":{"type":"string","enum":["warm up","active","intra-recovery","rest","cool down","maximum"],"examples":["active"]},"length":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["free"]}},"required":["type"],"additionalProperties":false,"title":"Free","description":"The athlete decides when to move on"},{"type":"object","properties":{"type":{"type":"string","enum":["duration"]},"duration":{"type":"number","description":"In seconds","examples":[720],"exclusiveMinimum":0}},"required":["type","duration"],"additionalProperties":false,"title":"Duration"},{"type":"object","properties":{"type":{"type":"string","enum":["distance"]},"distance":{"type":"number","description":"In meters","examples":[400],"exclusiveMinimum":0}},"required":["type","distance"],"additionalProperties":false,"title":"Distance"}]},"intensity":{"$ref":"#/components/schemas/StructurePrescriptionIntensityInput"}},"required":["type","label","length"],"additionalProperties":false},"StructurePrescriptionIntensityInput":{"type":"object","properties":{"power":{"$ref":"#/components/schemas/StructurePrescriptionPowerTargetInput"},"heartRate":{"$ref":"#/components/schemas/StructurePrescriptionHeartRateTargetInput"},"speed":{"$ref":"#/components/schemas/StructurePrescriptionSpeedTargetInput"},"cadence":{"type":"object","properties":{"min":{"type":"number","description":"In rpm (spm for running)","examples":[85],"minimum":0},"max":{"type":"number","description":"In rpm (spm for running)","examples":[95],"minimum":0}},"required":["min","max"],"additionalProperties":false},"stroke":{"type":"string","enum":["freestyle","backstroke","breaststroke","butterfly","drill","mixed","im","imByRound","rimo"],"examples":["freestyle"]},"passive":{"type":"boolean","description":"Swim rest spent at the wall, with no target","examples":[true]}},"additionalProperties":false,"description":"All targets are optional, and each sport accepts different ones. See [Workout structure](https://docs.joinvekta.com/structure)."},"StructurePrescriptionSpeedTargetInput":{"anyOf":[{"type":"object","properties":{"zone":{"type":"string","description":"Name of one of the athlete's speed zones","examples":["tempo"]}},"required":["zone"],"additionalProperties":false,"title":"Zone"},{"type":"object","properties":{"minPercentage":{"type":"number","description":"In % of the athlete's critical speed","examples":[90],"minimum":0},"maxPercentage":{"type":"number","description":"In % of the athlete's critical speed","examples":[95],"minimum":0}},"required":["minPercentage","maxPercentage"],"additionalProperties":false,"title":"Percentage"},{"type":"object","properties":{"min":{"type":"number","description":"In m/s","examples":[3.6],"minimum":0},"max":{"type":"number","description":"In m/s","examples":[3.8],"minimum":0}},"required":["min","max"],"additionalProperties":false,"title":"Absolute"}]},"StructurePrescriptionHeartRateTargetInput":{"anyOf":[{"type":"object","properties":{"zone":{"type":"string","description":"Name of one of the athlete's heart rate zones","examples":["aerobic"]}},"required":["zone"],"additionalProperties":false,"title":"Zone"},{"type":"object","properties":{"minPercentage":{"type":"number","description":"In % of the athlete's max heart rate","examples":[72],"minimum":0},"maxPercentage":{"type":"number","description":"In % of the athlete's max heart rate","examples":[82],"minimum":0}},"required":["minPercentage","maxPercentage"],"additionalProperties":false,"title":"Percentage"},{"type":"object","properties":{"min":{"type":"number","description":"In bpm","examples":[135],"minimum":0},"max":{"type":"number","description":"In bpm","examples":[150],"minimum":0}},"required":["min","max"],"additionalProperties":false,"title":"Absolute"}]},"StructurePrescriptionPowerTargetInput":{"anyOf":[{"type":"object","properties":{"zone":{"type":"string","description":"Name of one of the athlete's power zones","examples":["threshold"]}},"required":["zone"],"additionalProperties":false,"title":"Zone"},{"type":"object","properties":{"minPercentage":{"type":"number","description":"In % of the athlete's critical power","examples":[95],"minimum":0},"maxPercentage":{"type":"number","description":"In % of the athlete's critical power","examples":[105],"minimum":0}},"required":["minPercentage","maxPercentage"],"additionalProperties":false,"title":"Percentage"},{"type":"object","properties":{"min":{"type":"number","description":"In watts","examples":[250],"minimum":0},"max":{"type":"number","description":"In watts","examples":[280],"minimum":0}},"required":["min","max"],"additionalProperties":false,"title":"Absolute"}]},"CreateTrainingPrescription":{"type":"object","properties":{"trainingCollectionId":{"type":"string","description":"Id of one of your training collections (see `GET /training-collections`) to start from. The fields you send replace the collection's values.","examples":["tcl_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"date":{"type":"string","description":"Local date (YYYY-MM-DD)","format":"date","examples":["2026-08-12"]},"sport":{"type":"string","enum":["cycling","running","swimming","training","multisport","walking","crossCountrySkiing","alpineSkiing","rowing","hiking","hiit","fitnessEquipment","racket","tennis","golf","standUpPaddleboarding","snowboarding","meditation","kayaking","soccer","rockClimbing","iceSkating","windsurfing","mixedMartialArts","sailing","mountaineering","surfing","boating","basketball","eBiking","hockey","snowshoeing","inlineSkating","kitesurfing","mobility","tactical","hunting","fishing","jumpRope","boxing","floorClimbing","snorkeling","motorcycling","baseball","paddling","canoeing","rafting","rugby","discGolf","wakeboarding","wakesurfing","waterTubing","waterSkiing","waterSport","snowmobiling","dance","flying","americanFootball","diving","cricket","volleyball","wheelchairPushWalk","wheelchairPushRun","paraSport","hangGliding","skyDiving","jumpmaster","horsebackRiding","driving","motorSports","shooting","archery","winterSport","videoGaming","geocaching","lacrosse","poolApnea","teamSport","grinding","transition","generic"],"description":"Required without `trainingCollectionId`. To change the sport of a collection with steps, also send a new `structure` (or `structure: null`).","examples":["cycling"]},"hidden":{"type":"boolean","description":"Only you can see it, and it isn't sent to the athlete's devices while it's hidden. Defaults to false.","examples":[false]},"workspaceId":{"type":"string","description":"The workspace to create it in, when the user is one of your athletes. Only needed if you coach them in several workspaces. Not accepted for `me`.","examples":["wke_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"subSport":{"anyOf":[{"type":"string","enum":["generic","treadmill","street","trail","track","spin","indoorCycling","road","mountain","downhill","recumbent","cyclocross","handCycling","trackCycling","indoorRowing","elliptical","stairClimbing","lapSwimming","openWater","flexibilityTraining","strengthTraining","warmUp","match","exercise","challenge","indoorSkiing","cardioTraining","indoorWalking","eBikeFitness","bmx","casualWalking","speedWalking","bikeToRunTransition","runToBikeTransition","swimToBikeTransition","atv","motocross","backcountry","resort","rcDrone","wingsuit","whitewater","skateSkiing","yoga","pilates","indoorRunning","gravelCycling","eBikeMountain","commuting","mixedSurface","navigate","trackMe","map","singleGasDiving","multiGasDiving","gaugeDiving","apneaDiving","apneaHunting","virtualActivity","obstacle","breathing","ccrDiving","sailRace","expedition","ultra","indoorClimbing","bouldering","hiit","indoorGrinding","huntingWithDogs","amrap","emom","tabata","esport","triathlon","duathlon","brick","swimRun","adventureRace","truckerWorkout","pickleball","padel","indoorWheelchairWalk","indoorWheelchairRun","indoorHandCycling","field","ice","ultimate","platform","squash","badminton","racquetball","tableTennis","overland","trollingMotor","flyCanopy","flyParaglide","flyParamotor","flyPressurized","flyNavigate","flyTimer","flyAltimeter","flyWx","flyVfr","flyIfr","dynamicApnea","enduro","rucking","rally","poolTriathlon","eBikeEnduro","timeTrial"]},{"type":"null"}],"description":"Must be a sub sport of `sport`","examples":["road"]},"structure":{"anyOf":[{"$ref":"#/components/schemas/StructurePrescriptionInput"},{"type":"null"}],"description":"Send `null` to remove the steps."},"zonesType":{"type":"string","enum":["power","speed","heartRate"],"description":"The main target of the steps. Required when you send `structure`, and not accepted without it. See [Workout structure](https://docs.joinvekta.com/structure).","examples":["power"]},"duration":{"anyOf":[{"type":"integer","minimum":1,"maximum":2147483647},{"type":"null"}],"description":"In seconds. With a structure, Vekta computes it from the steps when it can. See [Workout structure](https://docs.joinvekta.com/structure).","examples":[4500]},"distance":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000000},{"type":"null"}],"description":"In meters. Only for sports with a distance. With a structure, Vekta computes it from the steps when it can. See [Workout structure](https://docs.joinvekta.com/structure).","examples":[40000]},"elevationGain":{"anyOf":[{"type":"integer","minimum":1,"maximum":32767},{"type":"null"}],"description":"In meters. Only for sports with an elevation gain","examples":[600]},"work":{"anyOf":[{"type":"integer","minimum":1,"maximum":2147483647},{"type":"null"}],"description":"In kJ. Only for sports with a work estimate. With a structure, Vekta computes it from the steps when it can. See [Workout structure](https://docs.joinvekta.com/structure).","examples":[950]},"time":{"anyOf":[{"type":"string","description":"Local start time (HH:MM or HH:MM:SS)","format":"time","examples":["06:30"]},{"type":"null"}]},"title":{"type":"string","examples":["3 x 12 min threshold"]},"description":{"anyOf":[{"type":"string","examples":["Stay seated on the efforts"]},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","description":"Comment from the coach","examples":["Felt strong"]},{"type":"null"}]},"trainingStimulus":{"anyOf":[{"type":"string","enum":["neuromuscular","anaerobic","vo2max","threshold","tempo","aerobic","recovery","lactate clearance","durability","activation","test","race","heat"]},{"type":"null"}],"examples":["threshold"]},"rpe":{"anyOf":[{"type":"integer","minimum":1,"maximum":10,"description":"1 (very easy) to 10 (max effort)","examples":[7]},{"type":"null"}]},"carbIntake":{"anyOf":[{"type":"number","enum":[10,20,30,40,50,60,70,80,90,100,110,120]},{"type":"null"}],"description":"In g/h. Only for endurance sports. If you don't send it, Vekta can estimate it from the steps. See [Workout structure](https://docs.joinvekta.com/structure).","examples":[60]}},"required":["date"],"additionalProperties":false},"TrainingCollection":{"type":"object","properties":{"id":{"type":"string","examples":["tcl_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"title":{"type":"string","examples":["3 x 12 min threshold"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":[null]},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":[null]},"sport":{"type":"string","enum":["cycling","running","swimming","training","multisport","walking","crossCountrySkiing","alpineSkiing","rowing","hiking","hiit","fitnessEquipment","racket","tennis","golf","standUpPaddleboarding","snowboarding","meditation","kayaking","soccer","rockClimbing","iceSkating","windsurfing","mixedMartialArts","sailing","mountaineering","surfing","boating","basketball","eBiking","hockey","snowshoeing","inlineSkating","kitesurfing","mobility","tactical","hunting","fishing","jumpRope","boxing","floorClimbing","snorkeling","motorcycling","baseball","paddling","canoeing","rafting","rugby","discGolf","wakeboarding","wakesurfing","waterTubing","waterSkiing","waterSport","snowmobiling","dance","flying","americanFootball","diving","cricket","volleyball","wheelchairPushWalk","wheelchairPushRun","paraSport","hangGliding","skyDiving","jumpmaster","horsebackRiding","driving","motorSports","shooting","archery","winterSport","videoGaming","geocaching","lacrosse","poolApnea","teamSport","grinding","transition","generic"],"examples":["cycling"]},"subSport":{"anyOf":[{"type":"string","enum":["generic","treadmill","street","trail","track","spin","indoorCycling","road","mountain","downhill","recumbent","cyclocross","handCycling","trackCycling","indoorRowing","elliptical","stairClimbing","lapSwimming","openWater","flexibilityTraining","strengthTraining","warmUp","match","exercise","challenge","indoorSkiing","cardioTraining","indoorWalking","eBikeFitness","bmx","casualWalking","speedWalking","bikeToRunTransition","runToBikeTransition","swimToBikeTransition","atv","motocross","backcountry","resort","rcDrone","wingsuit","whitewater","skateSkiing","yoga","pilates","indoorRunning","gravelCycling","eBikeMountain","commuting","mixedSurface","navigate","trackMe","map","singleGasDiving","multiGasDiving","gaugeDiving","apneaDiving","apneaHunting","virtualActivity","obstacle","breathing","ccrDiving","sailRace","expedition","ultra","indoorClimbing","bouldering","hiit","indoorGrinding","huntingWithDogs","amrap","emom","tabata","esport","triathlon","duathlon","brick","swimRun","adventureRace","truckerWorkout","pickleball","padel","indoorWheelchairWalk","indoorWheelchairRun","indoorHandCycling","field","ice","ultimate","platform","squash","badminton","racquetball","tableTennis","overland","trollingMotor","flyCanopy","flyParaglide","flyParamotor","flyPressurized","flyNavigate","flyTimer","flyAltimeter","flyWx","flyVfr","flyIfr","dynamicApnea","enduro","rucking","rally","poolTriathlon","eBikeEnduro","timeTrial"]},{"type":"null"}],"examples":[null]},"trainingStimulus":{"anyOf":[{"type":"string","enum":["neuromuscular","anaerobic","vo2max","threshold","tempo","aerobic","recovery","lactate clearance","durability","activation","test","race","heat"]},{"type":"null"}],"examples":["threshold"]},"structure":{"anyOf":[{"$ref":"#/components/schemas/StructureOutput"},{"type":"null"}],"description":"The steps of the workout. Null if it has none. See [Workout structure](https://docs.joinvekta.com/structure)."},"zonesType":{"anyOf":[{"type":"string","enum":["power","speed","heartRate"]},{"type":"null"}],"description":"The main target of the steps","examples":["power"]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In seconds","examples":[4500]},"freeDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In seconds, the time given to each free step","examples":[600]},"distance":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In meters","examples":[null]},"elevationGain":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In meters","examples":[null]},"rpe":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"1 (very easy) to 10 (max effort)","examples":[7]}},"required":["id","title","description","comment","sport","subSport","trainingStimulus","structure","zonesType","duration","freeDuration","distance","elevationGain","rpe"],"additionalProperties":false,"description":"A workout template from your library. Its targets are converted for the athlete when you prescribe it."},"UpdateTrainingCollection":{"type":"object","properties":{"title":{"type":"string","examples":["3 x 12 min threshold"]},"sport":{"type":"string","enum":["cycling","running","swimming","training","multisport","walking","crossCountrySkiing","alpineSkiing","rowing","hiking","hiit","fitnessEquipment","racket","tennis","golf","standUpPaddleboarding","snowboarding","meditation","kayaking","soccer","rockClimbing","iceSkating","windsurfing","mixedMartialArts","sailing","mountaineering","surfing","boating","basketball","eBiking","hockey","snowshoeing","inlineSkating","kitesurfing","mobility","tactical","hunting","fishing","jumpRope","boxing","floorClimbing","snorkeling","motorcycling","baseball","paddling","canoeing","rafting","rugby","discGolf","wakeboarding","wakesurfing","waterTubing","waterSkiing","waterSport","snowmobiling","dance","flying","americanFootball","diving","cricket","volleyball","wheelchairPushWalk","wheelchairPushRun","paraSport","hangGliding","skyDiving","jumpmaster","horsebackRiding","driving","motorSports","shooting","archery","winterSport","videoGaming","geocaching","lacrosse","poolApnea","teamSport","grinding","transition","generic"],"description":"Fields the new sport doesn't have are reset, unless you send them. If the collection has steps, also send a new `structure` (or `structure: null`).","examples":["running"]},"subSport":{"anyOf":[{"type":"string","enum":["generic","treadmill","street","trail","track","spin","indoorCycling","road","mountain","downhill","recumbent","cyclocross","handCycling","trackCycling","indoorRowing","elliptical","stairClimbing","lapSwimming","openWater","flexibilityTraining","strengthTraining","warmUp","match","exercise","challenge","indoorSkiing","cardioTraining","indoorWalking","eBikeFitness","bmx","casualWalking","speedWalking","bikeToRunTransition","runToBikeTransition","swimToBikeTransition","atv","motocross","backcountry","resort","rcDrone","wingsuit","whitewater","skateSkiing","yoga","pilates","indoorRunning","gravelCycling","eBikeMountain","commuting","mixedSurface","navigate","trackMe","map","singleGasDiving","multiGasDiving","gaugeDiving","apneaDiving","apneaHunting","virtualActivity","obstacle","breathing","ccrDiving","sailRace","expedition","ultra","indoorClimbing","bouldering","hiit","indoorGrinding","huntingWithDogs","amrap","emom","tabata","esport","triathlon","duathlon","brick","swimRun","adventureRace","truckerWorkout","pickleball","padel","indoorWheelchairWalk","indoorWheelchairRun","indoorHandCycling","field","ice","ultimate","platform","squash","badminton","racquetball","tableTennis","overland","trollingMotor","flyCanopy","flyParaglide","flyParamotor","flyPressurized","flyNavigate","flyTimer","flyAltimeter","flyWx","flyVfr","flyIfr","dynamicApnea","enduro","rucking","rally","poolTriathlon","eBikeEnduro","timeTrial"]},{"type":"null"}],"description":"Must be a sub sport of `sport`","examples":["road"]},"zonesType":{"type":"string","enum":["power","speed","heartRate"],"description":"The main target of the steps. Required when you send `structure`, and not accepted without it. See [Workout structure](https://docs.joinvekta.com/structure).","examples":["power"]},"elevationGain":{"anyOf":[{"type":"integer","minimum":1,"maximum":32767},{"type":"null"}],"description":"In meters. Only for sports with an elevation gain","examples":[600]},"description":{"anyOf":[{"type":"string","examples":["Stay seated on the efforts"]},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","description":"Comment from the coach","examples":["Felt strong"]},{"type":"null"}]},"trainingStimulus":{"anyOf":[{"type":"string","enum":["neuromuscular","anaerobic","vo2max","threshold","tempo","aerobic","recovery","lactate clearance","durability","activation","test","race","heat"]},{"type":"null"}],"examples":["threshold"]},"rpe":{"anyOf":[{"type":"integer","minimum":1,"maximum":10,"description":"1 (very easy) to 10 (max effort)","examples":[7]},{"type":"null"}]},"structure":{"anyOf":[{"$ref":"#/components/schemas/StructureCollectionInput"},{"type":"null"}],"description":"Send `null` to remove the steps."},"duration":{"anyOf":[{"type":"integer","minimum":1,"maximum":2147483647},{"type":"null"}],"description":"In seconds. With a structure, Vekta computes it from the steps when it can. See [Workout structure](https://docs.joinvekta.com/structure).","examples":[4500]},"distance":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000000},{"type":"null"}],"description":"In meters. Only for sports with a distance. With a structure, Vekta computes it from the steps when it can. See [Workout structure](https://docs.joinvekta.com/structure).","examples":[40000]}},"additionalProperties":false,"minProperties":1},"StructureCollectionInput":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/StructureCollectionStepInput"},{"$ref":"#/components/schemas/StructureCollectionRepetitionInput"}]},"minItems":1,"description":"The steps of the workout, for cycling, running and swimming. Zones aren't accepted. See [Workout structure](https://docs.joinvekta.com/structure)."},"StructureCollectionRepetitionInput":{"type":"object","properties":{"type":{"type":"string","enum":["repetition"]},"nRepetitions":{"type":"integer","minimum":1,"maximum":9007199254740991,"examples":[4]},"steps":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/StructureCollectionStepInput"},{"$ref":"#/components/schemas/StructureCollectionNestedRepetitionInput"}]},"minItems":1}},"required":["type","nRepetitions","steps"],"additionalProperties":false,"description":"A block of steps done `nRepetitions` times. Repetitions can be nested up to 3 levels deep."},"StructureCollectionNestedRepetitionInput":{"type":"object","properties":{"type":{"type":"string","enum":["repetition"]},"nRepetitions":{"type":"integer","minimum":1,"maximum":9007199254740991,"examples":[4]},"steps":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/StructureCollectionStepInput"},{"$ref":"#/components/schemas/StructureCollectionInnermostRepetitionInput"}]},"minItems":1}},"required":["type","nRepetitions","steps"],"additionalProperties":false,"description":"A repetition inside another repetition"},"StructureCollectionInnermostRepetitionInput":{"type":"object","properties":{"type":{"type":"string","enum":["repetition"]},"nRepetitions":{"type":"integer","minimum":1,"maximum":9007199254740991,"examples":[4]},"steps":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/StructureCollectionStepInput"}]},"minItems":1}},"required":["type","nRepetitions","steps"],"additionalProperties":false,"description":"A repetition at the third level. Can only contain steps."},"StructureCollectionStepInput":{"type":"object","properties":{"type":{"type":"string","enum":["step"]},"label":{"type":"string","enum":["warm up","active","intra-recovery","rest","cool down","maximum"],"examples":["active"]},"length":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["free"]}},"required":["type"],"additionalProperties":false,"title":"Free","description":"The athlete decides when to move on"},{"type":"object","properties":{"type":{"type":"string","enum":["duration"]},"duration":{"type":"number","description":"In seconds","examples":[720],"exclusiveMinimum":0}},"required":["type","duration"],"additionalProperties":false,"title":"Duration"},{"type":"object","properties":{"type":{"type":"string","enum":["distance"]},"distance":{"type":"number","description":"In meters","examples":[400],"exclusiveMinimum":0}},"required":["type","distance"],"additionalProperties":false,"title":"Distance"}]},"intensity":{"$ref":"#/components/schemas/StructureCollectionIntensityInput"}},"required":["type","label","length"],"additionalProperties":false},"StructureCollectionIntensityInput":{"type":"object","properties":{"power":{"$ref":"#/components/schemas/StructureCollectionPowerTargetInput"},"heartRate":{"$ref":"#/components/schemas/StructureCollectionHeartRateTargetInput"},"speed":{"$ref":"#/components/schemas/StructureCollectionSpeedTargetInput"},"cadence":{"type":"object","properties":{"min":{"type":"number","description":"In rpm (spm for running)","examples":[85],"minimum":0},"max":{"type":"number","description":"In rpm (spm for running)","examples":[95],"minimum":0}},"required":["min","max"],"additionalProperties":false},"stroke":{"type":"string","enum":["freestyle","backstroke","breaststroke","butterfly","drill","mixed","im","imByRound","rimo"],"examples":["freestyle"]},"passive":{"type":"boolean","description":"Swim rest spent at the wall, with no target","examples":[true]}},"additionalProperties":false,"description":"All targets are optional, and each sport accepts different ones. See [Workout structure](https://docs.joinvekta.com/structure)."},"StructureCollectionSpeedTargetInput":{"anyOf":[{"type":"object","properties":{"minPercentage":{"type":"number","description":"In % of the athlete's critical speed","examples":[90],"minimum":0},"maxPercentage":{"type":"number","description":"In % of the athlete's critical speed","examples":[95],"minimum":0}},"required":["minPercentage","maxPercentage"],"additionalProperties":false,"title":"Percentage"},{"type":"object","properties":{"min":{"type":"number","description":"In m/s","examples":[3.6],"minimum":0},"max":{"type":"number","description":"In m/s","examples":[3.8],"minimum":0}},"required":["min","max"],"additionalProperties":false,"title":"Absolute"}]},"StructureCollectionHeartRateTargetInput":{"anyOf":[{"type":"object","properties":{"minPercentage":{"type":"number","description":"In % of the athlete's max heart rate","examples":[72],"minimum":0},"maxPercentage":{"type":"number","description":"In % of the athlete's max heart rate","examples":[82],"minimum":0}},"required":["minPercentage","maxPercentage"],"additionalProperties":false,"title":"Percentage"},{"type":"object","properties":{"min":{"type":"number","description":"In bpm","examples":[135],"minimum":0},"max":{"type":"number","description":"In bpm","examples":[150],"minimum":0}},"required":["min","max"],"additionalProperties":false,"title":"Absolute"}]},"StructureCollectionPowerTargetInput":{"anyOf":[{"type":"object","properties":{"minPercentage":{"type":"number","description":"In % of the athlete's critical power","examples":[95],"minimum":0},"maxPercentage":{"type":"number","description":"In % of the athlete's critical power","examples":[105],"minimum":0}},"required":["minPercentage","maxPercentage"],"additionalProperties":false,"title":"Percentage"},{"type":"object","properties":{"min":{"type":"number","description":"In watts","examples":[250],"minimum":0},"max":{"type":"number","description":"In watts","examples":[280],"minimum":0}},"required":["min","max"],"additionalProperties":false,"title":"Absolute"}]},"CreateTrainingCollection":{"type":"object","properties":{"title":{"type":"string","examples":["3 x 12 min threshold"]},"sport":{"type":"string","enum":["cycling","running","swimming","training","multisport","walking","crossCountrySkiing","alpineSkiing","rowing","hiking","hiit","fitnessEquipment","racket","tennis","golf","standUpPaddleboarding","snowboarding","meditation","kayaking","soccer","rockClimbing","iceSkating","windsurfing","mixedMartialArts","sailing","mountaineering","surfing","boating","basketball","eBiking","hockey","snowshoeing","inlineSkating","kitesurfing","mobility","tactical","hunting","fishing","jumpRope","boxing","floorClimbing","snorkeling","motorcycling","baseball","paddling","canoeing","rafting","rugby","discGolf","wakeboarding","wakesurfing","waterTubing","waterSkiing","waterSport","snowmobiling","dance","flying","americanFootball","diving","cricket","volleyball","wheelchairPushWalk","wheelchairPushRun","paraSport","hangGliding","skyDiving","jumpmaster","horsebackRiding","driving","motorSports","shooting","archery","winterSport","videoGaming","geocaching","lacrosse","poolApnea","teamSport","grinding","transition","generic"],"examples":["cycling"]},"subSport":{"anyOf":[{"type":"string","enum":["generic","treadmill","street","trail","track","spin","indoorCycling","road","mountain","downhill","recumbent","cyclocross","handCycling","trackCycling","indoorRowing","elliptical","stairClimbing","lapSwimming","openWater","flexibilityTraining","strengthTraining","warmUp","match","exercise","challenge","indoorSkiing","cardioTraining","indoorWalking","eBikeFitness","bmx","casualWalking","speedWalking","bikeToRunTransition","runToBikeTransition","swimToBikeTransition","atv","motocross","backcountry","resort","rcDrone","wingsuit","whitewater","skateSkiing","yoga","pilates","indoorRunning","gravelCycling","eBikeMountain","commuting","mixedSurface","navigate","trackMe","map","singleGasDiving","multiGasDiving","gaugeDiving","apneaDiving","apneaHunting","virtualActivity","obstacle","breathing","ccrDiving","sailRace","expedition","ultra","indoorClimbing","bouldering","hiit","indoorGrinding","huntingWithDogs","amrap","emom","tabata","esport","triathlon","duathlon","brick","swimRun","adventureRace","truckerWorkout","pickleball","padel","indoorWheelchairWalk","indoorWheelchairRun","indoorHandCycling","field","ice","ultimate","platform","squash","badminton","racquetball","tableTennis","overland","trollingMotor","flyCanopy","flyParaglide","flyParamotor","flyPressurized","flyNavigate","flyTimer","flyAltimeter","flyWx","flyVfr","flyIfr","dynamicApnea","enduro","rucking","rally","poolTriathlon","eBikeEnduro","timeTrial"]},{"type":"null"}],"description":"Must be a sub sport of `sport`","examples":["road"]},"zonesType":{"type":"string","enum":["power","speed","heartRate"],"description":"The main target of the steps. Required when you send `structure`, and not accepted without it. See [Workout structure](https://docs.joinvekta.com/structure).","examples":["power"]},"elevationGain":{"anyOf":[{"type":"integer","minimum":1,"maximum":32767},{"type":"null"}],"description":"In meters. Only for sports with an elevation gain","examples":[600]},"description":{"anyOf":[{"type":"string","examples":["Stay seated on the efforts"]},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","description":"Comment from the coach","examples":["Felt strong"]},{"type":"null"}]},"trainingStimulus":{"anyOf":[{"type":"string","enum":["neuromuscular","anaerobic","vo2max","threshold","tempo","aerobic","recovery","lactate clearance","durability","activation","test","race","heat"]},{"type":"null"}],"examples":["threshold"]},"rpe":{"anyOf":[{"type":"integer","minimum":1,"maximum":10,"description":"1 (very easy) to 10 (max effort)","examples":[7]},{"type":"null"}]},"structure":{"anyOf":[{"$ref":"#/components/schemas/StructureCollectionInput"},{"type":"null"}],"description":"Send `null` to remove the steps."},"duration":{"anyOf":[{"type":"integer","minimum":1,"maximum":2147483647},{"type":"null"}],"description":"In seconds. With a structure, Vekta computes it from the steps when it can. See [Workout structure](https://docs.joinvekta.com/structure).","examples":[4500]},"distance":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000000},{"type":"null"}],"description":"In meters. Only for sports with a distance. With a structure, Vekta computes it from the steps when it can. See [Workout structure](https://docs.joinvekta.com/structure).","examples":[40000]}},"required":["title","sport"],"additionalProperties":false},"ActivityComment":{"type":"object","properties":{"id":{"type":"string","examples":["act_01JK4W2N9XQ3F5H7B8C6D2E9GV"]},"content":{"type":"string","examples":["Great pacing on the last climb!"]},"fromVekta":{"type":"boolean","description":"True for the comment holding Vekta's `summary`, which can't be edited","examples":[false]},"createdAt":{"type":"string","examples":["2026-08-05 09:12:33.481+00"]},"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","examples":["usr_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["Alex"]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["Rivera"]}},"required":["id","firstName","lastName"],"additionalProperties":false},{"type":"null"}],"description":"Who wrote it. Null when Vekta wrote it."}},"required":["id","content","fromVekta","createdAt","user"],"additionalProperties":false},"ActivityCommentPayload":{"type":"object","properties":{"content":{"type":"string","examples":["Great pacing on the last climb!"]}},"required":["content"],"additionalProperties":false},"ActivityBestEfforts":{"type":"object","properties":{"power":{"type":"array","items":{"$ref":"#/components/schemas/PowerBestEffort"},"description":"Only for cycling and running (empty if there's no power)."},"heartRate":{"type":"array","items":{"$ref":"#/components/schemas/HeartRateBestEffort"},"description":"Only for cycling, running and swimming (empty if there's no heart rate)."},"pace":{"type":"array","items":{"$ref":"#/components/schemas/PaceBestEffort"},"description":"Only for running and swimming (empty if there's no distance)."}},"additionalProperties":false,"description":"The activity's best efforts. Each list only appears for the sports it applies to, so other sports get an empty object."},"PaceBestEffort":{"type":"object","properties":{"distance":{"type":"number","description":"In meters","examples":[5000]},"minDuration":{"type":"number","description":"In seconds","examples":[1245]},"startedAtIndex":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Index in the activity streams where the effort starts","examples":[1520]},"endedAtIndex":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Index in the activity streams where the effort ends","examples":[1820]}},"required":["distance","minDuration","startedAtIndex","endedAtIndex"],"additionalProperties":false,"description":"Fastest time over the distance"},"HeartRateBestEffort":{"type":"object","properties":{"duration":{"type":"number","description":"In seconds","examples":[300]},"maxAverageHeartRate":{"type":"number","description":"In bpm","examples":[178]},"startedAtIndex":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Index in the activity streams where the effort starts","examples":[1520]},"endedAtIndex":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Index in the activity streams where the effort ends","examples":[1820]}},"required":["duration","maxAverageHeartRate","startedAtIndex","endedAtIndex"],"additionalProperties":false,"description":"Best average heart rate held for the duration"},"PowerBestEffort":{"type":"object","properties":{"duration":{"type":"number","description":"In seconds","examples":[300]},"maxAveragePower":{"type":"number","description":"In watts","examples":[342]},"afterWorkPerKg":{"type":"number","description":"In kJ/kg, cycling only. The effort only counts what comes after this much work per kilo of body weight. 0 gives the usual best power, and higher values show power when tired.","examples":[0]},"startedAtIndex":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Index in the activity streams where the effort starts","examples":[1520]},"endedAtIndex":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Index in the activity streams where the effort ends","examples":[1820]}},"required":["duration","maxAveragePower","startedAtIndex","endedAtIndex"],"additionalProperties":false,"description":"Best average power held for the duration"},"ActivityStreams":{"type":"object","properties":{"timestamp":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"UTC time of each data point (ISO 8601)","examples":[["2026-08-05T06:30:00.000Z","2026-08-05T06:30:01.000Z"]]},"power":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"distance":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"heartRate":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"cadence":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"temperature":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"altitude":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"speed":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"grade":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"positionLat":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"positionLong":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"leftRightBalance":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"coreTemperature":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"skinTemperature":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"heatStrainIndex":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"breathingRate":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"tidalVolume":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"minuteVentilation":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"torque":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"wPrimeBalance":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"intensity":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"groundContactTime":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"stepLength":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"verticalOscillation":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"fluidLoss":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."},"sodiumLoss":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"description":"One value per data point. Null where the device didn't record one."}},"additionalProperties":false,"description":"The activity's recorded data, as one list per field. All lists have the same length, and the same index is the same moment. A field is missing if the activity didn't record it."},"Activity":{"type":"object","properties":{"id":{"type":"string","examples":["act_01JK4W2N9XQ3F5H7B8C6D2E9GT"]},"groupId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The same for every part of a multisport activity","examples":[null]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["Morning Ride"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":[null]},"sport":{"anyOf":[{"type":"string","enum":["cycling","running","swimming","training","multisport","walking","crossCountrySkiing","alpineSkiing","rowing","hiking","hiit","fitnessEquipment","racket","tennis","golf","standUpPaddleboarding","snowboarding","meditation","kayaking","soccer","rockClimbing","iceSkating","windsurfing","mixedMartialArts","sailing","mountaineering","surfing","boating","basketball","eBiking","hockey","snowshoeing","inlineSkating","kitesurfing","mobility","tactical","hunting","fishing","jumpRope","boxing","floorClimbing","snorkeling","motorcycling","baseball","paddling","canoeing","rafting","rugby","discGolf","wakeboarding","wakesurfing","waterTubing","waterSkiing","waterSport","snowmobiling","dance","flying","americanFootball","diving","cricket","volleyball","wheelchairPushWalk","wheelchairPushRun","paraSport","hangGliding","skyDiving","jumpmaster","horsebackRiding","driving","motorSports","shooting","archery","winterSport","videoGaming","geocaching","lacrosse","poolApnea","teamSport","grinding","transition","generic"]},{"type":"null"}],"examples":["cycling"]},"subSport":{"anyOf":[{"type":"string","enum":["generic","treadmill","street","trail","track","spin","indoorCycling","road","mountain","downhill","recumbent","cyclocross","handCycling","trackCycling","indoorRowing","elliptical","stairClimbing","lapSwimming","openWater","flexibilityTraining","strengthTraining","warmUp","match","exercise","challenge","indoorSkiing","cardioTraining","indoorWalking","eBikeFitness","bmx","casualWalking","speedWalking","bikeToRunTransition","runToBikeTransition","swimToBikeTransition","atv","motocross","backcountry","resort","rcDrone","wingsuit","whitewater","skateSkiing","yoga","pilates","indoorRunning","gravelCycling","eBikeMountain","commuting","mixedSurface","navigate","trackMe","map","singleGasDiving","multiGasDiving","gaugeDiving","apneaDiving","apneaHunting","virtualActivity","obstacle","breathing","ccrDiving","sailRace","expedition","ultra","indoorClimbing","bouldering","hiit","indoorGrinding","huntingWithDogs","amrap","emom","tabata","esport","triathlon","duathlon","brick","swimRun","adventureRace","truckerWorkout","pickleball","padel","indoorWheelchairWalk","indoorWheelchairRun","indoorHandCycling","field","ice","ultimate","platform","squash","badminton","racquetball","tableTennis","overland","trollingMotor","flyCanopy","flyParaglide","flyParamotor","flyPressurized","flyNavigate","flyTimer","flyAltimeter","flyWx","flyVfr","flyIfr","dynamicApnea","enduro","rucking","rally","poolTriathlon","eBikeEnduro","timeTrial"]},{"type":"null"}],"examples":["road"]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["2026-08-05 06:30:00+00"]},"utcOffset":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In minutes from UTC","examples":[120]},"startedAtLocal":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["2026-08-05 08:30:00+00"]},"movingDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In seconds","examples":[7020]},"effectiveDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In seconds, elapsed minus pauses","examples":[7200]},"totalDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In seconds","examples":[7500]},"trainingStimulus":{"anyOf":[{"type":"string","enum":["neuromuscular","anaerobic","vo2max","threshold","tempo","aerobic","recovery","lactate clearance","durability","activation","test","race","heat"]},{"type":"null"}],"description":"Main training effect, as classified by Vekta","examples":["tempo"]},"raceType":{"anyOf":[{"type":"string","enum":["flat","hilly","mountain","time trial","team time trial"]},{"type":"null"}],"examples":[null]},"distance":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In meters","examples":[62000]},"elevationLoss":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In meters","examples":[540]},"elevationGain":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In meters","examples":[550]},"minElevation":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In meters","examples":[210]},"averageElevation":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In meters","examples":[340]},"maxElevation":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In meters","examples":[610]},"startLatitude":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In degrees (float)","examples":[45.764]},"startLongitude":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In degrees (float)","examples":[4.8357]},"averageSpeed":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In m/s (float)","examples":[8.6]},"maxSpeed":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In m/s (float)","examples":[18.2]},"averageCadence":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[88]},"maxCadence":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[112]},"averageRunningCadence":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In strides/min","examples":[null]},"maxRunningCadence":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In strides/min","examples":[null]},"minTemperature":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[14]},"averageTemperature":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[19]},"maxTemperature":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[24]},"averageHeartRate":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[142]},"maxHeartRate":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[178]},"averagePower":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In watts","examples":[205]},"adjustedPower":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In watts","examples":[220]},"maxPower":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In watts","examples":[850]},"work":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In kJ","examples":[1480]},"volume":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Vekta training load score","examples":[43]},"intensity":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Vekta intensity score, from 0 to 100","examples":[55]},"calories":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In kcal","examples":[1450]},"rpe":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"1 (very easy) to 10 (max effort)","examples":[7]},"feeling":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"1 (very weak) to 5 (very strong)","examples":[4]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Generated by Vekta from the detected `laps`","examples":["Set 1: 3 x 12m Threshold efforts: 268 W - 90 rpm - 176 bpm max\n- 12m - 265 W - 168 bpm - 91 rpm\n- 12m - 268 W - 170 bpm - 90 rpm\n- 12m - 271 W - 172 bpm - 89 rpm"]},"laps":{"type":"array","items":{"$ref":"#/components/schemas/Lap"},"description":"Detected by Vekta's AI. Only for cycling, empty otherwise."},"climbs":{"type":"array","items":{"$ref":"#/components/schemas/Climb"},"description":"Detected by Vekta's algorithm. Only for cycling, empty otherwise."},"lengths":{"type":"array","items":{"$ref":"#/components/schemas/Length"},"description":"Recorded by the device. Only for lap swimming, empty otherwise."},"providerLaps":{"type":"array","items":{"$ref":"#/components/schemas/ProviderLap"},"description":"Recorded by the device."},"comments":{"type":"array","items":{"$ref":"#/components/schemas/ActivityComment"},"description":"Includes Vekta's summary, if there is one"}},"required":["id","groupId","name","description","sport","subSport","startedAt","utcOffset","startedAtLocal","movingDuration","effectiveDuration","totalDuration","trainingStimulus","raceType","distance","elevationLoss","elevationGain","minElevation","averageElevation","maxElevation","startLatitude","startLongitude","averageSpeed","maxSpeed","averageCadence","maxCadence","averageRunningCadence","maxRunningCadence","minTemperature","averageTemperature","maxTemperature","averageHeartRate","maxHeartRate","averagePower","adjustedPower","maxPower","work","volume","intensity","calories","rpe","feeling","summary","laps","climbs","lengths","providerLaps","comments"],"additionalProperties":false},"ProviderLap":{"type":"object","properties":{"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["2026-08-05 06:30:00+00"]},"endedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["2026-08-05 07:00:00+00"]},"intensity":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"As set by the device","examples":["active"]},"lapTrigger":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What ended the lap (manual, distance, time...)","examples":["manual"]}},"required":["startedAt","endedAt","intensity","lapTrigger"],"additionalProperties":false},"Length":{"type":"object","properties":{"startedAtIndex":{"type":"number","description":"Index in the activity streams","examples":[0]},"endedAtIndex":{"type":"number","description":"Index in the activity streams","examples":[45]},"startedAt":{"type":"string","examples":["2026-08-05 07:15:00+00"]},"endedAt":{"type":"string","examples":["2026-08-05 07:15:38+00"]},"duration":{"type":"number","description":"In seconds","examples":[38]},"strokeType":{"anyOf":[{"type":"string","enum":["freestyle","backstroke","breaststroke","butterfly","drill","mixed","im","imByRound","rimo"]},{"type":"null"}],"examples":["freestyle"]},"averageSpeed":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In m/s (float)","examples":[1.32]},"averageHeartRate":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[142]},"maxHeartRate":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[148]},"averageCadence":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In strokes/min","examples":[32]},"strokeCount":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[18]}},"required":["startedAtIndex","endedAtIndex","startedAt","endedAt","duration","strokeType","averageSpeed","averageHeartRate","maxHeartRate","averageCadence","strokeCount"],"additionalProperties":false},"Climb":{"type":"object","properties":{"startedAtIndex":{"type":"number","description":"Index in the activity streams","examples":[600]},"endedAtIndex":{"type":"number","description":"Index in the activity streams","examples":[2400]},"startedAt":{"type":"string","examples":["2026-08-05 06:40:00+00"]},"endedAt":{"type":"string","examples":["2026-08-05 07:10:00+00"]},"duration":{"type":"number","description":"In seconds","examples":[1800]},"distance":{"type":"number","description":"In meters","examples":[11000]},"averageGrade":{"type":"number","description":"In % (float)","examples":[6.2]},"maxGrade":{"type":"number","description":"In % (float)","examples":[11.5]},"averagePower":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In watts","examples":[275]},"maxPower":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In watts","examples":[430]},"averagePowerPerKilo":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In W/kg (float)","examples":[3.8]},"maxPowerPerKilo":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In W/kg (float)","examples":[5.9]},"workBefore":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In kJ, total work done before this climb","examples":[320]},"averageCadence":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[78]},"maxCadence":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[96]},"averageHeartRate":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[172]},"maxHeartRate":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[182]},"averageSpeed":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In m/s (float)","examples":[6.1]},"maxSpeed":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In m/s (float)","examples":[9.8]},"minAltitude":{"type":"number","description":"In meters","examples":[340]},"maxAltitude":{"type":"number","description":"In meters","examples":[590]},"elevationGain":{"type":"number","description":"In meters","examples":[250]},"averageTemperature":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In °C (float)","examples":[17]}},"required":["startedAtIndex","endedAtIndex","startedAt","endedAt","duration","distance","averageGrade","maxGrade","averagePower","maxPower","averagePowerPerKilo","maxPowerPerKilo","workBefore","averageCadence","maxCadence","averageHeartRate","maxHeartRate","averageSpeed","maxSpeed","minAltitude","maxAltitude","elevationGain","averageTemperature"],"additionalProperties":false},"Lap":{"type":"object","properties":{"intensity":{"type":"string","enum":["neuromuscular","anaerobic","vo2max","threshold","aerobic","recovery","tempo"],"examples":["threshold"]},"characteristic":{"anyOf":[{"type":"string","enum":["maximum","torque","cadence","progressive","intra-recovery","dynamic"]},{"type":"null"}],"description":"An extra trait Vekta found in the lap, if any","examples":["progressive"]},"startedAtIndex":{"type":"number","description":"Index in the activity streams","examples":[0]},"endedAtIndex":{"type":"number","description":"Index in the activity streams","examples":[1800]},"startedAt":{"type":"string","examples":["2026-08-05 06:30:00+00"]},"endedAt":{"type":"string","examples":["2026-08-05 07:00:00+00"]},"duration":{"type":"number","description":"In seconds","examples":[1800]},"distance":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In meters","examples":[12500]},"averagePower":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In watts","examples":[268]},"maxPower":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In watts","examples":[412]},"averageCadence":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[90]},"maxCadence":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[110]},"averageHeartRate":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[168]},"maxHeartRate":{"anyOf":[{"type":"number"},{"type":"null"}],"examples":[176]},"averageSpeed":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In m/s (float)","examples":[6.94]},"maxSpeed":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In m/s (float)","examples":[12.5]},"averageAltitude":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In meters","examples":[340]},"elevationGain":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In meters","examples":[85]},"elevationLoss":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In meters","examples":[12]},"averageTorque":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In Nm (float)","examples":[28.5]},"maxTorque":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In Nm (float)","examples":[52.1]},"averageTemperature":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In °C (float)","examples":[19]},"workBefore":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In kJ, total work done before this lap","examples":[0]}},"required":["intensity","characteristic","startedAtIndex","endedAtIndex","startedAt","endedAt","duration","distance","averagePower","maxPower","averageCadence","maxCadence","averageHeartRate","maxHeartRate","averageSpeed","maxSpeed","averageAltitude","elevationGain","elevationLoss","averageTorque","maxTorque","averageTemperature","workBefore"],"additionalProperties":false},"UserProfile":{"type":"object","properties":{"id":{"type":"string","examples":["usr_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["Alex"]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["Rivera"]},"dateOfBirth":{"anyOf":[{"type":"string"},{"type":"null"}],"format":"date","examples":["1990-05-15"]},"gender":{"anyOf":[{"type":"string","enum":["male","female","other"]},{"type":"null"}],"examples":["male"]},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In cm","examples":[180]},"dataOnboardingStatus":{"type":"string","enum":["not started","ongoing","failed","done"],"description":"How far the import of the user's past data has got","examples":["done"]},"userMetricReadiness":{"anyOf":[{"type":"object","properties":{"hasVektaCyclingCriticalPower":{"type":"boolean","examples":[true]},"hasVektaRunningCriticalPower":{"type":"boolean","examples":[true]},"hasVektaRunningCriticalSpeed":{"type":"boolean","examples":[false]}},"required":["hasVektaCyclingCriticalPower","hasVektaRunningCriticalPower","hasVektaRunningCriticalSpeed"],"additionalProperties":false},{"type":"null"}],"description":"Which Vekta performance models the user already has"},"latestMetrics":{"type":"array","items":{"$ref":"#/components/schemas/LatestMetric"},"description":"One per sport and metric type: the most recent value entered by the user, else Vekta's most recent estimate"},"workspaces":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceMembership"},"description":"Only on your own profile"}},"required":["id","firstName","lastName","dateOfBirth","gender","height","dataOnboardingStatus","userMetricReadiness","latestMetrics"],"additionalProperties":false},"WorkspaceMembership":{"type":"object","properties":{"id":{"type":"string","examples":["wke_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"name":{"type":"string","examples":["Endurance Squad"]},"slug":{"type":"string","examples":["endurance-squad"]},"role":{"type":"string","enum":["athlete","coach","admin"],"examples":["coach"]}},"required":["id","name","slug","role"],"additionalProperties":false},"LatestMetric":{"type":"object","properties":{"type":{"type":"string","enum":["weight","critical power","w prime","d prime","max power","vo2max","critical speed","max heart rate","spo2","body fat"],"examples":["weight"]},"value":{"type":"number","description":"In `unit`","examples":[71.5]},"source":{"anyOf":[{"type":"string","enum":["user","vekta"]},{"type":"null"}],"description":"`user`: entered by the user. `vekta`: estimated by Vekta.","examples":["user"]},"sport":{"type":"string","enum":["global","cycling","running","swimming"],"examples":["global"]}},"required":["type","value","source","sport"],"additionalProperties":false},"User":{"type":"object","properties":{"id":{"type":"string","examples":["usr_01JGXW3KQ2B8C4D5E6F7G8H9J0"]},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["Alex"]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["Rivera"]},"dateOfBirth":{"anyOf":[{"type":"string"},{"type":"null"}],"format":"date","examples":["1990-05-15"]},"gender":{"anyOf":[{"type":"string","enum":["male","female","other"]},{"type":"null"}],"examples":["male"]},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"In cm","examples":[180]},"dataOnboardingStatus":{"type":"string","enum":["not started","ongoing","failed","done"],"description":"How far the import of the user's past data has got","examples":["done"]},"userMetricReadiness":{"anyOf":[{"type":"object","properties":{"hasVektaCyclingCriticalPower":{"type":"boolean","examples":[true]},"hasVektaRunningCriticalPower":{"type":"boolean","examples":[true]},"hasVektaRunningCriticalSpeed":{"type":"boolean","examples":[false]}},"required":["hasVektaCyclingCriticalPower","hasVektaRunningCriticalPower","hasVektaRunningCriticalSpeed"],"additionalProperties":false},{"type":"null"}],"description":"Which Vekta performance models the user already has"}},"required":["id","firstName","lastName","dateOfBirth","gender","height","dataOnboardingStatus","userMetricReadiness"],"additionalProperties":false}},"securitySchemes":{"bearer":{"description":"Your Vekta API key, sent as `Authorization: Bearer vk_...`, or an OAuth access token of an app you connected, sent as `Authorization: Bearer <access token>`.","type":"http","scheme":"Bearer"},"oauth2":{"type":"oauth2","description":"OAuth 2.1 access token of an app the user connected, sent as `Authorization: Bearer <access token>`. PKCE (S256) is required.","flows":{"authorizationCode":{"authorizationUrl":"https://auth.joinvekta.com/authorize","tokenUrl":"https://auth.joinvekta.com/token","refreshUrl":"https://auth.joinvekta.com/token","scopes":{"openid":"Know who you are on Vekta","offline_access":"Keep this access when you are not using it, until you disconnect it","activities:read":"Read your activities","metrics:read":"Read your metrics","sleeps:read":"Read your sleeps","training-plan:read":"Read your training plan: planned workouts and events","training-plan:write":"Plan, change and delete workouts and events in your training plan","notes:write":"Write, change and delete your notes"}}}}}},"security":[],"tags":[{"name":"Users","description":"You (`me`) and the athletes you coach."},{"name":"Activities","description":"Activities recorded by you and your athletes: summaries, recorded data and best efforts."},{"name":"Activity comments","description":"Comments on your and your athletes' activities. To read them, see `comments` in `GET /users/{userId}/activities`."},{"name":"Training collections","description":"Your library of workout templates. Prescribe one to put it on an athlete's calendar."},{"name":"Training prescriptions","description":"Workouts planned for you and your athletes."},{"name":"Notes","description":"Notes on your and your athletes' calendars, written by the athlete or their coaches."},{"name":"Events","description":"Events and races planned for you and your athletes."},{"name":"Metrics","description":"Your and your athletes' body and performance metrics."},{"name":"Sleeps","description":"Sleep recorded by your and your athletes' connected devices."},{"name":"Wellness","description":"Daily wellness check-ins (soreness, stress, sleep, fatigue) from you and your athletes."},{"name":"Workspaces","description":"Manage the workspaces where you're an admin or coach."}],"servers":[{"url":"https://api.joinvekta.com"}]}