HomeGuidesAPI ReferenceChangelogDiscussions
HomeLog In
Guides

Update Webhook

Function

To update a specific subscribed webhook by id
以id更新一個已訂閱的webhook

URL

PUT <<api_domain>>/v1/webhooks/:id

Request parameters

ParameterTypeDescriptionExample
addressStringURL to receive the webhook
接收Webhook的URL
"address": "http://abc.com/webhooks"
topicsString[]Events that trigger the webhook
誘發webhook的事件
---
Topic lists
可以訂閱的 topic 清單
"topics": [ "order/create" ]
curl --location --request PUT 'https://open.shoplineapp.com/v1/webhooks/5fcf3c84d9454d0038be2f43' \
--header 'Authorization: Bearer d5537cf89992206433b38766fde925567390b56b79fc301da6393c2116e6a3b3' \
--header 'Content-Type: application/json' \
--data-raw '{
    "topics": [
        "user/remove"
    ]
}'

Response example

{
    "id": "5fcf3c84d9454d0038be2f43",
    "format": "json",
    "address": "http://abc1.com/webhooks",
    "status": "active",
    "merchant_id": "5e840cae77cb07003243f7c7",
    "created_at": "2020-12-08T08:42:44.034+00:00",
    "updated_at": "2020-12-08T08:47:29.094+00:00",
    "topics": [
        "user/remove"
    ]
}