I can create a webhook manually for 'pullrequest:merged' using Bitbucket cloud console but when I try the same using Bitbucket cloud rest API it gives event not found error
$ curl -X POST -u credentials -H 'Content-Type: application/json' https://api.bitbucket.org/2.0/repositories/username/slug/hooks -d '
{
"description": "Webhook Description",
"url": "https://example.com/",
"active": true,
"events": [
"pullrequest:merged"
]
}'
l
>> {"type": "error", "error": {"fields": {"events": ["\"pullrequest:merged\" is not a valid hook event"]}, "message": "Bad request"}}
Resolved it. I had to use "pullrequest:fulfilled" instead of "pullrequest:merged".....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.