---
title: "Inspect a template input schema"
method: GET
path: "/templates/{templateId}/schema"
tags: ["Templates"]
---

# Inspect a template input schema

`GET /templates/{templateId}/schema`

## Request

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

Returns ordered role requirements, sender fields, defaults, and a draft 2020-12 JSON Schema for sender values. Archived templates remain readable. Geometry is available from GET /templates/{templateId} instead.

## Response `200`

The template input schema.

- object
  - `data` TemplateSchema, required
    - `templateId` string, required
    - `version` integer, required
    - `complete` boolean, required
    - `signingOrder` 'parallel' | 'sequential', required
    - `roles` TemplateRoleSchema[], required
      - `key` string, required
      - `label` string, required
      - `order` integer, required
      - `fields` TemplateRoleFieldSchema[], 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.
        - `required` boolean, required
        - `label` string, nullable, required
        - `page` integer, required
    - `senderFields` TemplateSenderFieldSchema[], required
      - `name` string, required
      - `type` 'text' | 'textarea' | 'number' | 'email' | 'date' | 'checkbox' | 'select' | 'radio', required
      - `required` boolean, required
      - `readonly` boolean, required
      - `label` string, nullable, required
      - `default` 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
      - `page` integer, required
    - `defaults` object, required
      - `subject` string, nullable, required
      - `message` string, nullable, required
      - `expiresInDays` integer, required
      - `emailVerification` boolean, required
    - `valuesJsonSchema` TemplateValuesJsonSchema, required
      - `$schema` 'https://json-schema.org/draft/2020-12/schema', required
      - `type` 'object', required
      - `additionalProperties` false, required
      - `properties` object, required
      - `required` 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)
