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

# Delete Agent Group

Use this API to delete an agent group by id.

<Note>
  Deleting a group removes the group document **only**. The member agents themselves are **not** affected — they remain intact in your agent configurations and continue to belong to any other groups they are part of.
</Note>

# Endpoint

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

# 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>
      Min 1 char. Agent group id to delete.
    </ParamField>
  </Expandable>
</ParamField>

## **Example Requests**

```JSON theme={null}
{
  "data": {
    "groupId": "grp_9f3ac2"
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Agent group deleted successfully",
    "data": {
      "groupId": "grp_9f3ac2"
    }
  }
}
```

| Field          | Type   | Description                  |
| -------------- | ------ | ---------------------------- |
| `data.groupId` | string | The id of the deleted group. |

#### Failure Response

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

**Errors:** `NOT_FOUND` if the group does not exist.

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "status": "success",
      "message": "Agent group deleted successfully",
      "data": {
        "groupId": "grp_9f3ac2"
      }
    }
  }
  ```
</ResponseExample>
