# List journey definition versions

`GET /v1/journeys/{id}/definitions`

Requires an API key with the `journeys:read` scope. [About keys and scopes](/docs/api/authentication)

Journeys are versioned: activating a changed journey creates a new definition while contacts already in flight continue on the one they entered. This lists those versions. Results are cursor-paginated: pass `meta.pagination.nextCursor` back as `cursor` until it comes back `null`. The cursor is opaque — do not construct or parse one.

## Path parameters

- `id` (string, required, uuid)

## Query parameters

- `limit` (integer, optional, min > 0, max 50, default `20`)
- `cursor` (string, optional, 1–2048 characters)

## Returns

Returns `200 OK` with a list of `JourneyDefinition` objects in `data`, and the next page's cursor in `meta` (see [pagination](/docs/api/pagination)). Otherwise returns an error; [Errors](/docs/api/errors) lists every code and which to retry.

- `id` (string, required) — A hash of the steps; pass it as `definitionId` to read that version's stats.
- `stepTypes` (string[], required, at most 50 items) — The type of each step in this version, in order.
- `enrollmentCount` (integer, required, min 0, max 9007199254740991) — Runs that followed this version.
- `firstEnrolledAt` (string, required, date-time) — When the first run following this version entered.
- `lastEnrolledAt` (string, required, date-time) — When the latest run following this version entered.
- `matchesCurrentSteps` (boolean, required) — Whether this version is the journey's current steps.

## Example

```bash
curl https://api.kirora.io/v1/journeys/018f2a4e-6b1c-7d3e-9f40-37386ae05a6b/definitions \
  -H "Authorization: Bearer $KIRORA_API_KEY"
```

Response `200`:

```json
{
  "data": [
    {
      "id": "id_example",
      "stepTypes": [
        "wait"
      ],
      "enrollmentCount": 0,
      "firstEnrolledAt": "2030-03-14T09:30:00Z",
      "lastEnrolledAt": "2030-03-14T09:30:00Z",
      "matchesCurrentSteps": true
    }
  ],
  "meta": {
    "pagination": {
      "limit": 1,
      "nextCursor": "nextCursor_example"
    }
  }
}
```
