---
title: "Validate JSON rows"
method: POST
path: "/v1/validate-json-rows"
tags: ["Validations"]
---

# Validate JSON rows

`POST /v1/validate-json-rows`

## Request

- Base URL: `https://api.oneschema.co`
- URL: `https://api.oneschema.co/v1/validate-json-rows`
- Auth: API key in header `X-API-KEY`

Validate a JSON array of records with template column keys and values. Errors and corresponding OneSchema error codes are returned in the response as JSON.

## Request body

- ValidateJsonRowsRequest
  - `template_key` string, required
  - `rows` TemplateRow[], required
    - `<add_template_column_key_1>` string
    - `<add_template_column_key_2>` string

## Response `200`

200

- ValidateJsonRowsResponse
  - `error_rows` ValidationErrorRow[]
    - `index` integer
    - `errors` ValidationErrorMap
      - `<template_column_key_with_error>` TemplateColumnValidationError
        - `code` integer
        - `message` string

## Other responses

- `422`: 422

---

[API](https://skmtc.dev/oneschema/apis/validations.md) - [All operations](https://skmtc.dev/oneschema/apis/validations/llms.txt) - [OpenAPI document](https://skmtc.dev/oneschema/apis/validations/revisions/fe0fc76c455f?raw)
