> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Replace the current NSR-L program (creates a new version).

> **Required scope:** write

**Required scope:** `write`

### Request body

`NSRLProgramUpdateRequest`

**code** `string` *required*

**message** `string`

### Response

`NSRLProgramUpdateResponse`

**errors** `string[]` *required*

**success** `boolean` *required*

**updated\_at** `string`

**version\_id** `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 |

```bash cURL theme={null}
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"
}'
```

```json 200 theme={null}
{
  "errors": [
    "string"
  ],
  "success": true,
  "updated_at": "2026-08-31T14:22:05Z",
  "version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.