# List journeys

`GET /v1/journeys`

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

Returns journeys in this organization. Pass `status` to list only journeys in that state. 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.

## Query parameters

- `limit` (integer, optional, min > 0, max 100, default `20`)
- `cursor` (string, optional, 1–2048 characters)
- `q` (string, optional, 1–200 characters)
- `status` (string, optional, one of `draft`, `active`, `paused`, `ended`) — Only journeys in this status.

## Returns

Returns `200 OK` with a list of `JourneyListItem` 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, uuid)
- `name` (string, required)
- `triggerEvent` (string, required) — The event that starts a run.
- `dateTrigger` (object | null, required) — The contact date that starts runs, for a date journey; otherwise `null`.
  - `field` (string, required) — The contact date field the journey runs from.
  - `recurrence` (string, required, one of `once`, `annual`) — `once` runs on the date a single time; `annual` repeats every year.
  - `offsetDays` (integer, required, min -365, max 365, default `0`) — Days from the date to start: negative before it, positive after. Defaults to 0.
  - `time` (string, required) — Time of day to start, as `HH:MM` in the contact's timezone, else the workspace's.
  - `leapDay` (string, required, one of `feb28`, `mar1`, `skip`, default `"feb28"`) — For an annual 29 February date in a common year: run on 28 Feb, on 1 Mar, or skip.
- `enrolledCount` (integer, required, min 0, max 9007199254740991) — Runs ever started.
- `status` (string, required, one of `draft`, `active`, `paused`, `ended`) — `ended`: nobody enters and runs in progress were exited; it cannot restart.
- `createdAt` (string, required, date-time)
- `updatedAt` (string, required, date-time)
- `activeCount` (integer, required, min 0, max 9007199254740991) — Runs in progress now.

## Example

```bash
curl https://api.kirora.io/v1/journeys \
  -H "Authorization: Bearer $KIRORA_API_KEY"
```

Response `200`:

```json
{
  "data": [
    {
      "id": "018f2a4e-6b1c-7d3e-9f40-37386ae05a6b",
      "name": "Weekend specials",
      "triggerEvent": "triggerEvent_example",
      "dateTrigger": {
        "field": "field_example",
        "recurrence": "once",
        "offsetDays": 0,
        "time": "time_example",
        "leapDay": "feb28"
      },
      "enrolledCount": 0,
      "status": "draft",
      "createdAt": "2030-03-14T09:30:00Z",
      "updatedAt": "2030-03-14T09:30:00Z",
      "activeCount": 0
    }
  ],
  "meta": {
    "pagination": {
      "limit": 1,
      "nextCursor": "nextCursor_example"
    }
  }
}
```
