---
title: "POST /recycle-bin/{owner}/action/"
method: POST
path: "/recycle-bin/{owner}/action/"
tags: ["recycle-bin"]
---

# POST /recycle-bin/{owner}/action/

`POST /recycle-bin/{owner}/action/`

Perform actions on soft-deleted packages in the recycle bin. Supported actions: permanently delete (hard delete), restore. Returns a list of successfully actioned packages and any packages that failed with error details.

## Request body

- PackageRecycleBin
  - `action` 'hard_delete' | 'restore', required — The action to perform on soft-deleted packages.
  - `identifiers` string[], required — A list of soft-deleted package identifiers to action.
  - `repository` string — The repository name to filter packages to. If not provided, the action will be performed across all accessible repositories in the workspace.

## Response `200`

OK

- PackageBulkActionResponse
  - `action` string — The action that was performed.
  - `packages_actioned` string[] — List of package identifiers that were successfully actioned.
  - `packages_failed_to_action` object — Dictionary of package identifiers that failed with their error details.

## Other responses

- `400` — Request could not be processed (see detail).
- `422` — Missing or invalid parameters (see detail).

---

[API](https://skmtc.dev/cloudsmith/apis/cloudsmith-api-v1.md) · [All operations](https://skmtc.dev/cloudsmith/apis/cloudsmith-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cloudsmith/cloudsmith-api-v1/revisions/4d7879df9b2f/schema)
