---
title: "Fetch the JSON schema for a template"
method: GET
path: "/templates/{template_id}/schema"
tags: ["Templates"]
---

# Fetch the JSON schema for a template

`GET /templates/{template_id}/schema`

Retrieves the JSON Schema definition for a template's fields. Use this to validate
data before submitting it for PDF generation, or to build dynamic forms that match
the template's field structure and validation requirements.

See also:
- [Generate PDFs Guide](https://docspring.com/docs/api-guide/generate-pdfs/generate-pdfs-via-api/) - Use schema to validate submission data

## Path parameters

- `template_id` string, required

## Response `200`

template found

- JsonSchema
  - `$schema` string, uri
  - `id` string, uri-reference
  - `title` string
  - `description` string
  - `definitions` object
  - `type` string
  - `properties` object
  - `additionalProperties` boolean
  - `required` string[]

## Other responses

- `401` — authentication failed
- `404` — template not found

---

[API](https://skmtc.net/docspring/apis/docspring-api.md) · [All operations](https://skmtc.net/docspring/apis/docspring-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/docspring/docspring-api/versions/88e2ef4f5847/schema)
