---
title: "Archive a workspace to cold storage, or retry a failed archive"
method: POST
path: "/support/workspaces/{workspace_id}/archive"
tags: ["Workspaces Support"]
---

# Archive a workspace to cold storage, or retry a failed archive

`POST /support/workspaces/{workspace_id}/archive`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/support/workspaces/{workspace_id}/archive`
- 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`

Block the workspace (status ARCHIVED) and queue the job that moves its data to S3. Live billing (deal, Stripe subscription, add-ons) is cancelled first, now and with no refund, when cancel_billing is true; without it, live billing refuses the request. Refused unless the workspace is eligible. Admin only.

## Path parameters

- `workspace_id` integer, required: Id of the workspace to work with

## Request body

- WorkspaceArchiveRequest: Storage class, optional reason and the typed workspace name
  - `storage_class` 'GLACIER_IR' | 'DEEP_ARCHIVE', required: S3 storage class for the archive. A retry of a failed archive keeps the class it started with.
  - `reason` string, nullable: Optional reason recorded with the archive (for support).
  - `confirm_name` string, required: The workspace name, typed to confirm (case-sensitive).
  - `cancel_billing` boolean: Confirms that archiving cancels the workspace's live deal, Stripe subscription and add-ons now, with no refund. Required when any of them is live.

## Response `202`

Archive or restore run queued

- ArchiveRun
  - `ledger` LedgerView, required
    - `archive_id` string, nullable
    - `state` string, nullable
    - `op` string, nullable
    - `step` string, nullable
    - `storage_class` string, nullable
    - `by` integer, nullable
    - `reason` string, nullable
    - `started_at` string, nullable
    - `heartbeat` string, nullable
    - `completed_at` string, nullable
    - `error` string, nullable
    - `files` integer, nullable
    - `bytes_physical` integer, nullable
    - `bytes_orphan` integer, nullable
    - `bytes_done` integer, nullable
    - `thaw_requested_at` string, nullable
    - `s3_delete_after` string, nullable
    - `s3_deleted` boolean, nullable
    - `prior_status` string, nullable
    - `chunks_done` integer
    - `chunks_total` integer
    - `stalled` boolean
    - `restorable` boolean

## Other responses

- `400`: Bad Request
- `401`: Authorization error
- `403`: Request forbidden -- authorization will not help

---

[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)
