---
title: "Update agent configuration for a host"
method: POST
path: "/agent/public/setting/{token}/{hostId}"
tags: ["AGENT"]
---

# Update agent configuration for a host

`POST /agent/public/setting/{token}/{hostId}`

This API allows agents to update their configuration and metadata at the host level. The configuration must be sent as base64-encoded JSON in the `value` field.

## Path parameters

- `token` string, required
- `hostId` string, required

## Request body

- object

## Response `200`

Success: returns updated agent setting

- AgentAgentSettingModels
  - `account_id` integer
  - `config` object
  - `config_null` object
  - `created_at` string
  - `group_id` SqlNullInt64
    - `int64` integer
    - `valid` boolean — Valid is true if Int64 is not NULL
  - `host_id` string
  - `id` integer
  - `meta_data` object
  - `meta_data_null` object
  - `project_id` integer
  - `token` string
  - `updated_at` string

## Other responses

- `500` — Internal server error

---

[API](https://skmtc.net/middleware/apis/middleware-api.md) · [All operations](https://skmtc.net/middleware/apis/middleware-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/middleware/middleware-api/revisions/614091456d31/schema)
