# 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
