---
updatedAt: 2026-05-22T20:51:58.000Z
agentTools:
  projectIndex: https://developers.level.io/llms.txt
---

# Delete group

Deletes an existing group.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Level v2 REST API",
    "version": "v2"
  },
  "tags": [
    {
      "name": "Groups",
      "description": "The group hierachy that contains devices."
    }
  ],
  "paths": {
    "/v2/groups/{id}": {
      "delete": {
        "summary": "Delete group",
        "tags": [
          "Groups"
        ],
        "operationId": "deleteGroup",
        "security": [
          {
            "api_key": []
          }
        ],
        "description": "Deletes an existing group.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the group to delete.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    }
  },
  "webhooks": {
    "alert_active": {
      "post": {
        "summary": "Alert Active Webhook",
        "description": "Sent when an alert becomes active",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/alert_webhook_event"
              }
            }
          }
        }
      }
    },
    "alert_resolved": {
      "post": {
        "summary": "Alert Resolved Webhook",
        "description": "Sent when an alert is resolved",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/alert_webhook_event"
              }
            }
          }
        }
      }
    },
    "device_created": {
      "post": {
        "summary": "Device Created Webhook",
        "description": "Sent when a device is created",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/device_webhook_event"
              }
            }
          }
        }
      }
    },
    "device_updated": {
      "post": {
        "summary": "Device Updated Webhook",
        "description": "Sent when a device is updated",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/device_webhook_event"
              }
            }
          }
        }
      }
    },
    "device_deleted": {
      "post": {
        "summary": "Device Deleted Webhook",
        "description": "Sent when a device is deleted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/device_webhook_event"
              }
            }
          }
        }
      }
    },
    "group_created": {
      "post": {
        "summary": "Group Created Webhook",
        "description": "Sent when a group is created",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/group_webhook_event"
              }
            }
          }
        }
      }
    },
    "group_updated": {
      "post": {
        "summary": "Group Updated Webhook",
        "description": "Sent when a group is updated",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/group_webhook_event"
              }
            }
          }
        }
      }
    },
    "group_deleted": {
      "post": {
        "summary": "Group Deleted Webhook",
        "description": "Sent when a group is deleted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/group_webhook_event"
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.level.io"
    }
  ],
  "components": {
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    },
    "schemas": {
      "group": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "Z2lkOi8vbGV2ZWwvRGV2aWNlR3JvdXAvMQ",
            "description": "The ID of the group."
          },
          "parent_id": {
            "type": "string",
            "example": "Z2lkOi8vbGV2ZWwvRGV2aWNlR3JvdXAvMQ",
            "nullable": true,
            "description": "The ID of the group's parent group."
          },
          "child_ids": {
            "type": "array",
            "example": [
              "Z2lkOi8vbGV2ZWwvRGV2aWNlR3JvdXAvMQ",
              "Z2lkOi8vbGV2ZWwvRGV2aWNlR3JvdXAvMw"
            ],
            "items": {
              "type": "string"
            },
            "description": "The IDs of the group's direct children."
          },
          "name": {
            "type": "string",
            "example": "First Floor",
            "description": "The name of the group."
          },
          "device_count": {
            "type": "integer",
            "example": 10,
            "description": "A count of devices assigned to this group."
          },
          "descendent_device_count": {
            "type": "integer",
            "example": 100,
            "description": "A count of devices in the full heiracrchy of this group."
          }
        },
        "required": [
          "id",
          "name",
          "child_ids",
          "device_count",
          "descendent_device_count"
        ]
      },
      "device": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "Z2lkOi8vbGV2ZWwvRGV2aWNlLzE",
            "description": "The ID of the device."
          },
          "hostname": {
            "type": "string",
            "example": "level-device-1",
            "description": "The hostname of the device."
          },
          "nickname": {
            "type": "string",
            "nullable": true,
            "example": "Level's Device",
            "description": "The nickname of the device."
          },
          "role": {
            "type": "string",
            "nullable": true,
            "enum": [
              "workstation",
              "server",
              "domain_controller"
            ],
            "example": "workstation",
            "description": "The role of the device."
          },
          "group_id": {
            "type": "string",
            "nullable": true,
            "example": "Z2lkOi8vbGV2ZWwvRGV2aWNlR3JvdXAvMQ",
            "description": "The ID of the group the device is assigned to."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "exchange",
              "nginx"
            ],
            "description": "The names of the tags applied to the device."
          },
          "flag": {
            "type": "string",
            "nullable": true,
            "example": "broken",
            "description": "The active flag on the device."
          },
          "maintenance_mode": {
            "type": "boolean",
            "example": true,
            "description": "Indicates if the device is in maintenance mode."
          },
          "online": {
            "type": "boolean",
            "example": true,
            "description": "Indicates if the device is online."
          },
          "notes": {
            "type": "string",
            "nullable": true,
            "example": "This device is located in the server room.",
            "description": "User-created notes about the device."
          },
          "manufacturer": {
            "type": "string",
            "nullable": true,
            "example": "Dell",
            "description": "The manufacturer of the device."
          },
          "model": {
            "type": "string",
            "nullable": true,
            "example": "OptiPlex 5070",
            "description": "The model of the device."
          },
          "architecture": {
            "type": "string",
            "nullable": true,
            "example": "amd64",
            "description": "The architecture of the system."
          },
          "serial_number": {
            "type": "string",
            "nullable": true,
            "example": "1A2F3G4H",
            "description": "The manufacturer's serial number."
          },
          "total_memory": {
            "type": "integer",
            "nullable": true,
            "example": 1073741824,
            "description": "The total memory of the device in bytes."
          },
          "memory_slots": {
            "type": "integer",
            "nullable": true,
            "example": 4,
            "description": "The total number of memory slots on the device."
          },
          "cpu_cores": {
            "type": "integer",
            "nullable": true,
            "example": 6,
            "description": "The number of CPU cores on the device."
          },
          "last_logged_in_user": {
            "type": "string",
            "nullable": true,
            "example": "jdoe",
            "description": "The last user logged in to the device."
          },
          "last_reboot_time": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2025-01-01T01:00:00.000Z",
            "description": "The last time the device was rebooted."
          },
          "last_seen_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2025-01-01T01:00:00.000Z",
            "description": "The last time the device was seen. Returns the current time if the device is online."
          },
          "city": {
            "type": "string",
            "nullable": true,
            "example": "Asheville",
            "description": "The city the device is located in."
          },
          "country": {
            "type": "string",
            "nullable": true,
            "example": "United States",
            "description": "The country the device is located in."
          },
          "security_score": {
            "type": "integer",
            "nullable": true,
            "example": 90,
            "description": "The security score of the device."
          },
          "platform": {
            "type": "string",
            "nullable": true,
            "enum": [
              "Windows",
              "Mac",
              "Linux"
            ],
            "example": "Windows",
            "description": "The operating system platform of the device."
          },
          "operating_system": {
            "type": "object",
            "properties": {
              "full_operating_system": {
                "type": "string",
                "nullable": true,
                "example": "Windows 10",
                "description": "The full operating system of the device."
              },
              "major_version": {
                "type": "string",
                "nullable": true,
                "example": "10.0",
                "description": "The major version of the operating system."
              },
              "minor_version": {
                "type": "string",
                "nullable": true,
                "example": "10.0.19045.5247",
                "description": "The minor version of the operating system."
              },
              "architecture": {
                "type": "string",
                "nullable": true,
                "example": "64-bit",
                "description": "The architecture of the operating system."
              },
              "install_date": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "example": "2020-01-01T01:00:00.000Z",
                "description": "The install date of the operating system in UTC."
              },
              "end_of_life": {
                "type": "boolean",
                "example": true,
                "description": "Indicates if the operating system is end of life."
              }
            }
          },
          "cpus": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "model": {
                  "type": "string",
                  "example": "Intel(R) Core(TM) i5-9500 CPU @ 3.00GHz",
                  "description": "The model of the CPU."
                },
                "clock_speed": {
                  "type": "integer",
                  "example": 3000,
                  "description": "The clock speed of the CPU in MHz."
                },
                "cores": {
                  "type": "integer",
                  "example": 6,
                  "description": "The number of cores on the CPU."
                }
              }
            },
            "description": "The CPUs on the device."
          },
          "memory": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "location": {
                  "type": "string",
                  "example": "BANK 0",
                  "description": "The location of the memory."
                },
                "manufacturer": {
                  "type": "string",
                  "example": "Micron",
                  "description": "The manufacturer of the memory."
                },
                "memory_type": {
                  "type": "string",
                  "example": "DDR4",
                  "description": "The type of the memory."
                },
                "clock_speed": {
                  "type": "integer",
                  "example": 2666,
                  "description": "The clock speed of the memory in MHz."
                },
                "size": {
                  "type": "integer",
                  "example": 1073741824,
                  "description": "The size of the memory in bytes."
                },
                "serial_number": {
                  "type": "string",
                  "example": "0000000",
                  "description": "The serial number of the memory."
                },
                "part_number": {
                  "type": "string",
                  "example": "ABC-123",
                  "description": "The part number of the memory."
                },
                "form_factor": {
                  "type": "string",
                  "example": "SODIMM",
                  "description": "The form factor of the memory."
                }
              }
            },
            "description": "The memory on the device."
          },
          "disks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "disk_type": {
                  "type": "string",
                  "example": "SCSI",
                  "description": "The type of the disk."
                },
                "model": {
                  "type": "string",
                  "example": "SCSI Disk Device",
                  "description": "The model of the disk."
                },
                "serial_number": {
                  "type": "string",
                  "example": "123_456",
                  "description": "The serial number of the disk."
                },
                "size": {
                  "type": "integer",
                  "example": 128849011200,
                  "description": "The size of the disk in bytes."
                }
              }
            },
            "description": "The disks on the device."
          },
          "disk_partitions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "example": "Local Fixed Disk",
                  "description": "The label of the disk partition."
                },
                "mount_point": {
                  "type": "string",
                  "example": "C:",
                  "description": "The mount point of the disk partition."
                },
                "encrypted": {
                  "type": "boolean",
                  "example": false,
                  "description": "Indicates if the disk partition is encrypted."
                },
                "primary": {
                  "type": "boolean",
                  "example": true,
                  "description": "Indicates if the disk partition is the primary partition."
                },
                "size": {
                  "type": "integer",
                  "example": 1073741824,
                  "description": "The size of the disk partition in bytes."
                },
                "free_space": {
                  "type": "integer",
                  "example": 1073741824,
                  "description": "The free space of the disk partition in bytes."
                },
                "file_system": {
                  "type": "string",
                  "example": "NTFS",
                  "description": "The file system of the disk partition."
                }
              }
            },
            "description": "The disk partitions on the device."
          },
          "motherboard": {
            "type": "object",
            "properties": {
              "manufacturer": {
                "type": "string",
                "nullable": true,
                "example": "Dell Inc.",
                "description": "The manufacturer of the motherboard."
              },
              "model": {
                "type": "string",
                "nullable": true,
                "example": "0WWJRX",
                "description": "The model of the motherboard."
              },
              "version": {
                "type": "string",
                "nullable": true,
                "example": "A01",
                "description": "The version of the motherboard."
              },
              "serial_number": {
                "type": "string",
                "nullable": true,
                "example": "ABC1234",
                "description": "The serial number of the motherboard."
              },
              "bios_version": {
                "type": "string",
                "nullable": true,
                "example": "1.2.3",
                "description": "The BIOS version of the motherboard."
              },
              "release_date": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "example": "2024-01-01T00:00:00.000Z",
                "description": "The BIOS release date."
              }
            },
            "description": "Motherboard information for the device."
          },
          "network_interfaces": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string",
                  "example": "Microsoft Wi-Fi Direct Virtual Adapter",
                  "description": "The description of the network interface."
                },
                "interface": {
                  "type": "string",
                  "example": "10",
                  "description": "The interface of the network interface."
                },
                "mac_address": {
                  "type": "string",
                  "example": "00:00:00:00:00:00",
                  "description": "The MAC address of the network interface."
                },
                "ip_addresses": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "example": [
                    "192.168.1.1",
                    "192.168.1.2"
                  ],
                  "description": "The IP addresses of the network interface."
                },
                "gateway": {
                  "type": "string",
                  "nullable": true,
                  "example": "192.168.1.1",
                  "description": "The IP address of the gateway."
                },
                "domain": {
                  "type": "string",
                  "nullable": true,
                  "example": "level.io",
                  "description": "The domain of the network interface."
                },
                "dhcp_server": {
                  "type": "string",
                  "nullable": true,
                  "example": "192.168.1.1",
                  "description": "The IP address of the DHCP server."
                },
                "dns_servers": {
                  "type": "string",
                  "nullable": true,
                  "example": "8.8.8.8",
                  "description": "The DNS servers of the network interface."
                },
                "label": {
                  "type": "string",
                  "example": "interface 10",
                  "description": "The label of the network interface."
                }
              }
            },
            "description": "The network interfaces on the device."
          },
          "security": {
            "type": "object",
            "description": "Security information for the device. Fields vary by platform.",
            "properties": {
              "score": {
                "type": "integer",
                "nullable": true,
                "example": 90,
                "description": "The security score of the device."
              },
              "risk": {
                "type": "string",
                "nullable": true,
                "enum": [
                  "very_high_risk",
                  "high_risk",
                  "moderate_risk",
                  "low_risk"
                ],
                "example": "low_risk",
                "description": "The risk category of the device."
              },
              "patch_compliance": {
                "type": "boolean",
                "example": true,
                "description": "Indicates if the device is patch compliant."
              },
              "patch_security_risk": {
                "type": "string",
                "enum": [
                  "up_to_date",
                  "warning",
                  "critical"
                ],
                "example": "up_to_date",
                "description": "The patch security risk level."
              },
              "os_end_of_life": {
                "type": "boolean",
                "example": false,
                "description": "Indicates if the operating system is end of life."
              },
              "primary_partition_encrypted": {
                "type": "boolean",
                "example": true,
                "description": "Indicates if the primary partition is encrypted."
              },
              "firewall_provider": {
                "type": "string",
                "nullable": true,
                "example": "Windows Firewall",
                "description": "The firewall provider. Available on Windows, Mac, and Linux."
              },
              "firewall_enabled": {
                "type": "boolean",
                "nullable": true,
                "example": true,
                "description": "Indicates if the firewall is enabled. Available on Windows, Mac, and Linux."
              },
              "firewall_status": {
                "type": "string",
                "nullable": true,
                "example": "good",
                "description": "The firewall status. Available on Windows."
              },
              "antivirus_provider": {
                "type": "string",
                "nullable": true,
                "example": "Windows Defender",
                "description": "The antivirus provider. Available on Windows."
              },
              "antivirus_status": {
                "type": "string",
                "nullable": true,
                "example": "good",
                "description": "The antivirus status. Available on Windows."
              },
              "auto_update": {
                "type": "string",
                "nullable": true,
                "description": "The auto update setting. Available on Windows."
              },
              "internet_settings": {
                "type": "string",
                "nullable": true,
                "description": "The internet settings. Available on Windows."
              },
              "windows_security_center_service": {
                "type": "string",
                "nullable": true,
                "description": "The Windows Security Center service status. Available on Windows."
              },
              "user_account_control_enabled": {
                "type": "boolean",
                "nullable": true,
                "example": true,
                "description": "Indicates if User Account Control is enabled. Available on Windows."
              },
              "admin_accounts_count": {
                "type": "integer",
                "nullable": true,
                "example": 1,
                "description": "The number of admin accounts on the device. Available on Windows."
              },
              "stealth_enabled": {
                "type": "boolean",
                "nullable": true,
                "example": false,
                "description": "Indicates if stealth mode is enabled. Available on Mac."
              },
              "gatekeeper_enabled": {
                "type": "boolean",
                "nullable": true,
                "example": true,
                "description": "Indicates if Gatekeeper is enabled. Available on Mac."
              },
              "security_module_provider": {
                "type": "string",
                "nullable": true,
                "example": "AppArmor",
                "description": "The security module provider. Available on Linux."
              },
              "security_module_enabled": {
                "type": "boolean",
                "nullable": true,
                "example": true,
                "description": "Indicates if the security module is enabled. Available on Linux."
              }
            }
          }
        }
      },
      "alert": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "Z2lkOi8vbGV2ZWwvQWxlcnQvMQ",
            "description": "The ID of the alert."
          },
          "device_id": {
            "type": "string",
            "example": "Z2lkOi8vbGV2ZWwvRGV2aWNlLzE",
            "description": "The ID of the device the alert is for."
          },
          "device_hostname": {
            "type": "string",
            "example": "level-device-1",
            "description": "The hostname of the device the alert is for."
          },
          "name": {
            "type": "string",
            "example": "Low disk space",
            "description": "The name of the alert."
          },
          "description": {
            "type": "string",
            "example": "Disk free < 5.0%",
            "description": "The description of the alert."
          },
          "payload": {
            "type": "string",
            "nullable": true,
            "example": "4.37% (10.39 GB) remaining",
            "description": "The payload of the alert."
          },
          "severity": {
            "type": "string",
            "enum": [
              "information",
              "warning",
              "critical",
              "emergency"
            ],
            "example": "critical",
            "description": "The severity of the alert."
          },
          "is_resolved": {
            "type": "boolean",
            "example": true,
            "description": "Indicates if the alert is resolved."
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "example": "2024-01-01T01:00:00.000Z",
            "description": "The start time of the alert in UTC."
          },
          "resolved_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-01T01:00:00.000Z",
            "description": "The time the alert was resolved in UTC."
          }
        },
        "required": [
          "id",
          "device_id",
          "device_hostname",
          "name",
          "description",
          "severity",
          "is_resolved",
          "started_at"
        ]
      },
      "alert_webhook_event": {
        "type": "object",
        "description": "This object is sent to your webhook endpoint when an alert becomes active or is resolved.",
        "properties": {
          "event_type": {
            "type": "string",
            "description": "The type of event. For this webhook, either 'alert_active' or 'alert_resolved'."
          },
          "event_id": {
            "type": "string",
            "example": "550e8400-e29b-41d4-a716-446655440000",
            "description": "A unique ID for this event. Remains constant across retries."
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "example": "2024-01-01T01:00:00.000Z",
            "description": "When this event occurred."
          },
          "data": {
            "$ref": "#/components/schemas/alert"
          }
        },
        "required": [
          "event_type",
          "event_id",
          "occurred_at",
          "data"
        ]
      },
      "device_webhook_event": {
        "type": "object",
        "description": "This object is sent to your webhook endpoint when a device is created, updated, or deleted.",
        "properties": {
          "event_type": {
            "type": "string",
            "description": "The type of event. For this webhook, either 'device_created', 'device_updated', or 'device_deleted'."
          },
          "event_id": {
            "type": "string",
            "example": "550e8400-e29b-41d4-a716-446655440000",
            "description": "A unique ID for this event. Remains constant across retries."
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "example": "2024-01-01T01:00:00.000Z",
            "description": "When this event occurred."
          },
          "data": {
            "$ref": "#/components/schemas/device"
          }
        },
        "required": [
          "event_type",
          "event_id",
          "occurred_at",
          "data"
        ]
      },
      "group_webhook_event": {
        "type": "object",
        "description": "This object is sent to your webhook endpoint when a group is created, updated, or deleted.",
        "properties": {
          "event_type": {
            "type": "string",
            "description": "The type of event. For this webhook, either 'group_created', 'group_updated', or 'group_deleted'."
          },
          "event_id": {
            "type": "string",
            "example": "550e8400-e29b-41d4-a716-446655440000",
            "description": "A unique ID for this event. Remains constant across retries."
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "example": "2024-01-01T01:00:00.000Z",
            "description": "When this event occurred."
          },
          "data": {
            "$ref": "#/components/schemas/group"
          }
        },
        "required": [
          "event_type",
          "event_id",
          "occurred_at",
          "data"
        ]
      }
    }
  }
}
```