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

# Task

> Returns a paginated list of tasks with optional filters.

# List Tasks

Returns a paginated list of tasks with optional filters.

## Request

`GET /v1/tasks`

### Query Parameters

| Parameter  | Type    | Required | Description                                            |
| ---------- | ------- | -------- | ------------------------------------------------------ |
| `page`     | integer | No       | Page number (default: 1)                               |
| `per_page` | integer | No       | Results per page (default: 25)                         |
| `status`   | string  | No       | Filter by status (`pending`, `completed`, `cancelled`) |
| `lead_id`  | uuid    | No       | Filter by lead ID                                      |

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET \
    "https://YOUR_PROJECT.supabase.co/functions/v1/api-gateway/v1/tasks?status=pending" \
    -H "Authorization: Bearer rchd_live_xxxxxxxxxxxx"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://kdjmltmhxvvmiuehafgl.supabase.co/functions/v1/api-gateway/v1/tasks?status=pending",
    {
      headers: {
        "Authorization": "Bearer rchd_live_xxxxxxxxxxxx"
      }
    }
  );
  const { data, meta } = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://kdjmltmhxvvmiuehafgl.supabase.co/functions/v1/api-gateway/v1/tasks",
      headers={"Authorization": "Bearer rchd_live_xxxxxxxxxxxx"},
      params={"status": "pending"}
  )
  result = response.json()
  ```
</CodeGroup>

## Response

```json theme={null}
{
  "data": [
    {
      "id": "task-uuid-1",
      "title": "Follow up with John Doe",
      "status": "pending",
      "priority": "high",
      "due_date": "2026-03-25",
      "lead_id": "a1b2c3d4-...",
      "created_at": "2026-03-21T10:00:00.000Z"
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total": 1
  }
}
```

### Response Fields

| Field        | Type     | Description                                       |
| ------------ | -------- | ------------------------------------------------- |
| `id`         | uuid     | Task unique identifier                            |
| `title`      | string   | Task title                                        |
| `status`     | string   | Task status (`pending`, `completed`, `cancelled`) |
| `priority`   | string   | Priority level (`low`, `medium`, `high`)          |
| `due_date`   | string   | Due date (YYYY-MM-DD)                             |
| `lead_id`    | uuid     | Associated lead ID (if linked)                    |
| `created_at` | datetime | Creation timestamp                                |
