> ## Documentation Index
> Fetch the complete documentation index at: https://nango-wari-migrated-bigcommerce-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Bitbucket

## Overview

<CardGroup cols={3}>
  <Card title="Pre-built tooling" icon="screwdriver-wrench" href="#pre-built-tooling" />

  <Card title="Pre-built integrations" icon="square-check" href="#pre-built-integrations" />

  <Card title="Access requirements" icon="triangle-exclamation" href="#access-requirements" />

  <Card title="Setup guide" icon="rocket" href="#setup-guide" />

  <Card title="Useful links" icon="circle-info" href="#useful-links" />

  <Card title="API gotchas" icon="biohazard" href="#api-gotchas" />
</CardGroup>

## Pre-built tooling

<AccordionGroup>
  <Accordion title="✅ Authorization">
    | Tools                           | Status |
    | ------------------------------- | ------ |
    | Pre-built authorization (OAuth) | ✅      |
    | Credentials auto-refresh        | ✅      |
    | Pre-built authorization UI      | ✅      |
    | Custom authorization UI         | ✅      |
    | Expired credentials detection   | ✅      |
  </Accordion>

  <Accordion title="✅ Read & write data">
    | Tools                                     | Status                         |
    | ----------------------------------------- | ------------------------------ |
    | Pre-built integrations                    | ✅                              |
    | API unification                           | ✅                              |
    | 2-way sync                                | ✅                              |
    | Webhooks from Nango on data modifications | ✅                              |
    | Real-time webhooks from 3rd-party API     | 🚫 (time to contribute: \<48h) |
    | Proxy requests                            | ✅                              |
  </Accordion>

  <Accordion title="✅ Observability & data quality">
    | Tools                   | Status |
    | ----------------------- | ------ |
    | HTTP request logging    | ✅      |
    | End-to-end type safety  | ✅      |
    | Data runtime validation | ✅      |
    | OpenTelemetry export    | ✅      |
    | Slack alerts on errors  | ✅      |
    | Integration status API  | ✅      |
  </Accordion>

  <Accordion title="✅ Customization">
    | Tools                              | Status                         |
    | ---------------------------------- | ------------------------------ |
    | Create or customize use-cases      | ✅                              |
    | Pre-configured pagination          | 🚫 (time to contribute: \<48h) |
    | Pre-configured rate-limit handling | 🚫 (time to contribute: \<48h) |
    | Per-customer configurations        | ✅                              |
  </Accordion>
</AccordionGroup>

### Others

