---
title: "Get Habit Programmes"
method: GET
path: "/api/v1/agents/habit/programmes"
tags: ["experiments"]
---

# Get Habit Programmes

`GET /api/v1/agents/habit/programmes`

Did the rebuild sprint bring anybody back? Enrolments and outcomes by week.

Grouped on the week somebody was ENROLLED, not the week they exited, because the
question is what happened to a cohort we admitted rather than what closed recently.
Grouping on the exit date spreads one week's intake across three and makes a rate that
cannot be reconciled with the enrolment count beside it.

**An unfinished week reports ``None``, never a rate.** A sprint runs up to
``habit_max_days``, so a week's cohort has no answer until that many days after the
week ends. Emitting a number early counts people who have not had the chance to come
back yet as though they chose not to, which puts a fresh cliff on the right edge of the
chart every single day. This is the same rule the retention cohorts use, and it is the
most likely way for a readout like this to mislead the person reading it.

``returned`` counts every outcome that means the person came back: they graduated, they
are on the watchlist now, they held the habit, or they relapsed later (which required
coming back first). ``unanswered`` is abandonment and running out of runway. A sprint
still running is neither.

## Query parameters

- `weeks` integer

## Headers

- `authorization` string, nullable — Bearer <token>

## Response `200`

Successful Response

- EnvelopeDict
  - `data` object, required
  - `meta` Meta
    - `request_id` string
    - `timestamp` string, date-time
    - `total` integer, nullable
    - `truncated` boolean, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/minro/apis/minro-cs-platform.md) · [All operations](https://skmtc.dev/minro/apis/minro-cs-platform/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/minro/minro-cs-platform/revisions/eb854265cf29/schema)
