---
title: "Create validation code hook"
method: POST
path: "/v1/template-hooks/validation/code"
tags: ["Code Hooks (Legacy)"]
---

# Create validation code hook

`POST /v1/template-hooks/validation/code`

Create a validation code hook.

## Request body

- ValidationCodeHookRequest
  - `key` string, required
  - `columns` string[], required
  - `validation_type` 'row' | 'column'
  - `code` string, required

## Response `200`

200

- EmptyResponse

## Other responses

- `400` — 400

---

[API](https://skmtc.net/oneschema/apis/templates.md) · [All operations](https://skmtc.net/oneschema/apis/templates/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/oneschema/templates/revisions/40674aa6d4d9/schema)
