> ## Documentation Index
> Fetch the complete documentation index at: https://velt-raghul-agent-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Agent Group

Use this API to update a group's `name` and/or `description`. **Membership and metadata cannot be changed via this endpoint:**

* For membership changes, use [Add Agents to Group](/api-reference/rest-apis/v2/agents/groups/add-agents) and [Remove Agents from Group](/api-reference/rest-apis/v2/agents/groups/remove-agents).
* `metadata` is **immutable** after creation — set it on [Create Group](/api-reference/rest-apis/v2/agents/groups/create).

The schema uses `.strict()` so any unknown field (including `agentIds` and `metadata`) is rejected with a clear validation error. At least one of `name` or `description` must be provided — empty updates are rejected.

# Endpoint

`POST https://api.velt.dev/v2/agents/groups/update`

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="groupId" type="string" required>
      Trimmed, non-empty. Agent group id.
    </ParamField>

    <ParamField body="name" type="string">
      Trimmed, non-empty. Capped at `MAX_GROUP_NAME_LENGTH`.
    </ParamField>

    <ParamField body="description" type="string">
      Trimmed. Capped at `MAX_GROUP_DESCRIPTION_LENGTH`.
    </ParamField>
  </Expandable>
</ParamField>

At least one of `name` or `description` is required.

## **Example Requests**

#### 1. Rename a group

```JSON theme={null}
{
  "data": {
    "groupId": "grp_9f3ac2",
    "name": "Brand & Visual QA"
  }
}
```

#### 2. Update name and description

```JSON theme={null}
{
  "data": {
    "groupId": "grp_9f3ac2",
    "name": "Brand & Visual QA",
    "description": "Brand consistency, color, typography, and layout agents"
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Agent group updated successfully",
    "data": {
      "group": {
        "id": "grp_9f3ac2",
        "name": "Brand & Visual QA",
        "description": "Brand consistency, color, typography, and layout agents",
        "agentIds": ["abc123def456", "spell-check"],
        "metadata": { "apiKey": "ak_xxx" },
        "createdAt": 1711900000000,
        "updatedAt": 1711950000000
      }
    }
  }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
```

**Errors:**

* `NOT_FOUND` — group does not exist
* `INVALID_ARGUMENT` — neither `name` nor `description` provided, or unknown field sent (e.g. `agentIds`, `metadata`)

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "status": "success",
      "message": "Agent group updated successfully",
      "data": {
        "group": {
          "id": "grp_9f3ac2",
          "name": "Brand & Visual QA",
          "agentIds": [],
          "metadata": { "apiKey": "ak_xxx" },
          "createdAt": 1711900000000,
          "updatedAt": 1711950000000
        }
      }
    }
  }
  ```
</ResponseExample>
