---
title: "Validate Formula Endpoint"
method: POST
path: "/api/v1/admin/criteria/validate-formula"
tags: ["admin-criteria"]
---

# Validate Formula Endpoint

`POST /api/v1/admin/criteria/validate-formula`

Compile-check a formula against an object's field metadata.

When ``object_type`` is provided, the formula is validated against the
object's declared fields so unknown field references are flagged up-front.
Otherwise the check is purely syntactic (operators, keywords, literals).

## Headers

- `authorization` string, nullable
- `X-API-Key` string, nullable

## Request body

- ValidateFormulaBody
  - `formula` string, required
  - `object_type` string, nullable

## Response `200`

Successful Response

- ValidateFormulaResponse
  - `valid` boolean, required
  - `error` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/ninjavan/apis/salesforce-sales-cloud-replacement.md) · [All operations](https://skmtc.net/ninjavan/apis/salesforce-sales-cloud-replacement/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ninjavan/salesforce-sales-cloud-replacement/versions/fd3a41a6260b/schema)
