> For the complete documentation index, see [llms.txt](https://api-docs.everreal.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-docs.everreal.co/endpoints/tasks/tasks-query.md).

# Tasks Query

{% hint style="info" %}
Queries are responsible to pull data from GraphQL. For more information please read the GraphQL documentation.
{% endhint %}

Below you can view a sample of the task query. The query accepts an input that can filter the list. The list returns the tasks ordered by `createdAt` descending.

### Filter options

* assigneeEmail - filter by assignee email
* reporterEmail - filter by reporter email
* status - filter by task status. See possible options in types below.
* type - filter by task type. See possible options in types below.
* taskId - pass an id of a task to return a single task
* companyId - pass a companyId to filter by. Only usable if a customer has multiple subsidiaries.

{% tabs %}
{% tab title="GraphQL" %}

```graphql
query tasks(
    $assigneeEmail: String
    $reporterEmail: String
    $status: TASK_STATUSES
    $type: TASK_TYPES
    $taskId: String
    $companyId: String
  ) {
    tasks(
      input: {
        paging: { take: 20, skip: 0 }
        filter: {
          assigneeEmail: $assigneeEmail
          reporterEmail: $reporterEmail
          status: $status
          type: $type
          taskId: $taskId
          companyId: $companyId
        }
      }
    ) {
      id
      title
      description
      status
      createdAt
      links {
        label 
        listingId
        contactId
        unitId
        propertyId
      }
      assignee {
        id
        email
        firstName
        lastName
      }
      reporter {
        id
        email
        firstName
        lastName
      }
      comments {
        id
        comment
        createdAt
        user {
          id
          email
          firstName
          lastName
        }
      }
    }
  }

```

{% endtab %}
{% endtabs %}

#### Sample types

<pre class="language-graphql"><code class="lang-graphql"><strong>
</strong>enum TASK_TYPES {
  GENERIC
  EXPOSE_REVIEW
  APPLICANT_REVIEW
}

enum TASK_STATUSES {
  TODO
  IN_PROGRESS
  DONE
}

type Task {
  id: String
  title: String
  description: String
  type: String
  status: String
  numberOfComments: Int
  dueDate: DateTime
  lastSeenAt: DateTime
  archivedAt: DateTime
  createdAt: DateTime
  updatedAt: DateTime
  comments: [TaskComment]
  assignee: User
  reporter: User
}

type TaskComment {
  id: String
  user: User
  comment: String
  createdAt: DateTime
}

</code></pre>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://api-docs.everreal.co/endpoints/tasks/tasks-query.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
