---
title: "GET /api/v1/habits"
method: GET
path: "/api/v1/habits"
tags: ["PublicHabits"]
---

# GET /api/v1/habits

`GET /api/v1/habits`

## Request

- Base URL: `https://api.habitpocket.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.habitpocket.io/api/v1/habits`
- Auth: API key in header `X-API-KEY`

## Response `200`

OK

- PublicHabitModel[]
  - `id` string, uuid
  - `name` string, nullable
  - `description` string, nullable
  - `type` string, nullable
  - `color` string, nullable
  - `unit` string, nullable
  - `target` number, double, nullable
  - `timeTarget` string, nullable
  - `goalOperator` string, nullable
  - `isMultiSelect` boolean
  - `options` PublicSelectOptionModel[], nullable
    - `id` string, uuid
    - `label` string, nullable
    - `color` string, nullable
  - `excludedDays` integer[], nullable
  - `conditionalStylingEnabled` boolean
  - `conditionalStylingBands` PublicColorBand[], nullable
    - `color` string, nullable
    - `upTo` string, nullable
  - `avoidSince` string, date, nullable
  - `currentStreak` integer
  - `bestStreak` integer
  - `section` PublicSectionModel
    - `id` string, uuid
    - `name` string, nullable
  - `createdAt` string, date-time

## Other responses

- `401`: Unauthorized
- `402`: Payment Required

---

[API](https://skmtc.dev/habitpocket/apis/metricspocket-public-api.md) - [All operations](https://skmtc.dev/habitpocket/apis/metricspocket-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/habitpocket/apis/metricspocket-public-api/revisions/28a2063c7bbe?raw)
