Skip to main content
The Bitbucket integration with Corgea enables you to scan projects and create pull requests for code fixes directly from the Corgea platform.
1

Create a Dedicated User for Corgea (Optional)

While not required, we recommend creating a dedicated Bitbucket user account for Corgea integration. This helps distinguish Corgea’s automated actions from your personal account activity and provides better auditability.
The Bitbucket account that generates the API token must be a workspace admin. Webhook scopes require admin access, and a user can only grant a token the permissions they already have. If you create a dedicated Corgea user, assign that user workspace admin access first. Otherwise, generate the token from an existing workspace admin account.
2

Generate an API Access Token

Navigate to the Atlassian API Tokens page and click “Create API token with scopes” to begin.
API tokens are not the same as workspace tokens. API tokens are associated with your Atlassian user account. You can generate and manage your personal API tokens from the link provided above. Generate this token while signed in as a workspace admin — Bitbucket only lets you assign webhook scopes if your account already has permission to manage webhooks.
Provide a descriptive name for your token and set the expiration date to one year from today. This ensures the token remains valid for an extended period while maintaining security best practices.
Select Bitbucket from the applications list to grant Bitbucket access to this token.
Configure the required scopes for Corgea integration. Enable the following scopes:
Review your configuration and click “Create token” to generate the access token.
After the token is created, click the copy button to copy the token value. You’ll need this token in the next step, and it won’t be displayed again.
3

Configure Bitbucket Integration in Corgea

Access your Corgea dashboard at corgea.app or {your-instance}.corgea.app and go to Settings → Automation → Integrations.
In the “Code Repository Integrations” section, locate Bitbucket and click the plus (+) icon to create a new integration.
Complete the integration form with the following information:
  • Workspace slug: Your Bitbucket workspace identifier
  • Email address: The email associated with the Bitbucket account used to generate the API token
  • Access token: The API token you copied in the previous step
  • Integration name (optional): A custom name to identify this integration if you manage multiple Bitbucket workspaces
Corgea validates your credentials automatically. If any information is incorrect, you’ll receive an error message with details about what needs to be corrected.
Upon successful validation, you’ll see a confirmation message indicating that the integration is complete. Webhooks are automatically configured during this process, so no manual webhook setup is required. You can view the integration details, including webhook status, from the integrations page.