> For the complete documentation index, see [llms.txt](https://guardian.hedera.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guardian.hedera.com/docs/develop/guardian/workspace/schema-templates/create-a-schema-template.md).

# Create a Schema Template

Create reusable schemas and restrictions for draft policies.

### Prerequisites

* The user is signed in as a Standard Registry user.
* The user has permissions to manage schema templates, schemas, and draft policies.
* A draft policy exists before applying a schema template.

### Steps

1. Open the Schema Templates grid.

   The grid shows standalone schema template entities. It supports create, edit, import, export, publish, new version, delete, and filtering behavior consistent with Guardian grids.
2. Create a draft schema template.

   The template gets its own topic and is stored independently from policies. Draft template content is stored in MongoDB. Published template content follows Hedera/IPFS publication flow.
3. Open the template editor.

   The editor lets the user change the template name and description, create schemas for the template, and open template settings.
4. Create template schemas.

   Schemas created inside the template are saved with `category = TEMPLATE`, `templateId`, stable `templateSchemaId`, and field-level `templateFieldId` values.<br>

   <div data-gb-custom-block data-tag="hint" data-style="warning" class="hint hint-warning"><p><strong>Important:</strong> Set the <strong>Entity type</strong> of the main (root) template schema to <strong>VC</strong> or <strong>EVC</strong>, not <strong>Default</strong>. A root schema left as <strong>Default</strong> cannot be used as the schema of a verifiable credential in a policy.</p></div>
5. Configure template restrictions.

   \
   The supported settings are:

* **Lock schema settings** (`schemaSettingsLocked`): locks schema name, description, and entity type.
* **Lock custom fields** (`customFieldsLocked`): prevents adding custom fields to the schema.
* **Lock custom conditions** (`conditionsLocked`): prevents adding new conditions. Add-only - it does not block editing or removing an existing condition.
* **Lock custom repeatable links** (`repeatableLinksLocked`): prevents adding new repeatable field links. Add-only - it does not block editing or removing an existing link.
* **Lock field editing** (`fields[fieldId].locked`): prevents editing and removing an individual template field.
  * Template-owned fields are locked by default; set `locked: false` explicitly to allow policy users to edit or remove the field.
* **Lock this condition** (`conditions[signature].locked`): prevents editing and removing an individual condition. Conditions are unlocked by default; set `locked: true` to lock one.
* **Lock this repeatable link** (`repeatableLinks[fieldId].locked`): prevents editing and removing an individual repeatable field link. Links are unlocked by default; set `locked: true` to lock one.
* **Guidelines** (`guidelines`): adds schema-level or field-level notes that are shown in the policy schema editor after the template is applied.

### Result

You have a draft schema template with reusable schemas and restrictions. You can apply it to an eligible draft policy.

### Troubleshooting

**Why can’t I edit a template field?**

The template restriction can lock individual fields. Update the restriction before editing the field.

### Related

* Concept: [Schema Templates Concept](https://guardian.hedera.com/docs/develop/guardian/workspace/schema-templates.md)
* Task: [Configure Schema Template Guidelines](https://guardian.hedera.com/docs/develop/guardian/workspace/schema-templates/configure-schema-template-guidelines.md)
* Task: [Apply a Schema Template](https://guardian.hedera.com/docs/develop/guardian/workspace/schema-templates/apply-a-schema-template.md)
* Task: [Import a Schema Template](https://guardian.hedera.com/docs/develop/guardian/workspace/schema-templates/import-a-schema-template.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://guardian.hedera.com/docs/develop/guardian/workspace/schema-templates/create-a-schema-template.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
