---
title: "Search to-do tasks"
method: POST
path: "/mywork/todo"
tags: ["My Work"]
---

# Search to-do tasks

`POST /mywork/todo`

## Request

- Base URL: `https://api.surense.com/api/v1`
- URL: `https://api.surense.com/api/v1/mywork/todo`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://api.surense.com/oauth/token` scopes: `global:user`

Search to-do tasks with filtering and pagination. Task IDs can be found when using `POST /mywork/todo` under the field named 'id'.

## Request body

- SearchTodoRequest: Request to search to-do tasks
  - `page` integer: Page number (0-based)
  - `pageSize` integer: Page size
  - `sortBy` string, required: Sort by field
  - `sortDir` string: Sort direction
  - `remindersFirst` boolean, required: Show reminders first
  - `dueAtStart` string: Due date start (inclusive)
  - `dueAtEnd` string: Due date end (exclusive)

## Response `200`

OK

- PaginatedSearchResponseMyWorkValue
  - `results` MyWorkValue[]
    - `id` integer
    - `itemType` 1 | 2 | 3 | 4
    - `itemId` string, uuid
    - `itemCreatedAt` string, date-time
    - `assigneeId` string, uuid
    - `dueAt` string, date-time
    - `dueAtTimeSet` boolean
    - `done` boolean
    - `doneAt` string, date-time
    - `ownerId` string, uuid
    - `orderValue` number
  - `hasNextPage` boolean
  - `totalElements` integer

---

[API](https://skmtc.dev/surense/apis/mywork-service.md) - [All operations](https://skmtc.dev/surense/apis/mywork-service/llms.txt) - [OpenAPI document](https://skmtc.dev/surense/apis/mywork-service/revisions/56fe2dc6bde0?raw)
