Создает новый вебхук.

URL ресурса

https://Your project.userecho.com/api/v2/hooks.json

Параметры

Параметр Значение Обязательный? По умолчанию Опции Описание
event String yes Get available events with GET hooks/events Тип события
target_url String yes URL-адрес, который будет вызываться

Пример запроса

{
    "event": "topic.created",
    "target_url": "https://mysite.com/events/handler/"
}

Пример ответа

{
    "target_url": "https://mysite.com/events/handler/", 
    "id": 12, 
    "events": {
        "comment.created": true, 
        "topic.satisfaction_received": false, 
        "comment.accepted": false, 
        "topic.deleted": false, 
        "topic.created": false, 
        "comment.deleted": false, 
        "topic.accepted": false
    }
}