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

# List tasks

> List tasks across all farms owned by the authenticated user.

```
GET https://www.wiseyield.co/api/v1/tasks
```

### Authentication

Requires a key with the `tasks:read` scope. See [Authentication](/authentication).

### Query parameters

<ParamField query="page" type="integer" default="1">Page number (≥ 1).</ParamField>
<ParamField query="limit" type="integer" default="20">Results per page (1–100; values above 100 clamped to 100).</ParamField>
<ParamField query="status" type="string">Filter by status: `pending`, `in_progress`, `completed`, `overdue`, `cancelled`.</ParamField>
<ParamField query="farmId" type="string">Filter to tasks on a specific farm (UUID).</ParamField>
<ParamField query="sort" type="string" default="createdAt">Sort field: `createdAt`, `dueDate`, `priority`, `title`.</ParamField>
<ParamField query="order" type="string" default="desc">`asc` or `desc`.</ParamField>

### Response

<ResponseField name="data" type="array">
  Array of task objects.

  <Expandable title="Task">
    <ResponseField name="id" type="string">UUID.</ResponseField>
    <ResponseField name="farmId" type="string">Parent farm UUID.</ResponseField>
    <ResponseField name="title" type="string">Task title.</ResponseField>
    <ResponseField name="description" type="string | null">Free text.</ResponseField>
    <ResponseField name="status" type="string">One of `pending`, `in_progress`, `completed`, `overdue`, `cancelled`.</ResponseField>
    <ResponseField name="priority" type="string">One of `low`, `medium`, `high`, `urgent`.</ResponseField>
    <ResponseField name="category" type="string">One of `planting`, `irrigation`, `fertilization`, `pest_control`, `harvesting`, `soil_management`, `maintenance`, `planning`, `inspection`, `other`.</ResponseField>
    <ResponseField name="dueDate" type="string | null">ISO 8601.</ResponseField>
    <ResponseField name="startDate" type="string | null">ISO 8601.</ResponseField>
    <ResponseField name="completedDate" type="string | null">ISO 8601. Auto-set when transitioning to `completed`.</ResponseField>
    <ResponseField name="assignedTo" type="string | null">Free-text assignee.</ResponseField>
    <ResponseField name="createdBy" type="string">Creator user ID.</ResponseField>
    <ResponseField name="cropId" type="string | null">Linked crop (Blueprint §9.5).</ResponseField>
    <ResponseField name="fieldId" type="string | null">Linked field.</ResponseField>
    <ResponseField name="blockId" type="string | null">Linked block.</ResponseField>
    <ResponseField name="sopTemplateId" type="string | null">SOP template (Blueprint §9.5) — read-only via v1.</ResponseField>
    <ResponseField name="notes" type="string | null">Free text.</ResponseField>
    <ResponseField name="createdAt" type="string">ISO 8601.</ResponseField>
    <ResponseField name="updatedAt" type="string">ISO 8601.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="pagination" type="object">
  Offset pagination envelope (`page`, `limit`, `total`, `totalPages`). See [Pagination](/guides/pagination).
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl 'https://www.wiseyield.co/api/v1/tasks?status=pending&limit=50' \
    -H "Authorization: Bearer $WISEYIELD_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const res = await fetch(
    'https://www.wiseyield.co/api/v1/tasks?status=pending&limit=50',
    { headers: { Authorization: `Bearer ${process.env.WISEYIELD_API_KEY}` } }
  );
  const { data, pagination } = await res.json();
  ```
</RequestExample>

## Errors

| Status                    | When                                            |
| ------------------------- | ----------------------------------------------- |
| `401`                     | Missing, malformed, expired, or revoked API key |
| `403 INSUFFICIENT_SCOPE`  | Key lacks `tasks:read` scope                    |
| `429 RATE_LIMIT_EXCEEDED` | Per-user rate limit reached                     |
| `5xx`                     | Server error                                    |
