---
title: "Batch Delete Tasks"
method: POST
path: "/boards/tasks/batch-delete"
tags: ["Board Tasks"]
---

# Batch Delete Tasks

`POST /boards/tasks/batch-delete`

Batch delete tasks from a Board. This is a synchronous operation. You can either delete specific tasks by ID list or delete all tasks matching filter criteria.

## Headers

- `Topview-Uid` string, required
- `Authorization` string, required

## Request body

- object
  - `boardId` string, required — Board ID (required)
  - `selectAll` boolean — Whether to delete all matching tasks (true) or specific tasks (false, default). When true, filter must be provided and taskIds is ignored.
  - `taskIds` string[], nullable — Task ID list to delete. Required when selectAll=false. Ignored when selectAll=true.
  - `excludeTaskIds` string[], nullable — Task IDs to exclude from deletion. Only effective when selectAll=true. For tasks manually deselected by user.
  - `filter` object, nullable — Filter criteria for batch operation. Only effective when selectAll=true.
    - `mediaType` 'all' | 'image' | 'video' | 'audio' — Media type filter
    - `rating` 'all' | '0' | '1' | '2' | '3' | 'unrated' — Rating filter
    - `ratingOperator` '>=' | '>' | '<=' | '<' | '=' — Rating operator for range queries
    - `ratingValue` integer — Rating value for range queries
    - `toolCategory` 'image' | 'video' | 'avatar' | 'voice' | 'music' — Tool category filter
    - `toolType` string — Tool type filter (single value, for backward compatibility)
    - `toolTypes` string[] — Tool type filter (list, OR query)
    - `creatorUids` string[] — Creator UID list (OR query)
    - `groupIds` string[] — Group ID list (OR query)

## Response `200`

Tasks deleted successfully

- object
  - `code` string
  - `message` string
  - `result` object — Operation result containing deleted task count and status information

## Other responses

- `400` — Invalid request parameters
- `401` — Unauthorized
- `403` — Forbidden - insufficient permissions
- `500` — Internal server error

---

[API](https://skmtc.net/topview/apis/image-character-swap-apis-editable-in-readme.md) · [All operations](https://skmtc.net/topview/apis/image-character-swap-apis-editable-in-readme/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/topview/image-character-swap-apis-editable-in-readme/revisions/83cd46ca7859/schema)
