Templates
Validate template
Check a template document for errors without publishing it.
POST
Validate template
Validates a template against the
Invalid response (
orgo.ai/v1 schema and returns either the normalized document or a structured list of errors. This endpoint has no side effects. Nothing is written, so it is cheap enough to call on every keystroke in an editor.
Validate is also the right way to check a sugar-form template: it desugars server-side, which the published JSON Schema cannot do.
Request body
The raw template document. SendContent-Type: application/yaml to parse it as YAML; any other content type is parsed as JSON. An empty body returns 400.
Response
boolean
true if the template is valid.object
The normalized template (sugar expanded into canonical form). Present when
ok is true.array
Present when
ok is false, alongside a 422 status. Each entry pinpoints one problem.Example
Valid response
Invalid response (422)
Errors
A validation failure is the422 above: ok is false and the body carries errors, with no error field. Everything else is a transport-level failure.
Authorizations
API key authentication. Get your key at orgo.ai/workspaces
Body
The body is of type string.
Response
Validation result
An orgo.ai/v1 template document. Only api_version and template are required. See the full JSON Schema at GET /template-schema, or the schema guide at https://docs.orgo.ai/guides/templates/schema.