| Function name                  | Description                                                 | Type                                           | Source code                                                                                                                            |
| ------------------------------ | ----------------------------------------------------------- | ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `create-branch`                | Create a branch in a repository                             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/create-branch.ts)                |
| `create-pr-comment`            | Add a comment to a pull request                             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/create-pr-comment.ts)            |
| `create-project`               | Create a project in a workspace                             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/create-project.ts)               |
| `create-pull-request`          | Create a pull request.                                      | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/create-pull-request.ts)          |
| `create-repository`            | Create a repository in a workspace.                         | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/create-repository.ts)            |
| `create-webhook`               | Create a webhook on a repository                            | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/create-webhook.ts)               |
| `decline-pull-request`         | Decline (reject) a pull request.                            | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/decline-pull-request.ts)         |
| `delete-branch`                | Delete a branch from a repository                           | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/delete-branch.ts)                |
| `delete-repository`            | Delete a repository.                                        | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/delete-repository.ts)            |
| `delete-webhook`               | Delete a repository webhook                                 | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/delete-webhook.ts)               |
| `get-commit`                   | Retrieve a single commit.                                   | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/get-commit.ts)                   |
| `get-current-user`             | Retrieve the authenticated user's profile                   | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/get-current-user.ts)             |
| `get-project`                  | Retrieve a project in a workspace.                          | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/get-project.ts)                  |
| `get-repository`               | Retrieve a repository.                                      | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/get-repository.ts)               |
| `get-workspace`                | Retrieve a Bitbucket workspace.                             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/get-workspace.ts)                |
| `list-branches`                | List branches for a repository                              | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/list-branches.ts)                |
| `list-commits`                 | List commits for a repository.                              | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/list-commits.ts)                 |
| `list-deployment-environments` | List deployment environments for a repository               | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/list-deployment-environments.ts) |
| `list-pipelines`               | List pipelines for a repository                             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/list-pipelines.ts)               |
| `list-pr-activity`             | List the activity log for all pull requests in a repository | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/list-pr-activity.ts)             |
| `list-pr-comments`             | List comments on a pull request                             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/list-pr-comments.ts)             |
| `list-projects`                | List projects in a workspace                                | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/list-projects.ts)                |
| `list-pull-requests`           | List pull requests for a repository                         | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/list-pull-requests.ts)           |
| `list-repositories`            | List repositories in a workspace                            | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/list-repositories.ts)            |
| `list-tags`                    | List tags for a repository                                  | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/list-tags.ts)                    |
| `list-watchers`                | List users watching a repository                            | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/list-watchers.ts)                |
| `list-webhooks`                | List webhooks on a repository.                              | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/list-webhooks.ts)                |
| `list-workspace-members`       | List all members of a workspace.                            | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/list-workspace-members.ts)       |
| `list-workspaces`              | List workspaces the authenticated user belongs to.          | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/list-workspaces.ts)              |
| `merge-pull-request`           | Merge a pull request                                        | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/merge-pull-request.ts)           |
| `update-project`               | Update a workspace project.                                 | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/update-project.ts)               |
| `update-pull-request`          | Update a pull request.                                      | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/update-pull-request.ts)          |
| `update-repository`            | Update repository metadata.                                 | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/update-repository.ts)            |
| `update-webhook`               | Update a repository webhook.                                | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/actions/update-webhook.ts)               |
| `branches`                     | Sync branches per repository                                | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/syncs/branches.ts)                       |
| `commits`                      | Sync commits per repository                                 | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/syncs/commits.ts)                        |
| `pipelines`                    | Sync pipeline runs per repository                           | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/syncs/pipelines.ts)                      |
| `pull-requests`                | Sync pull requests per repository                           | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/syncs/pull-requests.ts)                  |
| `repositories`                 | Sync repositories in a workspace                            | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/syncs/repositories.ts)                   |
| `tags`                         | Sync tags per repository.                                   | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/syncs/tags.ts)                           |
| `workspace-members`            | Sync members of a workspace                                 | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/syncs/workspace-members.ts)              |
| `workspaces`                   | Sync workspaces the authenticated user belongs to.          | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/bitbucket/syncs/workspaces.ts)                     |

## Access requirements

| Pre-Requisites    | Status | Comment |
| ----------------- | ------ | ------- |
| Paid dev account  | ❓      |         |
| Paid test account | ❓      |         |
| Partnership       | ❓      |         |
| App review        | ❓      |         |
| Security audit    | ❓      |         |

## Setup guide

*No setup guide yet.*

<Tip>Need help getting started? Get help in the [community](https://nango.dev/slack).</Tip>

<Note>Contribute improvements to the setup guide by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/bitbucket.mdx)</Note>

## Useful links

* [How to register an Application](https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/#Create-a-consumer)
* [OAuth-related docs](https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/)
* [List of OAuth scopes](https://developer.atlassian.com/cloud/bitbucket/rest/intro/#authentication)
* [Web API docs (their REST API)](https://developer.atlassian.com/cloud/bitbucket/rest/intro/#authentication_old)

<Note>Contribute useful links by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/bitbucket.mdx)</Note>

## API gotchas

* Access tokens expires after every 2hours, you can use `nango.getConnection()` to generate a new set of tokens.

<Note>Contribute API gotchas by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/bitbucket.mdx)</Note>
