Vekta API
Events

Create an event

Adds an event or race to the user's calendar.

The sub sport must match the sport. Distance, elevation gain, work and carb intake are only accepted for sports that have them.

When 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.

Responds with:

  • 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.
  • 403 subscription_required: the user (or you, for me) doesn't have an active Vekta subscription.
  • 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.
POST
/users/{userId}/events

Authorization

AuthorizationBearer <token>

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>.

In: header

Path Parameters

userId*string

Id of a user you have access to (see GET /users), or me for yourself

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name*string
date*string

Local date (YYYY-MM-DD)

Formatdate
sport*string
Value in"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?string | null
time?string | null
subSport?string | null

Must be a sub sport of sport

Value in"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"
distance?integer | null

In meters. Only for sports with a distance (cycling, running, swimming...)

elevationGain?integer | null

In meters. Only for sports with an elevation gain (cycling, running, hiking...)

duration?integer | null

In seconds

work?integer | null

In kJ. Only for sports with a work estimate (cycling, running, rowing...)

carbIntake?number | null

In g/h. Only for endurance sports

Value in10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 100 | 110 | 120
workspaceId?string

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.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/users/me/events" \  -H "Content-Type: application/json" \  -d '{    "name": "Gran Fondo",    "date": "2026-09-14",    "sport": "cycling"  }'
{  "id": "evt_01JK4W2N9XQ3F5H7B8C6D2E9GT",  "createdBy": "usr_01JGXW3KQ2B8C4D5E6F7G8H9J0",  "workspaceId": "wke_01JGXW3KQ2B8C4D5E6F7G8H9J0",  "name": "Gran Fondo",  "description": null,  "date": "2026-09-14",  "time": "09:30:00",  "sport": "cycling",  "subSport": "road",  "distance": 120000,  "elevationGain": 2400,  "duration": 18000,  "work": 3200,  "carbIntake": 60,  "activityId": null}