---
title: "Save a ready import as a template"
method: POST
path: "/v1/imports/{id}/save"
tags: ["Imports"]
---

# Save a ready import as a template

`POST /v1/imports/{id}/save`

## Request

- Base URL: `https://api.galleyrender.com`
- URL: `https://api.galleyrender.com/v1/imports/{id}/save`
- Auth: HTTP bearer

Creates the account's own template, version 1, from the import's draft. It counts against the plan's template limit exactly as `POST /v1/templates` does. Nothing is a template until this call. Saving again returns the same template with `200` and `saved: true`. Saving is never counted against the plan's import count.

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string
  - `description` string

## Response `200`

Already saved: the same template.

- SavedImportTemplate: The saved template, with the import it came from.
  - `object` 'template', required
  - `id` string, required
  - `name` string, required
  - `description` string, nullable
  - `latest_version` integer, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `version` integer: Present when a version was resolved.
  - `ref` string
  - `engine` 'chromium' | 'satori'
  - `schema` object, nullable
  - `options` object, nullable
  - `expected_pages` integer: The version's declared PDF page estimate.
  - `example` unknown
  - `source` string
  - `checksum` string: SHA-256 of engine, source, schema and options. Part of the render cache key.
  - `message` string, nullable
  - `version_created_at` string, date-time
  - `origin` 'library' | 'import' | 'own': On `GET /v1/templates`: a starter from the library, a template saved from a document import, or one of the account's own.
  - `import_id` string, required
  - `saved` true: Present, and true, on a repeat call that returned the template saved before.

## Other responses

- `201`: The new template.
- `401`: `authentication_error`.
- `403`: `plan_required` with `details.feature: "templates"` — the plan's template limit is reached.
- `404`: `not_found`.
- `409`: `conflict` — the import is not `ready` (`details.code: "import_invalid_transition"`), or it has no draft.
- `503`: `import_disabled`.

---

[API](https://skmtc.dev/galleyrender/apis/galley-render-api.md) · [All operations](https://skmtc.dev/galleyrender/apis/galley-render-api/llms.txt) · [OpenAPI document](https://skmtc.dev/galleyrender/apis/galley-render-api/revisions/a85d68468cd2?raw)
