Zulip supports both Git and Mercurial notifications from Bitbucket. This integration is for the new-style Bitbucket webhooks used by the Bitbucket SAAS service.

First, create the stream you'd like to use for Bitbucket notifications, and subscribe all interested parties to this stream. The integration will use the default stream bitbucket if no stream is supplied in the hook; you still need to create the stream even if you are using this default.

The URL you create will be in the following format:

{{ external_api_uri_subdomain }}/v1/external/bitbucket2?api_key=abcdefgh&stream=bitbucket

where api_key is the API key of your Zulip bot, and stream is the stream name you want the notifications sent to.

You can also limit the notifications you receive to specific branches by specifying them in a comma-separated list at the end of the URL, like so:

{{ external_api_uri_subdomain }}/v1/external/bitbucket2?api_key=abcdefgh&stream=bitbucket&branches=master,development

Next, from your repository's web page, go to the Settings page and choose Webhooks on the left-hand side. Click Add webhook, set URL to the URL you created above. Remember to click the 'active' checkbox. Click Save.

Congratulations! You're done!
Example message: