curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/templates/{slug}/apply' \
--header "X-API-Key: $STATESET_NSR_API_KEY"
{
"entities_created": 1,
"entities_skipped": 1,
"errors": [
"string"
],
"input_predicates": [
"string"
],
"mode": "string",
"rules_created": 1,
"rules_skipped": 1,
"template_slug": "string"
}
Apply a template handler
Required scope: write
POST
/
api
/
v1
/
templates
/
{slug}
/
apply
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/templates/{slug}/apply' \
--header "X-API-Key: $STATESET_NSR_API_KEY"
{
"entities_created": 1,
"entities_skipped": 1,
"errors": [
"string"
],
"input_predicates": [
"string"
],
"mode": "string",
"rules_created": 1,
"rules_skipped": 1,
"template_slug": "string"
}
Required scope:
write
Path parameters
string
required
Template slug
Query parameters
string
additive or replace
Response
ApplyTemplateResponse
integer
required
integer
required
string[]
required
string[]
The facts this rulebook now needs to reach a verdict — supply these (per decision via
facts, or as KB triples) to drive it. Closes the apply→supply→decide loop so the caller isn’t left guessing.string
required
integer
required
integer
required
string
required
Status codes
| Code | Meaning |
|---|---|
200 | Template applied; returns per-item counts |
401 | Unauthorized — missing or invalid credentials |
402 | Quota exceeded |
403 | Forbidden — the key/token lacks the required scope |
404 | Template not found |
429 | Rate limited — see Retry-After / X-RateLimit-Reset |
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/templates/{slug}/apply' \
--header "X-API-Key: $STATESET_NSR_API_KEY"
{
"entities_created": 1,
"entities_skipped": 1,
"errors": [
"string"
],
"input_predicates": [
"string"
],
"mode": "string",
"rules_created": 1,
"rules_skipped": 1,
"template_slug": "string"
}
Last modified on August 31, 2026