---
title: "Move multiple items to Trash"
method: POST
path: "/workspaces/{workspace_id}/projects/{project_id}/trash"
tags: ["Trash"]
---

# Move multiple items to Trash

`POST /workspaces/{workspace_id}/projects/{project_id}/trash`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/workspaces/{workspace_id}/projects/{project_id}/trash`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

Accepts a mixed list of {type, id} items (datasets + dataviews) and processes them serially in a single async task. Datasets are trashed first so their cascade handles child views; dataviews whose dataset was already trashed in the same batch are marked succeeded without re-running. Resolved future shape: {succeeded: [...], failed: [...]} per item.

## Path parameters

- `workspace_id` integer, required: Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace.
- `project_id` integer, required

## Request body

- TrashBulkRequest
  - `items` TrashBulkItem[], required
    - `type` 'dataview' | 'dataset' | 'dashboard' | 'automation', required
    - `id` integer, required

## Response `202`

Trash/restore accepted; returns the tracking job.

- JobResponse
  - `job` JobSchema, required
    - `id` integer, required
    - `status` 'success' | 'failure' | 'processing' | 'error', required: Job status can be success, failure or processing
    - `response` object, required: Result of async task is stored in response
    - `last_updated_at` string, date-time, required: Job last updated at is the time when Job status was last updated
    - `created_at` string, date-time, required: Create at is time when async task was created
    - `path` string, required: API request path of the Job operation
    - `operation` string, required: Operation is async task name which Job is tracking

## Other responses

- `400`: Bad request syntax or unsupported method

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/5dfd1c296ded?raw)
