Skip to main content
POST
/
templates
/
validate
Validate template
curl --request POST \
  --url https://www.orgo.ai/api/templates/validate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/yaml' \
  --data '"<string>"'
{
  "ok": true,
  "template": {
    "api_version": "orgo.ai/v1",
    "template": {
      "name": "claude-code",
      "version": "1.0.0",
      "description": "<string>"
    },
    "hardware": {},
    "secrets": [
      {}
    ],
    "vars": {},
    "env": {},
    "build": {},
    "files": "<array>",
    "apps": "<array>",
    "triggers": "<array>",
    "terminal": "<array>",
    "hooks": {},
    "telemetry": {},
    "egress_policy": {},
    "streaming": "<array>"
  },
  "errors": [
    {
      "field": "hardware.cpu",
      "code": "invalid_enum",
      "message": "<string>",
      "hint": "<string>"
    }
  ]
}
Validates a template against the 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.

Request body

The raw template document, as YAML (Content-Type: application/yaml) or JSON.

Response

ok
boolean
true if the template is valid.
template
object
The normalized template (sugar expanded into canonical form). Present when ok is true.
errors
array
Present when ok is false. Each entry pinpoints one problem.

Example

curl -X POST https://www.orgo.ai/api/templates/validate \
  -H "Authorization: Bearer $ORGO_API_KEY" \
  -H "Content-Type: application/yaml" \
  --data-binary @claude-code.yaml

Response — valid

{
  "ok": true,
  "template": {
    "api_version": "orgo.ai/v1",
    "template": { "name": "claude-code", "version": "1.0.0" }
  }
}

Response — invalid

{
  "ok": false,
  "errors": [
    {
      "field": "hardware.cpu",
      "code": "invalid_enum",
      "message": "cpu must be one of 1, 2, 4, 8, 16"
    }
  ]
}

Authorizations

Authorization
string
header
required

API key authentication. Get your key at orgo.ai/workspaces

Body

The body is of type string.

Response

Validation result

ok
boolean
template
object

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.

errors
object[]