---
title: "Add a sub-task"
method: POST
path: "/v1/tasks/{taskId}/subtasks"
tags: ["tasks"]
---

# Add a sub-task

`POST /v1/tasks/{taskId}/subtasks`

## Request

- Base URL: `https://api.flowral.app`
- URL: `https://api.flowral.app/v1/tasks/{taskId}/subtasks`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (client credentials, token URL `https://api.flowral.app/v1/oauth/token`, scopes: `flows:write`)

A breakdown of one task. A task that has sub-tasks completes through them rather than directly.

## Path parameters

- `taskId` string, required

## Request body

- object
  - `name` string, required
  - `assigneeId` string
  - `estimateHours` number

## Response `201`

CREATED

- SubTask
  - `id` string, required
  - `name` string, required
  - `done` boolean, required
  - `assigneeId` string, nullable: Workspace member id.
  - `estimateHours` number, nullable

## Other responses

- `401`: UNAUTHORIZED
- `403`: FORBIDDEN · PLAN_REQUIRED · INSUFFICIENT_SCOPE
- `404`: NOT_FOUND
- `429`: RATE_LIMITED

---

[API](https://skmtc.dev/flowral/apis/flowral-api.md) · [All operations](https://skmtc.dev/flowral/apis/flowral-api/llms.txt) · [OpenAPI document](https://skmtc.dev/flowral/apis/flowral-api/revisions/6cd2337b682c?raw)
