> For the complete documentation index, see [llms.txt](https://docs.fstrk.io/knowledge_base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fstrk.io/knowledge_base/intagrations/sobstvennaya-crm-and-cdp-new/podpiska-na-vebkhuki.md).

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

Для получения вебхуков необходимо зарегистрировать 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 %}
