---
title: "Import a template file as a draft"
method: POST
path: "/dashboards/v3/templates/admin/import"
tags: ["Dashboard v3 Template Admin"]
---

# Import a template file as a draft

`POST /dashboards/v3/templates/admin/import`

## Request

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

Lands the template built, baked and previewable, and NOT published — the slow, failure-prone half moves onto the per-row publish switch where it can fail without costing the import. Returns how the platform read every column of its data: a date stored as text profiles as a dimension, which empties every trend and silently costs the template its place in the gallery, and 5 of 9 entries failed the first live seed for exactly that.

The data lands where the rest of the catalog's data already lives, NOT in the workspace the operator is standing in — a curated template is system content, and a sample inside a customer workspace is one they can delete. Re-importing a slug that exists updates it in place, keeps its filing, and says whether its data was reused (identical bytes resolve to the dataview already here) or landed.

`created` says which of the two happened — a row added, or a row that already existed shipped anew. The response is the same shape either way and the row itself cannot tell them apart, so a caller offering to undo the import has to be told: on an update there is nothing to undo, only the template that was here before.

## Response `200`

The imported draft, its dataset, and the column read-back

- ImportResponse
  - `template` object, required
  - `dataset` object, required
  - `created` boolean
  - `columns` object[]
  - `notes` string[]

## Other responses

- `201`: Document created, URL follows
- `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/5dfd1c296ded?raw)
