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

# Bitbucket

## Overview

> [card] [Pre-built tooling](#pre-built-tooling)

> [card] [Pre-built integrations](#pre-built-integrations)

> [card] [Access requirements](#access-requirements)

> [card] [Setup guide](#setup-guide)

> [card] [Useful links](#useful-links)

> [card] [API gotchas](#api-gotchas)

## Pre-built tooling

> [accordion] ✅ Authorization
>
> | Tools | Status |
> | - | - |
> | Pre-built authorization (OAuth) | ✅ |
> | Credentials auto-refresh | ✅ |
> | Pre-built authorization UI | ✅ |
> | Custom authorization UI | ✅ |
> | Expired credentials detection | ✅ |

> [accordion] ✅ 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] ✅ 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] ✅ 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 | ✅ |

### Others

| Function name | Description | Type |
| - | - | - |
| `create-branch` | Create a branch in a repository | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-pr-comment` | Add a comment to a pull request | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-project` | Create a project in a workspace | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-pull-request` | Create a pull request. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-repository` | Create a repository in a workspace. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-webhook` | Create a webhook on a repository | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `decline-pull-request` | Decline (reject) a pull request. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-branch` | Delete a branch from a repository | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-repository` | Delete a repository. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-webhook` | Delete a repository webhook | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-commit` | Retrieve a single commit. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-current-user` | Retrieve the authenticated user's profile | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-project` | Retrieve a project in a workspace. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-repository` | Retrieve a repository. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-workspace` | Retrieve a Bitbucket workspace. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-branches` | List branches for a repository | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-commits` | List commits for a repository. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-deployment-environments` | List deployment environments for a repository | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-pipelines` | List pipelines for a repository | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-pr-activity` | List the activity log for all pull requests in a repository | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-pr-comments` | List comments on a pull request | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-projects` | List projects in a workspace | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-pull-requests` | List pull requests for a repository | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-repositories` | List repositories in a workspace | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-tags` | List tags for a repository | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-watchers` | List users watching a repository | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-webhooks` | List webhooks on a repository. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-workspace-members` | List all members of a workspace. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-workspaces` | List workspaces the authenticated user belongs to. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `merge-pull-request` | Merge a pull request | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-project` | Update a workspace project. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-pull-request` | Update a pull request. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-repository` | Update repository metadata. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-webhook` | Update a repository webhook. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `branches` | Sync branches per repository | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `commits` | Sync commits per repository | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `pipelines` | Sync pipeline runs per repository | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `pull-requests` | Sync pull requests per repository | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `repositories` | Sync repositories in a workspace | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `tags` | Sync tags per repository. | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `workspace-members` | Sync members of a workspace | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `workspaces` | Sync workspaces the authenticated user belongs to. | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |

> [!NOTE]
>
> Nango has a [Nango-managed OAuth app](https://nango.dev/docs/guides/auth/auth-guide.md#nango-managed-oauth-apps) you can use in development and production. Select it when you create the integration.

## 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).

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

## 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)

## 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)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.