---
title: "Get Tasks"
method: GET
path: "/crm/tasks"
tags: ["CRM Service Calls"]
---

# Get Tasks

`GET /crm/tasks`

Retrieve tasks with optional filtering, sorting, and pagination.

Tasks represent actionable work items linked to CRM entities (leads, contacts, accounts,
opportunities, etc.). Without filters, returns the most recent tasks sorted newest first.

**Query Parameters:**

- **match_filter_dict** *(optional)*: JSON-encoded MongoDB query. Filterable fields include:
  `status`, `priority`, `action`, `subject_type`, `subject`, `userid`, `is_completed`,
  `due_date`, `tags`.
  Examples:
    - `{"status": "assigned"}` — tasks in "assigned" status
    - `{"priority": 1}` — highest priority tasks
    - `{"action": "call"}` — call tasks only
    - `{"subject_type": "lead", "subject": "64a856b9..."}` — tasks linked to a specific lead
  **Note:** Use exact database field names only. Do not use pseudo-fields like `created_at`.
- **sort_dict** *(default: {"_id": -1})*: JSON-encoded sort criteria.
  Example: `{"due_date": 1}` — sort by due date ascending.
- **page_size** *(default: 20)*: Number of records per page.
- **page_num** *(default: 1)*: Page number (1-indexed).

**Response:** Paginated object with `tasks` array, `page_size`, and `page_num`.

## Query parameters

- `match_filter_dict` string
- `sort_dict` string
- `page_size` integer
- `page_num` integer

## Response `200`

Successful Response

- TaskListResponse — Paginated list of tasks.
  - `tasks` TaskResponse[], required
    - `id` string, required
    - `name` string, required
    - `description` string, nullable
    - `status` string, nullable
    - `priority` integer, nullable
    - `due_date` string, nullable
    - `is_completed` boolean, nullable
    - `completed_date` string, nullable
    - `subject_type` string, nullable
    - `subject` string, nullable
    - `userid` string, nullable
    - `created_by_userid` string, nullable
    - `action` string, nullable
    - `action_data` object, nullable
    - `tags` string[], nullable
    - `created_date` string, nullable
    - `updated_date` string, nullable
  - `page_size` integer, required
  - `page_num` integer, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/ambivo/apis/ambivo-api.md) · [All operations](https://skmtc.net/ambivo/apis/ambivo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ambivo/ambivo-api/versions/165a6d16a9a0/schema)
