curl --request PUT \
--url 'https://api.nsr.stateset.com/api/v1/nsrl/program' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"code": "human(socrates). mortal(X) :- human(X).",
"message": "Initial policy load"
}'
{
"errors": [
"string"
],
"success": true,
"updated_at": "2026-08-31T14:22:05Z",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Replace the current NSR-L program (creates a new version).
Required scope: write
PUT
/
api
/
v1
/
nsrl
/
program
curl --request PUT \
--url 'https://api.nsr.stateset.com/api/v1/nsrl/program' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"code": "human(socrates). mortal(X) :- human(X).",
"message": "Initial policy load"
}'
{
"errors": [
"string"
],
"success": true,
"updated_at": "2026-08-31T14:22:05Z",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Required scope:
write
Request body
NSRLProgramUpdateRequest
string
required
string
Response
NSRLProgramUpdateResponse
string[]
required
boolean
required
string
string
Status codes
| Code | Meaning |
|---|---|
200 | Program update 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 PUT \
--url 'https://api.nsr.stateset.com/api/v1/nsrl/program' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"code": "human(socrates). mortal(X) :- human(X).",
"message": "Initial policy load"
}'
{
"errors": [
"string"
],
"success": true,
"updated_at": "2026-08-31T14:22:05Z",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Last modified on August 31, 2026