# Остановка рассылок

## Остановка рассылки

<mark style="color:green;">`POST`</mark> `https://direct.i-dgtl.ru/api/v1/dispatch/{dispatchId}/stop`

Метод позволяет остановить рассылку, для которой уже был отправлен запрос `/start`

#### Path Parameters

| Name                                         | Type    | Description            |
| -------------------------------------------- | ------- | ---------------------- |
| dispatchId<mark style="color:red;">\*</mark> | integer | Идентификатор рассылки |

#### Headers

| Name                                            | Type   | Description       |
| ----------------------------------------------- | ------ | ----------------- |
| Authorization<mark style="color:red;">\*</mark> | string | `Basic {TOKEN_1}` |

{% tabs %}
{% tab title="200 " %}
При успешной остановке рассылки возвращается HTTP 200 без body.
{% endtab %}

{% tab title="403" %}
Статус рассылки не позволяет произвести остановку (рассылка либо не запущена, либо завершена).

```
{
    "error": {
        "code": 4031,
        "msg": "Inappropriate dispatch status"
    }
}
```

{% endtab %}

{% tab title="404" %}
Рассылка с полученным id не найдена.

```
{
    "error": {
        "code": 4040,
        "msg": "Dispatch 10000100 not found"
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.docs.direct.i-dgtl.ru/dispatches/stop.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
