[comment]: # translation:outdated

[comment]: # ({29d349c1-f9e8f670})
# templategroup.delete

[comment]: # ({/29d349c1-f9e8f670})

[comment]: # ({new-b5ff62ed})
### Description

`object templategroup.delete(array templateGroupIds)`

This method allows to delete template groups.

A template group can not be deleted if it contains templates that belong to this group only.

::: noteclassic
This method is only available to *Admin* and *Super admin*
user types. Permissions to call the method can be revoked in user role
settings. See [User
roles](/manual/web_interface/frontend_sections/administration/user_roles)
for more information.
:::

[comment]: # ({/new-b5ff62ed})

[comment]: # ({cc11ccac-55384a41})
### Parametri

"(array)" ID dei gruppi di modelli da eliminare.

[comment]: # ({/cc11ccac-55384a41})

[comment]: # ({783f539f-d49e0667})
### Valori restituiti

"(object)" Restituisce un oggetto contenente gli ID del modello eliminato
gruppi nella proprietà `groupids`.

[comment]: # ({/783f539f-d49e0667})

[comment]: # ({b41637d2-e8653e4d})
### Esempi 

[comment]: # ({/b41637d2-e8653e4d})

[comment]: # ({new-1aca44e8})
#### Deleting multiple template groups

Delete two template groups.

Request:

``` {.java}
{
    "jsonrpc": "2.0",
    "method": "templategroup.delete",
    "params": [
        "107814",
        "107815"
    ],
    "auth": "3a57200802b24cda67c4e4010b50c065",
    "id": 1
}
```

Response:

``` {.java}
{
    "jsonrpc": "2.0",
    "result": {
        "groupids": [
            "107814",
            "107815"
        ]
    },
    "id": 1
}
```

[comment]: # ({/new-1aca44e8})

[comment]: # ({48ae452a-918ba5f6})
### Fonte

CTemplateGroup::delete() in
*ui/include/classes/api/services/CTemplateGroup.php*.

[comment]: # ({/48ae452a-918ba5f6})
