---
sidebar_position: 4
description: Delete counter 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 counter
 Deletes a counter by ID



`Function DeleteCounter(Val Token, Val CounterID) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Auth token |
  | CounterID | --counter | Number, String | &#x2714; | Counter ID for deletion |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Yandex

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


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

    Result = OPI_YandexMetrika.DeleteCounter(Token, CounterID);
```
 

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


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