---
title: "Purge the source copies of a finished project move"
method: POST
path: "/support/project-moves/{move_id}/purge"
tags: ["Workspaces Support"]
---

# Purge the source copies of a finished project move

`POST /support/project-moves/{move_id}/purge`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/support/project-moves/{move_id}/purge`
- 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`

Queues the deletion of the files a finished move copied and left in the source workspace. A file is deleted only when its copy is safe in the target workspace and the source file is as the move found it; every other file is skipped with its reason. The move reports the outcome in `purge`. Refused for a move that is not finished, for a purge that is done with no file kept, and for one that a run still carries. Tech admin only.

## Path parameters

- `move_id` integer, required: Id of the project move

## Response `202`

Request accepted, processing continues off-line

- MoveResponse
  - `move` MoveSchema, required
    - `id` integer, required
    - `project_id` integer, required
    - `source_workspace_id` integer, required
    - `target_workspace_id` integer, required
    - `status` 'queued' | 'copying' | 'switched' | 'done' | 'aborted', required: Where a project move stands: QUEUED, COPYING and SWITCHED are unfinished.
    - `error` string, nullable: Why the move stopped; null while it runs or when it finished
    - `stalled` boolean, required: True when the move is unfinished, has no error and no run carries it (its worker died); starting the move again resumes it
    - `progress` MoveProgressSchema, required
      - `tables_total` integer, required
      - `tables_copied` integer, required
    - `purge` MovePurgeSchema
      - `status` 'queued' | 'running' | 'done' | 'failed', required: Where the purge of a finished move's source copies stands.
      - `stalled` boolean, required: True when the purge is queued or running and no run carries it (its worker died or its task was lost); asking for the purge again resumes it
      - `removed_files` integer, required: Source files the purge deleted
      - `bytes_freed` integer, required: Size of the files it deleted
      - `skipped` string[], required: Files a check kept in place, one `name: reason` line each
      - `failed` string[], required: Files whose delete did not work, one `name: reason` line each
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required

## Other responses

- `400`: Bad request syntax or unsupported method
- `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/fe078afe239b?raw)
