---
title: "Delete Group Api"
method: POST
path: "/api/servers/groups/delete"
tags: ["Server Management"]
---

# Delete Group Api

`POST /api/servers/groups/delete`

## Request

- The document declares no server URL.
- Auth: HTTP bearer

Delete a scope group via JWT authentication (External API).

This endpoint provides the same functionality as POST /api/internal/delete-group
but uses modern JWT Bearer token authentication.

**Authentication:** JWT Bearer token (via nginx X-User header)
**Authorization:** Requires valid JWT token from auth system

**Request body (form data):**
- `group_name` (required): Name of the group to delete
- `delete_from_keycloak` (optional): Whether to delete from Keycloak (default: true)
- `force` (optional): Force deletion of system groups (default: false)

**Response:**
Returns confirmation of group deletion.

**Example:**
```bash
curl -X POST https://registry.example.com/api/servers/groups/delete \
  -H "Authorization: Bearer $JWT_TOKEN" \
  -F "group_name=old-team" \
  -F "delete_from_keycloak=true" \
  -F "force=false"
```

## Request body `application/x-www-form-urlencoded`

- BodyDeleteGroupApiApiServersGroupsDeletePost
  - `group_name` string, required
  - `delete_from_keycloak` boolean
  - `force` boolean

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/ascending-llc/apis/mcp-gateway-registry.md) - [All operations](https://skmtc.dev/ascending-llc/apis/mcp-gateway-registry/llms.txt) - [OpenAPI document](https://skmtc.dev/ascending-llc/apis/mcp-gateway-registry/revisions/31381943e2e7?raw)
