curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/constraints/validate' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"facts": [
"string"
]
}'
{
"hard_violations": 1,
"has_refutation": true,
"soft_violations": 1,
"total_penalty": 1.5,
"valid": true,
"violations": [
{
"confidence_penalty": 7.5,
"constraint_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"explanation": "string",
"is_hard": true,
"satisfied": true
}
]
}
Validate facts against all constraints
Required scope: write
POST
/
api
/
v1
/
constraints
/
validate
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/constraints/validate' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"facts": [
"string"
]
}'
{
"hard_violations": 1,
"has_refutation": true,
"soft_violations": 1,
"total_penalty": 1.5,
"valid": true,
"violations": [
{
"confidence_penalty": 7.5,
"constraint_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"explanation": "string",
"is_hard": true,
"satisfied": true
}
]
}
Required scope:
write
Request body
ValidateConstraintsRequest
string[]
required
Facts to validate (in NSR-L syntax)
Response
ValidateConstraintsResponse
integer
required
boolean
required
integer
required
number (float)
required
boolean
required
ConstraintViolationResponse[]
required
Status codes
| Code | Meaning |
|---|---|
200 | Validation result |
401 | Unauthorized — missing or invalid credentials |
403 | Forbidden — the key/token lacks the required scope |
429 | Rate limited — see Retry-After / X-RateLimit-Reset |
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/constraints/validate' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"facts": [
"string"
]
}'
{
"hard_violations": 1,
"has_refutation": true,
"soft_violations": 1,
"total_penalty": 1.5,
"valid": true,
"violations": [
{
"confidence_penalty": 7.5,
"constraint_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"explanation": "string",
"is_hard": true,
"satisfied": true
}
]
}
Last modified on August 31, 2026