> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tembo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Bitbucket

> Pull requests and code changes in your Bitbucket workspace.

<Frame>
  <img src="https://mintcdn.com/test-8862363a/ZNDzs01gTiL6UMVz/images/integrations/bitbucket.png?fit=max&auto=format&n=ZNDzs01gTiL6UMVz&q=85&s=442d544ff2939083bdc31ed1dda67293" alt="Bitbucket" width="2560" height="1440" data-path="images/integrations/bitbucket.png" />
</Frame>

## Features

* Open pull requests with code changes
* Respond to PR feedback and iterate
* Draft PR support with automatic branch cleanup
* Multi-workspace repository sync

## Installation

<Steps>
  <Step title="Create service user">
    Create a dedicated Bitbucket account for Tembo using an email alias (`you+tembo@company.com`) or dedicated email. Invite it to your workspace.
  </Step>

  <Step title="Install">
    Go to [Integrations](https://app.tembo.io/integrations) and click **Install** next to Bitbucket. Log in as the Tembo service account.
  </Step>

  <Step title="Activate">
    Select which repositories Tembo should work with.
  </Step>
</Steps>

## Usage

### PR comments

Add `/tembo` in any pull request comment to request changes. Tembo reads the feedback, updates the code, and pushes new commits.

```
/tembo Please add error handling to this function
```

Works on PRs created by Tembo and PRs created by your team.

## Agents

See [Agents](/features/agents) for available Bitbucket event triggers.

## Advanced

<AccordionGroup>
  <Accordion title="Repositories not appearing">
    Wait 2-5 minutes for initial sync. Click the sync button to refresh. Verify the service user has workspace access.
  </Accordion>

  <Accordion title="PRs not being created">
    Check that the repository is activated and branch protection rules allow Tembo to create branches.
  </Accordion>

  <Accordion title="Authentication errors">
    Ensure the service user has proper permissions and workspace membership. Try disconnecting and reconnecting.
  </Accordion>
</AccordionGroup>
