---
title: "Validate condition and convert to expression"
method: POST
path: "/v1/quality/validate/condition"
tags: ["Quality Validation"]
---

# Validate condition and convert to expression

`POST /v1/quality/validate/condition`

## Request

- Base URL: `https://api.cloud.precisely.com`
- URL: `https://api.cloud.precisely.com/v1/quality/validate/condition`
- Auth: HTTP bearer

Accepts a plain-English condition text and validates whether it can be converted into a structured expression. Returns validExpression as true with the converted expression when the condition is valid, otherwise returns false with error details describing why the condition is invalid. This endpoint is read-only and does not modify any resources.

## Request body

- ValidateConditionRequest: Request payload for condition validation and conversion to expression.
  - `condition` string: Plain-English condition text to validate and convert.

## Response `200`

Validation completed successfully

- ValidateConditionResponse: Response payload for condition validation and conversion to expression.
  - `condition` string: Echo of the input condition.
  - `errors` string[]: List of descriptive error messages. Present only when validExpression is false.
  - `expression` string: The converted expression JSON. Present only when validExpression is true.
  - `validExpression` boolean: Indicates whether the condition was successfully converted to an expression.

## Other responses

- `400`: Invalid request payload
- `500`: Internal server error

---

[API](https://skmtc.dev/precisely/apis/verify-api-portal.md) · [All operations](https://skmtc.dev/precisely/apis/verify-api-portal/llms.txt) · [OpenAPI document](https://skmtc.dev/precisely/apis/verify-api-portal/revisions/380735465266?raw)
