27 lines
659 B
JSON
27 lines
659 B
JSON
[
|
|
{
|
|
"url": "/v1/webhooks",
|
|
"method": "GET",
|
|
"response": {
|
|
"valid": "{{!body.data.url || body.data.url == webhook.url}}",
|
|
"error": {
|
|
"type": "InconsistencyError",
|
|
"message": "This account already sends these notifications to another address. The API keeps one address per account: remove that webhook first, then try again."
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"url": "/v1/webhooks",
|
|
"method": "PUT",
|
|
"body": {
|
|
"url": "{{webhook.url}}",
|
|
"events": "{{parameters.events}}",
|
|
"rotate_secret": true
|
|
},
|
|
"response": {
|
|
"data": {
|
|
"externalHookId": "{{body.data.url}}"
|
|
}
|
|
}
|
|
}
|
|
]
|