---
title: "Get task by ID"
method: GET
path: "/cohorts/{cohortId}/tasks/{id}"
tags: ["Tasks"]
---

# Get task by ID

`GET /cohorts/{cohortId}/tasks/{id}`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/cohorts/{cohortId}/tasks/{id}`
- Auth: HTTP bearer

Get a single task with full details including subtasks and comments

## Path parameters

- `cohortId` string, uuid, required
- `id` string, uuid, required

## Response `200`

Task retrieved successfully

- object
  - `success` boolean
  - `data` object
    - `id` string, uuid: Unique identifier
    - `task_group_id` string, uuid, nullable: Task group this task belongs to
    - `cohort_id` string, uuid: Cohort this task belongs to
    - `parent_task_id` string, uuid, nullable: Parent task ID for subtasks
    - `session_id` string, uuid, nullable: Session this task is linked to
    - `job_title_id` string, uuid, nullable: Job title for assignment resolution
    - `title` string: Task title
    - `description` string, nullable: Detailed task description
    - `assignee_id` string, uuid, nullable: Assigned user ID
    - `status` 'not_started' | 'in_progress' | 'complete' | 'blocked' | 'cancelled': Task status
    - `priority` 'low' | 'medium' | 'high' | 'urgent': Task priority
    - `phase` 'cohort_setup' | 'cohort_prep' | 'live_delivery' | 'wrap_renewal', nullable: Task phase
    - `due_date` string, date, nullable: Due date (YYYY-MM-DD)
    - `due_time` string, nullable: Due time (HH:MM)
    - `completed_at` string, date-time, nullable
    - `completed_by` string, uuid, nullable
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `assignee_name` string, nullable
    - `assignee_email` string, nullable
    - `job_title_name` string, nullable
    - `session_title` string, nullable
    - `subtask_count` integer
    - `subtasks_completed` integer
    - `comment_count` integer
    - `subtasks` TaskWithDetails[]
      - `id` string, uuid: Unique identifier
      - `task_group_id` string, uuid, nullable: Task group this task belongs to
      - `cohort_id` string, uuid: Cohort this task belongs to
      - `parent_task_id` string, uuid, nullable: Parent task ID for subtasks
      - `session_id` string, uuid, nullable: Session this task is linked to
      - `job_title_id` string, uuid, nullable: Job title for assignment resolution
      - `title` string: Task title
      - `description` string, nullable: Detailed task description
      - `assignee_id` string, uuid, nullable: Assigned user ID
      - `status` 'not_started' | 'in_progress' | 'complete' | 'blocked' | 'cancelled': Task status
      - `priority` 'low' | 'medium' | 'high' | 'urgent': Task priority
      - `phase` 'cohort_setup' | 'cohort_prep' | 'live_delivery' | 'wrap_renewal', nullable: Task phase
      - `due_date` string, date, nullable: Due date (YYYY-MM-DD)
      - `due_time` string, nullable: Due time (HH:MM)
      - `completed_at` string, date-time, nullable
      - `completed_by` string, uuid, nullable
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `assignee_name` string, nullable
      - `assignee_email` string, nullable
      - `job_title_name` string, nullable
      - `session_title` string, nullable
      - `subtask_count` integer
      - `subtasks_completed` integer
      - `comment_count` integer
    - `comments` TaskComment[]
      - `id` string, uuid
      - `task_id` string, uuid
      - `author_id` string, uuid
      - `content` string
      - `author_name` string
      - `author_email` string
      - `author_avatar_url` string, nullable
      - `created_at` string, date-time

## Other responses

- `401`: Unauthorized
- `404`: Task or cohort not found

---

[API](https://skmtc.dev/withmedley/apis/medley-api.md) - [All operations](https://skmtc.dev/withmedley/apis/medley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/withmedley/apis/medley-api/revisions/40aaac5ca6bd?raw)
