---
sidebar_position: 4
description: Delete tag and other functions to work with Yandex Metrika in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Yandex Metrika]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Delete tag
 Deletes a tag by ID



`Function DeleteTag(Val Token, Val TagID) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Auth token |
  | TagID | --label | String | &#x2714; | ID of the tag to be deleted |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Yandex

:::tip
Method at API documentation: [Deleting a tag](https://yandex.ru/dev/metrika/en/management/openapi/label/deleteLabel)
:::
<br/>


```bsl title="1C:Enterprise/OneScript code example"
    Token = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
    TagID = "321237";

    Result = OPI_YandexMetrika.DeleteTag(Token, TagID);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint metrika DeleteTag \
             --token "***" \
             --label "321239"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint metrika DeleteTag ^
             --token "***" ^
             --label "321239"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "success": true
}
```
