# Whatsonzwift — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Browse Zwift's complete workout library, view training plan schedules, and access detailed workout specifications including intervals, durations, TSS values, and intensity zones. Find group workouts and explore available training plans.

**Category:** Sports | **Website:** [whatsonzwift.com/](https://whatsonzwift.com/) | **Docs:** [parse.bot/marketplace/f63c8119-1263-4219-b942-6a0e694da30a/whatsonzwift-com-api](https://parse.bot/marketplace/f63c8119-1263-4219-b942-6a0e694da30a/whatsonzwift-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/whatsonzwift/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get all collections

List all workout collections, training plans, and legacy collections available on Zwift. Returns an array of collection objects classified by type (collection, plan, or legacy_collection). Each entry includes a slug usable as input to get_collection_details.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/whatsonzwift/get-all-collections \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get collection details

Get all workouts within a collection or training plan. For structured plans, includes week grouping. Returns the collection title, description, and a list of workouts with their metadata (name, slug, duration, TSS, week). Each workout slug can be passed to get_workout_details for full interval breakdowns.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Collection or plan slug from get_all_collections results (e.g. 'build-me-up', 'endurance'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/whatsonzwift/get-collection-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### Get group workouts

List all currently scheduled group workout events on Zwift. Returns events happening today and in the near future, including event details, start times, routes, and group categories. Events are deduplicated by event ID and start time.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/whatsonzwift/get-group-workouts \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get workout details

Get full details for a specific workout including description, interval steps, intensity zones, duration, and TSS. Steps describe each interval segment with duration, cadence, and power targets. Zones show time distribution across Z1-Z6 power zones.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `collection_slug` | string | Yes | Parent collection or plan slug (e.g. 'build-me-up'). Available from get_all_collections or get_collection_details. |
| `workout_slug` | string | Yes | Workout slug (e.g. 'week-1-devedeset'). Available from get_collection_details results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/whatsonzwift/get-workout-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"collection_slug":"<string>","workout_slug":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.