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".....
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.