---
updatedAt: 2026-01-28T15:08:27.000Z
---

Fetch the complete documentation index at: https://developer.connecteam.com/llms.txt. Use this file to discover all available pages before exploring further.

# Sub-Tasks

Manage sub-tasks within a parent task. Sub-tasks help break down work into smaller, trackable items.

## Endpoints

| Method | Endpoint                                                                | Description     |
| :----- | :---------------------------------------------------------------------- | :-------------- |
| GET    | /tasks/v1/taskboards/{taskBoardId}/tasks/{taskId}/sub-tasks             | Get sub-tasks   |
| POST   | /tasks/v1/taskboards/{taskBoardId}/tasks/{taskId}/sub-tasks             | Create sub-task |
| PUT    | /tasks/v1/taskboards/{taskBoardId}/tasks/{taskId}/sub-tasks/{subTaskId} | Update sub-task |
| DELETE | /tasks/v1/taskboards/{taskBoardId}/tasks/{taskId}/sub-tasks/{subTaskId} | Delete sub-task |

***

## Get Sub-Tasks

Retrieve sub-tasks for a parent task.

### Query Parameters

| Parameter  | Type    | Required | Default | Description                     |
| :--------- | :------ | :------- | :------ | :------------------------------ |
| subtaskIds | array   | No       | -       | Filter by specific sub-task IDs |
| limit      | integer | No       | 10      | Results per page (1-100)        |
| offset     | integer | No       | 0       | Pagination offset               |

### Example Request

```bash
curl --request GET \
  --url 'https://api.connecteam.com/tasks/v1/taskboards/12345/tasks/task-abc123/sub-tasks' \
  --header 'X-API-KEY: YOUR_API_KEY'
```

### Response

```json
{
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "data": {
    "subTasks": [
      {
        "id": "subtask-001",
        "title": "Check fire extinguishers",
        "isCompleted": true
      },
      {
        "id": "subtask-002",
        "title": "Inspect emergency exits",
        "isCompleted": false
      }
    ]
  },
  "paging": {
    "offset": 2
  }
}
```

***

## Create Sub-Task

Add a new sub-task to an existing task.

### Request Body

| Field       | Type    | Required | Description                        |
| :---------- | :------ | :------- | :--------------------------------- |
| title       | string  | Yes      | Sub-task title                     |
| isCompleted | boolean | No       | Completion status (default: false) |

### Example

```bash
curl --request POST \
  --url https://api.connecteam.com/tasks/v1/taskboards/12345/tasks/task-abc123/sub-tasks \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --data '{
    "title": "Test smoke detectors",
    "isCompleted": false
  }'
```

### Response

```json
{
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "data": {
    "id": "subtask-003",
    "title": "Test smoke detectors",
    "isCompleted": false
  }
}
```

***

## Update Sub-Task

Modify a sub-task's title or completion status.

### Request Body

| Field       | Type    | Required | Description           |
| :---------- | :------ | :------- | :-------------------- |
| title       | string  | No       | New title             |
| isCompleted | boolean | No       | New completion status |

### Example: Mark as Complete

```bash
curl --request PUT \
  --url https://api.connecteam.com/tasks/v1/taskboards/12345/tasks/task-abc123/sub-tasks/subtask-002 \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --data '{
    "isCompleted": true
  }'
```

### Example: Update Title

```bash
curl --request PUT \
  --url https://api.connecteam.com/tasks/v1/taskboards/12345/tasks/task-abc123/sub-tasks/subtask-002 \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --data '{
    "title": "Inspect all emergency exits and document findings"
  }'
```

### Response

```json
{
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "data": {
    "id": "subtask-002",
    "title": "Inspect all emergency exits and document findings",
    "isCompleted": true
  }
}
```

***

## Delete Sub-Task

Remove a sub-task from a task.

### Example

```bash
curl --request DELETE \
  --url https://api.connecteam.com/tasks/v1/taskboards/12345/tasks/task-abc123/sub-tasks/subtask-003 \
  --header 'X-API-KEY: YOUR_API_KEY'
```

### Response

```json
{
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "data": {}
}
```

***

## Integration Example

```javascript
class SubTaskManager {
  constructor(apiKey, taskBoardId, taskId) {
    this.apiKey = apiKey;
    this.baseUrl = `https://api.connecteam.com/tasks/v1/taskboards/${taskBoardId}/tasks/${taskId}/sub-tasks`;
  }

  async getAll() {
    const response = await fetch(this.baseUrl, {
      headers: { 'X-API-KEY': this.apiKey }
    });
    return response.json();
  }

  async create(title, isCompleted = false) {
    const response = await fetch(this.baseUrl, {
      method: 'POST',
      headers: {
        'X-API-KEY': this.apiKey,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({ title, isCompleted })
    });
    return response.json();
  }

  async complete(subTaskId) {
    const response = await fetch(`${this.baseUrl}/${subTaskId}`, {
      method: 'PUT',
      headers: {
        'X-API-KEY': this.apiKey,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({ isCompleted: true })
    });
    return response.json();
  }

  async completeAll() {
    const { data } = await this.getAll();
    for (const subTask of data.subTasks) {
      if (!subTask.isCompleted) {
        await this.complete(subTask.id);
      }
    }
  }
}

// Usage
const subTasks = new SubTaskManager('YOUR_API_KEY', 12345, 'task-abc123');

// Add new sub-tasks
await subTasks.create('Review documentation');
await subTasks.create('Update test cases');

// Complete a specific sub-task
await subTasks.complete('subtask-001');

// Complete all sub-tasks
await subTasks.completeAll();
```

***

[API Reference](https://developer.connecteam.com/reference/)