---
title: "Validate extraction template settings"
method: POST
path: "/api/v3/extract-template/{template_id}/validation/"
tags: ["Extraction templates"]
---

# Validate extraction template settings

`POST /api/v3/extract-template/{template_id}/validation/`

## Request

- Base URL: `https://embedded.improvado.io`
- URL: `https://embedded.improvado.io/api/v3/extract-template/{template_id}/validation/`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `dts_session_id`
- TypeScript: <https://skmtc.dev/improvado/apis/improvado-embedded-api-v3/docs/api/v3/extract-template/:template_id/validation/post.ts> (a function with typed inputs; its response is checked against the schema)

Validates the proposed combination of fields, custom settings and accounts against the given extraction template before creating or migrating an extract. Use this endpoint as a pre-flight check — for example, before creating an extract or calling the migrate-wide endpoint.

Accounts are referenced by their embedded account IDs and must all belong to a single connection. The connection is resolved automatically from the provided accounts.

## Path parameters

- `template_id` integer, required

## Request body

- ExtractTemplateValidationRequest: Request payload for extraction template settings validation.
  - `accounts` integer[], required: Embedded account IDs to validate against the template. Must be non-empty and all accounts must belong to a single connection.
  - `template_settings` object: Proposed template settings to validate. Optional.
    - `fields` string[]: List of fields to validate.
    - `additional_params` object: Additional extraction parameters / custom settings.
    - `dynamic_fields` string[], nullable: List of dynamic fields. Null if not used.
    - `custom_filters` object, nullable: Custom filters to apply. Null if no filters.
    - `sync_historical_data` string, date, nullable: Start date for historical data backfill (ISO date format, e.g. "2024-01-15"). Null if not set.

## Response `200`

Validation result. An empty `detail` and empty `incompatible` mean the settings are valid. Incompatible field combinations are returned in `incompatible`; other validation errors (e.g. bad custom settings) are returned in `detail`.

- ExtractTemplateValidationResponse: Result of extraction template settings validation.
  - `detail` string: Validation error details. Empty string if no errors.
  - `incompatible` object: Map of incompatible fields to the list of incompatibility reasons. Empty object if all fields are compatible.

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not found

---

[API](https://skmtc.dev/improvado/apis/improvado-embedded-api-v3.md) - [All operations](https://skmtc.dev/improvado/apis/improvado-embedded-api-v3/llms.txt) - [OpenAPI document](https://skmtc.dev/improvado/apis/improvado-embedded-api-v3/revisions/a881099bd6c4?raw)
