> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://stelltec.com/rhebok/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://stelltec.com/rhebok/docs/_mcp/server.

# Check config changes without saving

POST http://127.0.0.1:7331/api/config/check
Content-Type: application/json

Applies a patch to a copy of `config.toml` in memory and reports every
problem in the result, and the subset a save would refuse. Nothing is
written.


Reference: https://stelltec.com/rhebok/docs/api/config/check-config

## Request

### Body (application/json)

This endpoint expects a ConfigCheckRequest.

- `set` (map from string to ConfigPatchValue, optional) — Dotted keys (`hook.threshold`) to values. A null value removes the key, the same as listing it in `unset`.
- `unset` (list of string, optional) — Dotted keys to remove, so their defaults apply again.

## Response

### 200

The problems the patched file would have.

- `errors` (list of FieldError, required) — Every problem the patched file would have.
- `blocking` (list of FieldError, required) — The problems a save would refuse, which leaves out problems the file already has.

## Errors

### 400 Bad Request Error

The body is not the JSON this route expects (it does not parse, or a required field is missing or has the wrong type).

- `error` (string, required) — What went wrong, in plain words.

### 409 Conflict Error

The request `Origin` is not this dashboard.

- `error` (string, required) — What went wrong, in plain words.

### 413 Content Too Large Error

The declared `Content-Length` is over 65,536 bytes.

- `error` (string, required) — What went wrong, in plain words.

### 421 Misdirected Request Error

The `Host` header does not name this dashboard (see the rules at the top of this page).

- `error` (string, required) — What went wrong, in plain words.

### 500 Internal Server Error

An unexpected server-side failure, such as failing to find the running binary, spawn a process, or read or write a file.

- `error` (string, required) — What went wrong, in plain words.

## Types

### ConfigPatchValue

A TOML value as JSON. An object becomes a table; null means remove the key.

- string
- double
- integer
- boolean
- list of any
- map from string to any

### FieldError

One problem with `config.toml` or with a requested change.

- `path` (string, required) — The dotted key (`hook.threshold`), or `""` for a syntax error.
- `message` (string, required)
- `line` (integer, required, nullable) — The 1-based line in `config.toml`, or null when the problem has no single line.

## Examples

**Request**

```json
{
  "set": {
    "hook.threshold": 1.4
  }
}
```

**Response**

```json
{
  "errors": [
    {
      "path": "hook.threshold",
      "message": "must be between 0 and 1",
      "line": 4
    }
  ],
  "blocking": [
    {
      "path": "hook.threshold",
      "message": "must be between 0 and 1",
      "line": 4
    }
  ]
}
```

**SDK Code**

```python Config_checkConfig_example
import requests

url = "http://127.0.0.1:7331/api/config/check"

payload = { "set": { "hook.threshold": 1.4 } }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Config_checkConfig_example
const url = 'http://127.0.0.1:7331/api/config/check';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"set":{"hook.threshold":1.4}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Config_checkConfig_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "http://127.0.0.1:7331/api/config/check"

	payload := strings.NewReader("{\n  \"set\": {\n    \"hook.threshold\": 1.4\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Config_checkConfig_example
require 'uri'
require 'net/http'

url = URI("http://127.0.0.1:7331/api/config/check")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"set\": {\n    \"hook.threshold\": 1.4\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Config_checkConfig_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("http://127.0.0.1:7331/api/config/check")
  .header("Content-Type", "application/json")
  .body("{\n  \"set\": {\n    \"hook.threshold\": 1.4\n  }\n}")
  .asString();
```

```php Config_checkConfig_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'http://127.0.0.1:7331/api/config/check', [
  'body' => '{
  "set": {
    "hook.threshold": 1.4
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Config_checkConfig_example
using RestSharp;

var client = new RestClient("http://127.0.0.1:7331/api/config/check");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"set\": {\n    \"hook.threshold\": 1.4\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Config_checkConfig_example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["set": ["hook.threshold": 1.4]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "http://127.0.0.1:7331/api/config/check")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```