---
title: "Races and goals, nearest upcoming first"
method: GET
path: "/events"
tags: ["Events"]
---

# Races and goals, nearest upcoming first

`GET /events`

## Request

- Base URL: `https://bodylab.lol/api/v1`
- URL: `https://bodylab.lol/api/v1/events`
- Auth: HTTP bearer

## Query parameters

- `includePast` boolean

## Headers

- `X-Client-Platform` string
- `X-Client-Version` string

## Response `200`

OK

- object
  - `events` object[], required
    - `id` string, required: Opaque identifier.
    - `name` string, required
    - `eventDate` string, date, required: A day on the athlete's own calendar: YYYY-MM-DD, no time zone.
    - `sport` string, required: Sport, from the engine's vocabulary (packages/engine/src/sports.ts), e.g. road_biking, running, hiking, strength_training. Known values: road_biking, running, hiking, strength_training, other. Treat unknown values as "other".
    - `priority` string, required: What Body Lab does with the event. A: the plan is built around it — preparation phases in the run-up, volume tapering into it, and a protected recovery window after. B and C move no volume, and the two behave identically. Any event, at any priority, makes its own date an event day, when nothing is prescribed, and an upcoming one tilts which sport a nearby day picks. Known values: A, B, C. Treat unknown values as "other".
    - `distanceM` number, nullable, required
    - `durationS` number, nullable, required
    - `notes` string, required
    - `daysUntil` integer, required: Negative once the event has passed. Computed server-side from the athlete's own time zone, never the server's.
    - `scheduledBy` string, nullable, required: The connected app that put this on the calendar, as its OAuth client id — the `clientId` that `GET /schedule/apps` names and `POST /schedule/apps/withdraw` takes. Null when the athlete entered it themselves, in any of their own apps.
    - `createdAt` string, date-time, required: An instant: ISO-8601 with offset, e.g. 2026-09-13T06:30:00Z.
    - `updatedAt` string, date-time, required: An instant: ISO-8601 with offset, e.g. 2026-09-13T06:30:00Z.

## Other responses

- `401`: Error: UNAUTHORIZED.

---

[API](https://skmtc.dev/bodylab/apis/body-lab-api.md) · [All operations](https://skmtc.dev/bodylab/apis/body-lab-api/llms.txt) · [OpenAPI document](https://skmtc.dev/bodylab/apis/body-lab-api/revisions/544c201eaf88?raw)
