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"
]
}'<br>l<br>>> {"type": "error", "error": {"fields": {"events": ["\"pullrequest:merged\" is not a valid hook event"]}, "message": "Bad request"}}