# Запуск рассылки

## Запуск рассылки

<mark style="color:green;">`POST`</mark> `https://direct.i-dgtl.ru/api/v1/dispatch/{dispatchId}/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" %}
Возвращается идентификатор рассылки.

```
{
  "dispatchId": 10000000125
}
```

{% endtab %}

{% tab title="401" %}
Использование невалидного токена.

{% tabs %}
{% tab title="4012" %}

```
{
    "error": {
        "code": 4012,
        "msg": "Bad credentials"
    }
}
```

{% endtab %}

{% tab title="4010" %}

```
{
    "error": {
        "code": 4010,
        "msg": "Not Authenticated"
    }
}
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="403" %}
Использование неподходящего токена.

```
{
    "error": {
        "code": 4030,
        "msg": "Access Denied"
    }
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Данный запрос завершает создание рассылки: после его выполнения в рассылку не могут добавляться сообщения.
{% endhint %}


---

# 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/sending/start.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.
