Get the data schema of a template
get_template_schemaRetrieve the JSON Schema and sample data a template expects before rendering or validation. Use after listing templates to build compatible data; unknown slugs return an error.
Instructions
Returns the JSON Schema of the data object a template expects and the sample data it was designed with, from its published version, else its latest draft. Call it after list_templates and before render or validate_template, to build data that fits; ad-hoc html has no stored schema to read. When the template stores no schema, one is inferred from the sample data: treat that as a guide, not a contract. Read-only and free; an unknown slug returns an error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| template | Yes | Slug (e.g. invoice) or tpl_ id, as list_templates returns them |