# Подписка на вебхуки

Для получения вебхуков необходимо зарегистрировать URL и подписаться на события.

{% code overflow="wrap" %}

```
curl -X 'PUT' \  
'https://dashboard.fstrk.io/api/partners/integrations/credentials/' \  
-H 'accept: application/json' \  
-H 'Authorization: Bearer <ваш_токен>' \  
-H 'Content-Type: application/json; camelcase=1' \  
-d '{    
    "webhook_url": "https://your-domain.com/webhook",
    "webhook_events": [
        "message_created",
        "message_updated",
        "operator_replied",
        "session_updated"
    ],    
    "webhook_platforms": [
        "Telegram",
        "Facebook",
        "Instagram",
        "Viber",
        "Whatsapp",
        "Vkontakte",
        "Widget",
        "Odnoklassniki",
        "Email",
        "API_Messenger",
        "Avito",
        "Auto_Ru",
        "Max",
        "Ozon",
        "Telegram_Personal",
        "Max_Personal"
        ]
}'
```

{% endcode %}

<details>

<summary><strong>Описание параметров</strong></summary>

* webhook\_url — адрес на который нужно отправлять вебхуки
* webhook\_events  — события, вебхуки на которые нужно отправлять
* webhook\_platforms — список платформ/мессенджеров события которых нужно отправлять

</details>

{% hint style="info" %}
Актуальный список webhook\_events  и webhook\_platforms доступен в [Swagger](https://dashboard.fstrk.io/api/partners/docs/#/01.%20%D0%9C%D0%B5%D1%82%D0%BE%D0%B4%D1%8B%20%D0%B4%D0%BB%D1%8F%20%D0%B8%D0%BD%D1%82%D0%B5%D0%B3%D1%80%D0%B0%D1%86%D0%B8%D0%B8/integrations_credentials_update)
{% 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://docs.fstrk.io/knowledge_base/intagrations/sobstvennaya-crm-and-cdp-new/podpiska-na-vebkhuki.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.
