---
title: "Validate a rule expression"
method: POST
path: "/rules/validate"
tags: ["Rules"]
---

# Validate a rule expression

`POST /rules/validate`

Validates a rule expression without saving. Uses `expr.Compile()` to verify syntax.

## Request body

- object
  - `expression` string, required — Rule expression to validate.

## Response `200`

Validation result.

- object
  - `valid` boolean
  - `error` string — Present only when `valid` is `false`.

---

[API](https://skmtc.dev/netcorecloud/apis/email-api-v6.md) · [All operations](https://skmtc.dev/netcorecloud/apis/email-api-v6/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/netcorecloud/email-api-v6/revisions/73f83bc2eff8/schema)
