---
title: "Assign agents to default config group and pipeline using token"
method: PUT
path: "/agent/public/setting/config-groups/{token}/{groupName}"
tags: ["AGENT"]
---

# Assign agents to default config group and pipeline using token

`PUT /agent/public/setting/config-groups/{token}/{groupName}`

Using a valid agent token, this API assigns the provided agents (hosts or k8s) to the specified default configuration group and automatically attaches them to the corresponding default ingestion pipeline (default-host or default-k8s).

## Path parameters

- `token` string, required
- `groupName` string, required

## Query parameters

- `agent_type` string

## Request body

- object

## Response `200`

Agents successfully assigned to config group and pipeline

- object

## Other responses

- `400` — Invalid input or assignment failed
- `401` — Invalid or unauthorized token

---

[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)
