> 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.

# Start a self-update

POST http://127.0.0.1:7331/api/update

Starts `rhebok update --yes --quiet` as a child process whose output
goes to `db.log`, and returns at once. Follow it with
`GET /api/version`, whose `update` field carries the phase. Any request
body is ignored.


Reference: https://stelltec.com/rhebok/docs/api/updates/start-update

## Response

### 202

The update process started.

- `started` (true, required)
- `pid` (integer, required)

## Errors

### 409 Conflict Error

An index is running, an update is already running, or 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.

### 503 Service Unavailable Error

The rhebok binary to run is not an executable file. `fix` says how to repair it.

- `error` ("the rhebok CLI was not found", required)
- `fix` (string, required) — A command or instruction that repairs the install. Can be empty.

## Examples

**Response**

```json
{
  "started": true,
  "pid": 50240
}
```

**SDK Code**

```python Updates_startUpdate_example
import requests

url = "http://127.0.0.1:7331/api/update"

response = requests.post(url)

print(response.json())
```

```javascript Updates_startUpdate_example
const url = 'http://127.0.0.1:7331/api/update';
const options = {method: 'POST'};

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

```go Updates_startUpdate_example
package main

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

func main() {

	url := "http://127.0.0.1:7331/api/update"

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

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

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

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

}
```

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

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

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

request = Net::HTTP::Post.new(url)

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

```java Updates_startUpdate_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/update")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'http://127.0.0.1:7331/api/update');

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

```csharp Updates_startUpdate_example
using RestSharp;

var client = new RestClient("http://127.0.0.1:7331/api/update");
var request = new RestRequest(Method.POST);
IRestResponse response = client.Execute(request);
```

```swift Updates_startUpdate_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "http://127.0.0.1:7331/api/update")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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()
```