---
title: "Api Write Config"
method: POST
path: "/dashboard/api/hosts/{host_id}/config"
tags: ["dashboard"]
---

# Api Write Config

`POST /dashboard/api/hosts/{host_id}/config`

## Request

- Base URL: `https://mcp.sentinelx.app` (the document declares no server; this is the origin it was published from)
- URL: `https://mcp.sentinelx.app/dashboard/api/hosts/{host_id}/config`
- Auth: none declared

Write a new config.yaml to a host. Requires session + arm token.

Two independent authorizations are required:
  1. A valid session cookie (proves WHO you are).
  2. A valid config-edit arm token for THIS host (proves a deliberate,
     recent intent to edit — a stolen cookie alone can't get here).

The write itself validates YAML, backs up the current file, and only
then replaces it — all server-side on the host, via script_run.

## Path parameters

- `host_id` string, required

## Cookies

- `sentinelx_dash_session` string, nullable

## Request body

- WriteConfigBody
  - `content` string, required
  - `token` string, required: config-edit arm token

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/sentinelx/apis/sentinelx-hub.md) · [All operations](https://skmtc.dev/sentinelx/apis/sentinelx-hub/llms.txt) · [OpenAPI document](https://skmtc.dev/sentinelx/apis/sentinelx-hub/revisions/d1f84924795e?raw)
