> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openbunny.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Tasks

> Service API endpoints for task management.

Base URL: `http://localhost:3100`

## List tasks

<ParamField query="status" type="string">
  Filter by status: `backlog`, `todo`, `in_progress`, `in_review`, `done`
</ParamField>

<ParamField query="priority" type="string">
  Filter by priority: `low`, `medium`, `high`
</ParamField>

```bash theme={null}
GET /tasks
```

```bash Example theme={null}
curl http://localhost:3100/tasks?status=todo
```

## Create a task

```bash theme={null}
POST /tasks
```

<ParamField body="title" type="string" required>
  Task title
</ParamField>

<ParamField body="description" type="string">
  Task description (markdown)
</ParamField>

<ParamField body="status" type="string" default="backlog">
  Initial status
</ParamField>

<ParamField body="priority" type="string" default="medium">
  Priority level
</ParamField>

<ParamField body="labels" type="string[]">
  Array of label strings
</ParamField>

<ParamField body="requesters" type="string[]">
  Array of requester identifiers
</ParamField>

<ParamField body="dedupe_key" type="string">
  Deduplication key in `area::intent::object` format
</ParamField>

```bash Example theme={null}
curl -X POST http://localhost:3100/tasks \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Fix login timeout",
    "description": "Users report 30s timeout on login page",
    "priority": "high",
    "labels": ["bug", "auth"]
  }'
```

## Get a task

```bash theme={null}
GET /tasks/:id
```

```bash Example theme={null}
curl http://localhost:3100/tasks/42
```

## Update a task

```bash theme={null}
PATCH /tasks/:id
```

All body fields are optional. Only provided fields are updated.

```bash Example theme={null}
curl -X PATCH http://localhost:3100/tasks/42 \
  -H "Content-Type: application/json" \
  -d '{"status": "in_progress", "priority": "high"}'
```

## Delete a task

```bash theme={null}
DELETE /tasks/:id
```

```bash Example theme={null}
curl -X DELETE http://localhost:3100/tasks/42
```

## List task comments

```bash theme={null}
GET /tasks/:id/comments
```

Returns all comments for a task in chronological order.

## Add a task comment

```bash theme={null}
POST /tasks/:id/comments
```

<ParamField body="body" type="string" required>
  Comment text
</ParamField>

```bash Example theme={null}
curl -X POST http://localhost:3100/tasks/42/comments \
  -H "Content-Type: application/json" \
  -d '{"body": "Investigated — root cause is connection pooling"}'
```
