BlogBitbucket Webhooks

How to Test Bitbucket Webhooks

Bitbucket webhooks deliver repository, pull request, and pipeline events so CI/CD and project tools can react to code changes.

Bitbucket Official Webhook Docs

1. Bitbucket Webhook Events

Bitbucket can send the following webhook events to your endpoint:

repo:push
repo:commit_status_updated
pullrequest:created
pullrequest:updated
pullrequest:approved
pullrequest:fulfilled
pipeline:step_completed

2. Set Up a Test Endpoint with HookRay

Follow these steps to start receiving Bitbucket webhooks for testing:

  1. Go to HookRay and click "Start Testing — Free" to get your unique webhook URL.
  2. Copy the URL (e.g., https://h.hookray.com/abc123).
  3. In your Bitbucket dashboard, navigate to the webhook settings and paste the HookRay URL as your endpoint.
  4. Select the events you want to receive (see list above).
  5. Trigger a test event — HookRay will show the incoming webhook in real-time.

3. Sample Bitbucket Webhook Payload

Here's an example of what a Bitbucket webhook payload looks like:

payload.json
{
  "actor": {
    "display_name": "dev-user",
    "uuid": "{abc-123}"
  },
  "repository": {
    "full_name": "acme/hookray",
    "type": "repository"
  },
  "push": {
    "changes": [
      {
        "new": {
          "name": "main",
          "type": "branch",
          "target": {
            "hash": "abc123def456"
          }
        }
      }
    ]
  }
}

4. Common Issues & Troubleshooting

Webhook not arriving?

Check that your endpoint URL is correct and publicly accessible. Bitbucket cannot reach localhost URLs — use HookRay's cloud URL instead.

Getting 400 or 500 errors?

HookRay accepts any payload and returns 200 OK by default, so the issue is likely on Bitbucket's side. Check your webhook configuration and event selection.

Need to verify webhook signatures?

Bitbucket signs webhook requests for security. Use HookRay to capture the raw headers and body, then implement signature verification in your application code.

5. Next Steps

  • Use HookRay's webhook replay feature to re-send captured webhooks while building your handler
  • Enable smart parsing (Pro plan) to see Bitbucket-specific fields highlighted automatically
  • Check the Bitbucket webhook documentation for the complete event reference

Ready to test Bitbucket webhooks?

Get a free webhook URL in 5 seconds. No signup required.

Start Testing Bitbucket Webhooks — Free