---
title: "Unarchive a template"
method: POST
path: "/templates/{templateId}/unarchive"
tags: ["Templates"]
---

# Unarchive a template

`POST /templates/{templateId}/unarchive`

## Request

- Base URL: `https://inkseal.net/api/v1`
- URL: `https://inkseal.net/api/v1/templates/{templateId}/unarchive`
- Auth: HTTP bearer

Returns an archived template to the active library.

## Response `200`

The active template.

- object
  - `data` TemplateDetail, required
    - `id` string, required: Public template id. This is the `templateId` in the `/templates/{templateId}` routes and the `templateId` a template envelope is created from.
    - `name` string, required
    - `description` string, nullable, required
    - `document` object, required
      - `id` string, required
      - `filename` string, required
      - `pageCount` integer, required
      - `pageDimensions` object[], required
        - `width` number, required
        - `height` number, required
    - `signingOrder` 'parallel' | 'sequential', required
    - `defaultSubject` string, nullable, required
    - `defaultMessage` string, nullable, required
    - `defaultExpiresInDays` integer, required
    - `emailVerification` boolean, required
    - `version` integer, required
    - `complete` boolean, required
    - `archivedAt` string, date-time, nullable, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `roles` TemplateRole[], required
      - `key` string, required
      - `label` string, required
      - `order` integer, required
      - `id` string, required
    - `fields` TemplateField[], required
      - `name` string, required
      - `type` 'signature' | 'initials' | 'text' | 'date' | 'checkbox' | 'number' | 'email' | 'select' | 'radio' | 'textarea', required: How the field is filled and rendered. Values are stored as strings; signature and initials use images.
      - `assignee` union, required
        - 'sender'
        - object
          - `role` string, required
      - `pageIndex` integer, required
      - `xRatio` number, required
      - `yRatio` number, required
      - `widthRatio` number, required
      - `heightRatio` number, required
      - `required` boolean, required
      - `readonly` boolean, required
      - `defaultValue` string, nullable, required
      - `validation` FieldValidation, required
        - `minLength` integer
        - `maxLength` integer
        - `pattern` string
        - `min` number
        - `max` number
        - `minDate` string, date
        - `maxDate` string, date
      - `options` FieldOption[], nullable, required
        - `value` string, required
        - `label` string, required
      - `label` string, nullable, required
      - `id` string, required

## Other responses

- `401`: The credential is missing, malformed, unknown, expired, revoked, or past its rotation grace window. Code: `unauthorized`. Every authentication failure is deliberately indistinguishable.
- `403`: The credential is valid but may not do this. Codes: `insufficient_scope` (the route's scopes are not all held; `details` names `requiredScopes` and `missingScopes`), `forbidden` (the capability check on the resolved resource failed), `scope_escalation` (a grant wider than the caller's own was requested).
- `404`: The resource does not exist, was deleted, or belongs to another workspace. Code: `not_found`. The three cases are answered identically on purpose, so a 404 never confirms that an identifier exists elsewhere.
- `429`: A limit was reached. Codes: `rate_limited` (the credential's per-bucket HTTP limit, or the per-workspace detection throttle), `workspace_limit_exceeded` (a workspace content or send limit; `details.limit` names it), `daily_budget_exceeded` (the workspace's daily detection budget). The four rate-limit headers are sent on this response and on no successful one, so a client cannot read its remaining budget without being refused. Retrying after `Retry-After` is always safe: a rate-limit refusal happens before the handler runs.
- `503`: A dependency the request needs is unreachable and nothing was changed. Codes: `queue_unavailable` (a background job could not be enqueued; retry the call), `billing_unavailable` (Stripe would not open a checkout session; nothing was charged, retry the call), `service_unavailable` (the rate-limit store is down, so the request was refused before running).

---

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