Shut down server
curl --request POST \
--url http://127.0.0.1:8765/v1/daemon/shutdown \
--header 'Authorization: Bearer <token>'import requests
url = "http://127.0.0.1:8765/v1/daemon/shutdown"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('http://127.0.0.1:8765/v1/daemon/shutdown', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "shutting_down",
"pid": 48213
}Daemon
Shut down server
POST
/
v1
/
daemon
/
shutdown
Shut down server
curl --request POST \
--url http://127.0.0.1:8765/v1/daemon/shutdown \
--header 'Authorization: Bearer <token>'import requests
url = "http://127.0.0.1:8765/v1/daemon/shutdown"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('http://127.0.0.1:8765/v1/daemon/shutdown', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "shutting_down",
"pid": 48213
}Request graceful shutdown of the server and its active workspaces. This operation is unavailable to account-scoped callers.
A custom server must configure
See error examples and recovery steps. The complete OpenAPI contract includes every response schema.
on_idle_exit in Python or onIdleExit in TypeScript. Without that callback, it continues serving. See server shutdown configuration.
Errors
Errors
| Status | Meaning |
|---|---|
401 | The token is missing or wrong (unauthorized). |
429 | Past a rate limit (rate_limited), or a new session past max_sessions (session_limit). |