templates

Validate Template Variables

Validate that all variables in template content are valid Pydantic fields.

This endpoint checks:

  1. All {{variable}} references are extracted
  2. Each variable corresponds to a field in LoadSchema or CarrierSchema
  3. Nested paths are valid (e.g., load.customer.name)
  4. Array access is valid (e.g., load.stops.0.city)

Returns validation result with any errors found.

Use this for:

  • Real-time validation in template editor
  • Pre-save validation
  • Displaying helpful error messages to users
post/v1/templates/validate

Request

  • Base URL
    https://api.mentium.io (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Headers

mentium-workspace-idstring nullable

Request body

contentstring required

Response

Successful Response

is_validboolean required
variables_foundstring[]
invalid_variablesstring[]
error_messagesstring[]

Changes

No recorded changes to this operation across all 2 revisions of this API.