---
title: "Undo an import"
method: DELETE
path: "/dashboards/v3/templates/admin/{slug}"
tags: ["Dashboard v3 Template Admin"]
---

# Undo an import

`DELETE /dashboards/v3/templates/admin/{slug}`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/dashboards/v3/templates/admin/{slug}`
- 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`

Removes a draft that should never have landed — the way out of an import whose column read-back arrives AFTER the dataset, the dashboard and the row already exist. Removes the catalog row and the dashboard it stood up, in that order, so a failure halfway cannot leave a row pointing at nothing. Refused for a live template (unpublish stops it being offered without destroying anything) and for a row the catalog does not own. A row people have applied may be discarded: an apply copies, so their boards keep working — what goes is the template, its preview board and the record that it was used. The DATA is released last, and only if no other template still points at it — it is content-addressed, so two templates carrying identical bytes share one snapshot row.

## Path parameters

- `slug` string, required

## Response `200`

The discarded template, and what was left behind

- DiscardResponse
  - `deleted` string, required
  - `notes` string[]

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