- Automated code reviews for newly created pull requests
- Intelligent comments and suggestions displayed directly on pull requests
- Real-time bot interaction for immediate feedback and assistance
- Seamless webhook integration for continuous monitoring
@coderabbitai â or the username of the service account you configure below, if it differs.Configure API Token
To enable CodeRabbit to interact with your Bitbucket repositories, you need to configure an API token. This token grants the necessary permissions for interacting with the Bitbucket pull request and discussion APIs.Create a CodeRabbit service account
Configure account settings
- Name the account âCodeRabbitâ for easy identification
- Use a dedicated email address for this service account
- If your Bitbucket workspace requires two-step verification, enable it on this account as well
Generate API token
Best practices for service account setup
Account Configuration
- Use âCodeRabbitâ as the username for easy recognition
- Use a dedicated email address for management
- Use the CodeRabbit logo as the profile picture (download here)
Access Control
- Grant developer access to target projects
- Ensure workspace membership for the service account
- Enable two-factor authentication if required by workspace
Generate an API token
Bitbucket provides an option to generate an API token for your CodeRabbit service account. Follow these steps:Log in to your service account
Navigate to API tokens
Configure token details
- Enter a recognizable name for this API token (e.g., âCodeRabbit Integrationâ)
- Set an expiration date based on your security policy
- On the next step, select Bitbucket
Select required scopes
Generate and save token
- Click Create
- Important: Copy and securely store the API token immediately as it will only be displayed once
Configure API token in CodeRabbit
You can provide your API token to CodeRabbit in two ways:- During Installation
- Pre-configure Token
Install CodeRabbit in your repositories
Once your API token is configured, you can install CodeRabbit in your Bitbucket repositories.Access repository settings
Select repositories
- Check the boxes next to specific repositories where you want to install CodeRabbit
- To install on all repositories at once, select the checkbox at the top
Install repositories

https://coderabbit.ai/bitbucketHandler will be automatically installed for
the selected projects, enabling CodeRabbit to monitor and review your pull
requests.
Manual webhook installation
If you install repositories from the Repositories page, CodeRabbit configures the webhook automatically. Use this flow only when you need to install the webhook manually or rotate the shared webhook secret. The Webhook Secret page is available to Bitbucket organizations with organization settings access.Open Webhook Secret settings
Copy the webhook URL
Save or change the webhook secret
Configure the Bitbucket webhook
- Opened
- Modified
- Comment Added
Configure network access
If your instance requires IP allowlisting, add these CodeRabbit IP addresses to your firewall:Troubleshooting
If you encounter issues during setup or operation, here are common solutions:Webhook Issues
Webhook Issues
- Check webhook status in your Bitbucket repository settings
- Manually delete the webhook if it exists but isnât working
- Refresh the repository page in the CodeRabbit app
- Reinstall the webhook using the CodeRabbit interface
Webhook secret mismatch
Webhook secret mismatch
- Confirm the webhook secret in Bitbucket matches the value saved on CodeRabbitâs Webhook Secret page
- Update manually created webhooks directly in Bitbucket after rotating the secret
- Review skipped or failed refreshes reported by CodeRabbit and update those repository webhooks directly
Installation Problems
Installation Problems
- Verify permissions: Ensure your Bitbucket service account has the necessary permissions
- Check API token: Confirm the API token is properly configured with all required scopes
- Validate account access: Ensure the service account has developer access to target repositories
Authentication Errors
Authentication Errors
- Regenerate API token with the correct scopes
- Update token in CodeRabbit Organization Settings
- Verify service account has workspace membership