---
title: "Archive or unarchive media"
method: POST
path: "/api/v1/workspaces/{workspace_id}/media/archive"
tags: ["📁 Content Library"]
---

# Archive or unarchive media

`POST /api/v1/workspaces/{workspace_id}/media/archive`

## Request

- Base URL: `https://api.contentstudio.io`
- URL: `https://api.contentstudio.io/api/v1/workspaces/{workspace_id}/media/archive`
- Auth: API key in header `X-API-Key`

Archiving hides media from the default library listing without deleting it — the safe alternative to deletion for media attached to posts that have not published yet. Set archived=false to restore items to their original folder. Reversible.

## Path parameters

- `workspace_id` string, required

## Request body

- object
  - `media_ids` string[], required
  - `archived` boolean, required: true archives, false restores

## Response `200`

Media archived or unarchived

- object
  - `status` boolean
  - `message` string

## Other responses

- `401`: Unauthorized - API key missing or invalid
- `403`: Forbidden - No access to workspace. Workspace access refusals return `error_code` `WORKSPACE_ACCESS_DENIED`, `WORKSPACE_INVITATION_PENDING`, `WORKSPACE_LOCKED`, `PERMISSION_DENIED`.
- `404`: One or more media not found in this workspace (MEDIA_NOT_FOUND)
- `422`: Validation error (VALIDATION_ERROR)
- `429`: Too many requests

## Changes

- **2026-09-22** `ad0b687289a3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/contentstudio/apis/contentstudio-api-v1/changes/api/v1/workspaces/:workspace_id/media/archive/post.md)

---

[API](https://skmtc.dev/contentstudio/apis/contentstudio-api-v1.md) - [All operations](https://skmtc.dev/contentstudio/apis/contentstudio-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/contentstudio/apis/contentstudio-api-v1/revisions/2ce09d50369c?raw)
