Customer is assigned to customer group id in Magento. By default when you create a customer, it has assigned to Default (General) Customer group id.
If you want to delete a customer group id without going to the admin panel, you need to help of REST web API to delete it.
Magento REST Web API provides the Out of the box feature to delete customer group id by its Id.
You have to pass Header as Admin Token to delete customer group id in Magento.
You can’t delete customer group id with 0 (NOT LOGGED IN) and 1 (DEFAULT(GENERAL)).
EndPoint URL: <HOST_URL>/rest/V1/customerGroups/:id
(http://127.0.0.1/magento243/rest//V1/customerGroups/5 Where 5 is the customer group id to delete.)
Header: Authorization Bearer <Admin_TOKEN>
Payload Body: None
Once you delete the customer group id, the customer has been assigned automatically to the Default(General).