---
title: "Get the linked user habits with a challenge"
method: GET
path: "/api/v5/challenges/{challenge_id}/user-habits"
tags: ["Challenges"]
---

# Get the linked user habits with a challenge

`GET /api/v5/challenges/{challenge_id}/user-habits`

## Request

- Base URL: `https://api.pavlok.com`
- URL: `https://api.pavlok.com/api/v5/challenges/{challenge_id}/user-habits`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/pavlok/apis/pavlok-api-v5/docs/api/v5/challenges/:challenge_id/user-habits/get.ts> (a function with typed inputs; its response is checked against the schema)

Get the linked user habits with a challenge

## Path parameters

- `challenge_id` integer, required

## Response `200`

Successful Response

- ListOfUserHabitsForChallengeInResponse
  - `userHabits` UserHabitWithValidationStatus[], required
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `deletedAt` string, date-time
    - `id` integer
    - `userId` integer, required
    - `habitId` integer, required
    - `price` number
    - `reminderTime` string, time
    - `habitName` string, required
    - `habitType` string, required
    - `habitUnit` string, required
    - `habitIcon` string
    - `habitIndividual` boolean, required
    - `habitInterfaceKey` string
    - `habitContentsCategoryId` integer
    - `goal` HabitWidgetGoal, required
      - `userHabitId` integer
      - `date` string, date
      - `goalValue` integer
      - `currentValue` integer
    - `challengeUserHabitId` integer, required
    - `validationStatus` boolean, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/pavlok/apis/pavlok-api-v5.md) - [All operations](https://skmtc.dev/pavlok/apis/pavlok-api-v5/llms.txt) - [OpenAPI document](https://skmtc.dev/pavlok/apis/pavlok-api-v5/revisions/3d192098b1ac?raw)
