> For the complete documentation index, see [llms.txt](https://docs.fastn.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fastn.ai/connectors/catalog/developer-tools/bitbucket.md). Agents can also search and read this documentation through its [MCP server](https://docs.fastn.ai/~gitbook/mcp).

# Bitbucket

Bitbucket is Atlassian's Git code hosting service. Manage repositories, branches, pull requests, commits and default reviewers.

![Bitbucket logo](https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-cf86143d816a6f8c90fb9448d00b1d29d857474b%2Fbitbucket.png?alt=media)

|                    |                                                                                |
| ------------------ | ------------------------------------------------------------------------------ |
| **Category**       | [Developer tools](https://docs.fastn.ai/connectors/catalog/developer-tools.md) |
| **Website**        | [bitbucket.org](https://bitbucket.org)                                         |
| **Authentication** | OAuth 2.0, Username and password                                               |
| **Slug**           | `bitbucket`                                                                    |
| **On fastn.ai**    | [Embed Bitbucket in your product](https://fastn.ai/integrations/bitbucket)     |

## Setup

Your customers sign in to Bitbucket through Fastn's own OAuth app, so nothing needs setting up first. To show your own app on the consent screen instead, add your OAuth app on the connector's **Auth** tab under **Manage providers**.

## Connect in Fastn

Your customers connect Bitbucket from your widget. To connect an account yourself:

1. Go to **Build → Integrations → Connectors** and search for **Bitbucket**.
2. Select **Connect** on the Bitbucket card.

   <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-586dd03cdc0c6904263f58928d7a531eae2f85df%2Fconnect-search.png?alt=media" alt="The Connectors page in Fastn with ServiceNow typed in the search box and the ServiceNow card showing a Connect button"><figcaption><p>Search for the connector, then select Connect on its card. ServiceNow is shown here.</p></figcaption></figure>
3. Bitbucket offers more than one sign-in method. Choose one in **Auth Method**, then:
   * For a key or credential method, fill in the fields the form asks for, using the values from [Setup](#setup) above. Then select **Connect**.

     <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-51fb88ef328c525b5b11f8d7094bab11efc333b8%2Fconnect-credentials.png?alt=media" alt="The Connect ServiceNow dialog with an optional account name and the Instance, Username and Password fields, and Cancel and Connect buttons"><figcaption><p>A connect form that asks for credentials. Each connector asks for its own fields.</p></figcaption></figure>
   * For OAuth 2.0, keep the **Default** auth provider, or choose your own OAuth app if you added one. Pick the **Scopes** you need, select **Authorize**, then sign in to Bitbucket and approve access in the window that opens.

     <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-0e2bbdd7109cec207402cf6883484b8525b7fbf5%2Fconnect-oauth.png?alt=media" alt="The Connect Salesforce dialog for OAuth 2.0 with the Default auth provider, an optional account name, the Scopes selector and an Authorize button"><figcaption><p>A connect form for OAuth 2.0. Salesforce is shown here.</p></figcaption></figure>
4. Check that the connection appears under **Operate → Connections** with the status `Active`. Your workflows can now use Bitbucket's actions.

For more detail, see [Connect an app](https://docs.fastn.ai/build/integrations/connectors/connect-an-app.md).

## Actions

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Add Default Reviewer</td><td><code>addDefaultReviewer</code></td><td>Add a user as a default reviewer on a repository. Requires repository:admin scope. target_username is the user's account UUID or selected user identifier.</td></tr><tr><td>Add Project Default Reviewer</td><td><code>addProjectDefaultReviewer</code></td><td>Add a user as a default reviewer for every pull request on every repository in a project.</td></tr><tr><td>Add User GPG Key</td><td><code>createUserGpgKey</code></td><td>Add a GPG public key to a user account so Bitbucket can show commits signed with it as verified.</td></tr><tr><td>Approve Commit</td><td><code>approveCommit</code></td><td>Approve a commit as the authenticated user.</td></tr><tr><td>Approve Pull Request</td><td><code>approvePullRequest</code></td><td>Approve a pull request as the authenticated user.</td></tr><tr><td>Compare Two Commits (Diff Stat)</td><td><code>compareCommitsDiffstat</code></td><td>Return the diff stat (files changed, lines added/removed) between two commits, branches, or tags.</td></tr><tr><td>Compare Two Commits (Diff)</td><td><code>compareCommitsDiff</code></td><td>Return the raw diff between two commits, branches, or tags. Use spec formatted as "target..source" (e.g. main..feature-branch).</td></tr><tr><td>Create Branch</td><td><code>createBranch</code></td><td>Create a new branch pointing at a target commit/branch.</td></tr><tr><td>Create Branch Restriction</td><td><code>createBranchRestriction</code></td><td>Create a branch restriction.</td></tr><tr><td>Create Commit Comment</td><td><code>createCommitComment</code></td><td>Add a comment to a commit.</td></tr></tbody></table>

<details>

<summary>View 177 more actions</summary>

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Create Deploy Key</td><td><code>createDeployKey</code></td><td>Add a deploy key to a repository.</td></tr><tr><td>Create Deployment Environment Variable</td><td><code>createDeploymentVariable</code></td><td>Create a variable on a deployment environment. Requires pipeline:variable scope.</td></tr><tr><td>Create Pipeline Schedule</td><td><code>createPipelineSchedule</code></td><td>Create a pipeline schedule for a repository. Requires pipeline:write scope.</td></tr><tr><td>Create Project</td><td><code>createProject</code></td><td>Create a new project in a workspace.</td></tr><tr><td>Create Pull Request</td><td><code>createPullRequest</code></td><td>Create a pull request.</td></tr><tr><td>Create Pull Request Comment</td><td><code>createPullRequestComment</code></td><td>Add a comment to a pull request.</td></tr><tr><td>Create Pull Request Task</td><td><code>createPullRequestTask</code></td><td>Create a to-do task on a pull request, optionally attached to a specific comment.</td></tr><tr><td>Create Repository</td><td><code>createRepository</code></td><td>Create a new repository in a workspace.</td></tr><tr><td>Create Repository Environment</td><td><code>createRepositoryEnvironment</code></td><td>Create a deployment environment for a repository. Requires repository:admin scope.</td></tr><tr><td>Create Repository Pipeline Variable</td><td><code>createRepoPipelineVariable</code></td><td>Create a repository-level pipeline variable. Requires pipeline:variable scope.</td></tr><tr><td>Create Repository Runner</td><td><code>createRepositoryRunner</code></td><td>Create/register a pipeline runner against a repository. Requires runner:write scope.</td></tr><tr><td>Create Snippet</td><td><code>createSnippet</code></td><td>Create a snippet under a workspace. Files are sent as multipart form data; pass title and is_private.</td></tr><tr><td>Create Source File Commit</td><td><code>createSrcFileCommit</code></td><td>Create a commit by uploading a file to the repository source. Uses application/x-www-form-urlencoded with message, branch, and a file path key whose value is the file content. Required to seed a default branch and commit pipeline configs.</td></tr><tr><td>Create Tag</td><td><code>createTag</code></td><td>Create a new tag pointing at a target commit.</td></tr><tr><td>Create User SSH Key</td><td><code>createUserSshKey</code></td><td>Add an SSH key to a user account. Requires account:write scope.</td></tr><tr><td>Create Webhook</td><td><code>createWebhook</code></td><td>Create a webhook subscription on a repository. Used by webhook subscription code.</td></tr><tr><td>Create Workspace Pipeline Variable</td><td><code>createWorkspacePipelineVariable</code></td><td>Create a workspace-level pipeline variable. Requires pipeline:variable scope.</td></tr><tr><td>Create Workspace Runner</td><td><code>createWorkspaceRunner</code></td><td>Create/register a pipeline runner against a workspace. Requires runner:write scope.</td></tr><tr><td>Create Workspace Webhook</td><td><code>createWorkspaceWebhook</code></td><td>Create a workspace-level webhook subscription.</td></tr><tr><td>Decline Pull Request</td><td><code>declinePullRequest</code></td><td>Decline (reject) a pull request.</td></tr><tr><td>Delete Branch</td><td><code>deleteBranch</code></td><td>Delete a branch.</td></tr><tr><td>Delete Branch Restriction</td><td><code>deleteBranchRestriction</code></td><td>Delete a branch restriction by ID. Requires repository:admin scope.</td></tr><tr><td>Delete Commit Comment</td><td><code>deleteCommitComment</code></td><td>Delete a comment on a commit.</td></tr><tr><td>Delete Deploy Key</td><td><code>deleteDeployKey</code></td><td>Delete a repository deploy key by ID. Requires repository:admin scope.</td></tr><tr><td>Delete Deployment Environment Variable</td><td><code>deleteDeploymentVariable</code></td><td>Delete a deployment environment variable by UUID. Requires pipeline:variable scope.</td></tr><tr><td>Delete Download Artifact</td><td><code>deleteDownloadArtifact</code></td><td>Delete a download artifact from a repository's Downloads section.</td></tr><tr><td>Delete Pipeline Schedule</td><td><code>deletePipelineSchedule</code></td><td>Delete a pipeline schedule by UUID. Requires pipeline:write scope.</td></tr><tr><td>Delete Project</td><td><code>deleteProject</code></td><td>Delete a project.</td></tr><tr><td>Delete Pull Request Comment</td><td><code>deletePullRequestComment</code></td><td>Delete a pull request comment.</td></tr><tr><td>Delete Pull Request Task</td><td><code>deletePullRequestTask</code></td><td>Delete a to-do task from a pull request.</td></tr><tr><td>Delete Repository</td><td><code>deleteRepository</code></td><td>Delete a repository.</td></tr><tr><td>Delete Repository Environment</td><td><code>deleteRepositoryEnvironment</code></td><td>Delete a deployment environment by UUID. Requires repository:admin scope.</td></tr><tr><td>Delete Repository Group Permission Config</td><td><code>deleteRepoGroupPermissionConfig</code></td><td>Remove a group's explicit access grant from a repository.</td></tr><tr><td>Delete Repository Pipeline Variable</td><td><code>deleteRepoPipelineVariable</code></td><td>Delete a repository-level pipeline variable by UUID. Requires pipeline:variable scope.</td></tr><tr><td>Delete Repository Runner</td><td><code>deleteRepositoryRunner</code></td><td>Delete a repository pipeline runner by UUID. Requires runner:write scope.</td></tr><tr><td>Delete Repository User Permission</td><td><code>deleteRepositoryUserPermission</code></td><td>Remove a user's explicit permission from a repository. Requires repository:admin scope.</td></tr><tr><td>Delete Snippet</td><td><code>deleteSnippet</code></td><td>Delete a snippet.</td></tr><tr><td>Delete User GPG Key</td><td><code>deleteUserGpgKey</code></td><td>Remove a GPG key from a user account.</td></tr><tr><td>Delete User SSH Key</td><td><code>deleteUserSshKey</code></td><td>Delete an SSH key from a user account by UUID. Requires account:write scope.</td></tr><tr><td>Delete Webhook</td><td><code>deleteWebhook</code></td><td>Delete a webhook subscription. Used by webhook unsubscription code.</td></tr><tr><td>Delete Workspace Pipeline Variable</td><td><code>deleteWorkspacePipelineVariable</code></td><td>Delete a workspace-level pipeline variable by UUID. Requires pipeline:variable scope.</td></tr><tr><td>Delete Workspace Runner</td><td><code>deleteWorkspaceRunner</code></td><td>Delete a workspace pipeline runner by UUID. Requires runner:write scope.</td></tr><tr><td>Delete Workspace Webhook</td><td><code>deleteWorkspaceWebhook</code></td><td>Delete a workspace-level webhook subscription.</td></tr><tr><td>Fork Repository</td><td><code>forkRepository</code></td><td>Create a fork of a repository. Optionally target a workspace and new name.</td></tr><tr><td>Get Branch</td><td><code>getBranch</code></td><td>Get a single branch by name.</td></tr><tr><td>Get Branch Restriction</td><td><code>getBranchRestriction</code></td><td>Get a single branch restriction by ID. Requires repository:admin scope.</td></tr><tr><td>Get Branching Model</td><td><code>getBranchingModel</code></td><td>Get the branching model configured for a repository.</td></tr><tr><td>Get Branching Model Settings</td><td><code>getBranchingModelSettings</code></td><td>Get the branching model configuration (development/production branch overrides, branch type prefixes) for a repository.</td></tr><tr><td>Get Commit</td><td><code>getCommit</code></td><td>Get a single commit by hash.</td></tr><tr><td>Get Commit Comment</td><td><code>getCommitComment</code></td><td>Get a single comment on a commit by id.</td></tr><tr><td>Get Current User</td><td><code>getCurrentUser</code></td><td>Get the currently authenticated user account.</td></tr><tr><td>Get Deploy Key</td><td><code>getDeployKey</code></td><td>Get a single repository deploy key by ID. Requires repository:admin scope.</td></tr><tr><td>Get Deployment</td><td><code>getDeployment</code></td><td>Get a single deployment by deployment UUID.</td></tr><tr><td>Get Download Artifact Link</td><td><code>getDownloadArtifact</code></td><td>Get the download link and metadata for a single download artifact on a repository.</td></tr><tr><td>Get Effective Branching Model</td><td><code>getEffectiveBranchingModel</code></td><td>Get the branching model actually applied to a repository, after merging repository and project-level overrides.</td></tr><tr><td>Get Merge Base</td><td><code>getMergeBase</code></td><td>Return the common ancestor commit between two commits, branches, or tags.</td></tr><tr><td>Get Pipeline</td><td><code>getPipeline</code></td><td>Get a pipeline run by UUID.</td></tr><tr><td>Get Pipeline Schedule</td><td><code>getPipelineSchedule</code></td><td>Get a pipeline schedule by UUID. Requires pipeline scope.</td></tr><tr><td>Get Pipeline Step</td><td><code>getPipelineStep</code></td><td>Get a single pipeline step by step UUID.</td></tr><tr><td>Get Pipeline Step Log</td><td><code>getPipelineStepLog</code></td><td>Get the log output of a pipeline step. Returns raw log text.</td></tr><tr><td>Get Project</td><td><code>getProject</code></td><td>Get a project in a workspace by project key.</td></tr><tr><td>Get Project Branching Model</td><td><code>getProjectBranchingModel</code></td><td>Get the branching model configured at the project level, inherited by repositories that do not override it.</td></tr><tr><td>Get Project Branching Model Settings</td><td><code>getProjectBranchingModelSettings</code></td><td>Get the branching model configuration override stored on a project.</td></tr><tr><td>Get Project Default Reviewer</td><td><code>getProjectDefaultReviewer</code></td><td>Get a single default reviewer configured on a project.</td></tr><tr><td>Get Pull Request</td><td><code>getPullRequest</code></td><td>Get a single pull request.</td></tr><tr><td>Get Pull Request Comment</td><td><code>getPullRequestComment</code></td><td>Get a single pull request comment by comment id.</td></tr><tr><td>Get Pull Request Conflicts</td><td><code>getPullRequestConflicts</code></td><td>Return the list of file conflicts that would occur if this pull request were merged right now.</td></tr><tr><td>Get Pull Request Diff</td><td><code>getPullRequestDiff</code></td><td>Get the raw unified diff of a pull request. Returns text/plain.</td></tr><tr><td>Get Pull Request Diff Stat</td><td><code>getPullRequestDiffstat</code></td><td>Return the diff stat (files changed, lines added/removed per file) for a pull request, without the raw diff content.</td></tr><tr><td>Get Pull Request Merge Task Status</td><td><code>getPullRequestMergeTaskStatus</code></td><td>Poll the status of an asynchronous pull request merge task (merges can be queued when they involve large history rewrites).</td></tr><tr><td>Get Pull Request Patch</td><td><code>getPullRequestPatch</code></td><td>Return the pull request's changes as a raw git-format patch file that can be applied with git apply.</td></tr><tr><td>Get Pull Request Task</td><td><code>getPullRequestTask</code></td><td>Get a single to-do task on a pull request by id.</td></tr><tr><td>Get Raw File Content</td><td><code>getRawFileContent</code></td><td>Get the raw content of a single file at a ref. Returns the raw file body.</td></tr><tr><td>Get Repository</td><td><code>getRepository</code></td><td>Get a single repository.</td></tr><tr><td>Get Repository Environment</td><td><code>getRepositoryEnvironment</code></td><td>Get a single deployment environment by UUID. Requires repository scope.</td></tr><tr><td>Get Repository Group Permission Config</td><td><code>getRepoGroupPermissionConfig</code></td><td>Get the explicit access level granted to a specific group on a repository.</td></tr><tr><td>Get Repository Pipeline Variable</td><td><code>getRepoPipelineVariable</code></td><td>Get a single repository-level pipeline variable by UUID. Requires pipeline:variable scope.</td></tr><tr><td>Get Repository Runner</td><td><code>getRepositoryRunner</code></td><td>Get a single repository pipeline runner by UUID. Requires runner scope.</td></tr><tr><td>Get Repository Settings Inheritance</td><td><code>getRepositoryOverrideSettings</code></td><td>Get whether a repository inherits branch restrictions and merge checks from its project, or overrides them.</td></tr><tr><td>Get Snippet</td><td><code>getSnippet</code></td><td>Get a snippet by workspace and encoded ID.</td></tr><tr><td>Get Snippet Commit</td><td><code>getSnippetCommit</code></td><td>Get a specific snippet commit/revision.</td></tr><tr><td>Get Source Listing</td><td><code>getSourceListing</code></td><td>Browse the source tree (file/directory listing) at a ref and path.</td></tr><tr><td>Get Tag</td><td><code>getTag</code></td><td>Get a single tag by name.</td></tr><tr><td>Get User</td><td><code>getUser</code></td><td>Get a user account by account ID or UUID.</td></tr><tr><td>Get User Email</td><td><code>getUserEmail</code></td><td>Get details of a specific email address of the authenticated user. Requires email scope.</td></tr><tr><td>Get User GPG Key</td><td><code>getUserGpgKey</code></td><td>Get a single GPG key on a user account by fingerprint.</td></tr><tr><td>Get User Permission On Workspace</td><td><code>getUserWorkspacePermission</code></td><td>Get the authenticated user's permission level on a specific workspace.</td></tr><tr><td>Get User SSH Key</td><td><code>getUserSshKey</code></td><td>Get a single SSH key for a user by UUID. Requires account scope.</td></tr><tr><td>Get Webhook</td><td><code>getWebhook</code></td><td>Get a single webhook subscription.</td></tr><tr><td>Get Workspace</td><td><code>getWorkspace</code></td><td>Get a single workspace by slug or UUID.</td></tr><tr><td>Get Workspace GPG Public Key</td><td><code>getWorkspaceGpgPublicKey</code></td><td>Get the GPG public key(s) Bitbucket uses to sign commits made through this workspace's merge/web-edit actions.</td></tr><tr><td>Get Workspace Member</td><td><code>getWorkspaceMember</code></td><td>Get a single workspace member by user account UUID. Requires account scope / workspace membership.</td></tr><tr><td>Get Workspace Runner</td><td><code>getWorkspaceRunner</code></td><td>Get a single workspace pipeline runner by UUID. Requires runner scope.</td></tr><tr><td>Get Workspace Webhook</td><td><code>getWorkspaceWebhook</code></td><td>Get a single workspace-level webhook by uid.</td></tr><tr><td>List All Repositories</td><td><code>listAllRepositories</code></td><td>List repositories in a workspace. Replaces deprecated unscoped (HTTP 410, CHANGE-2770).</td></tr><tr><td>List Branch Restrictions</td><td><code>listBranchRestrictions</code></td><td>List branch restrictions (permissions) for a repository.</td></tr><tr><td>List Branches</td><td><code>listBranches</code></td><td>List branches in a repository.</td></tr><tr><td>List Commit Comments</td><td><code>listCommitComments</code></td><td>List comments on a commit.</td></tr><tr><td>List Commit Statuses</td><td><code>listCommitStatuses</code></td><td>List build statuses for a commit.</td></tr><tr><td>List Commits</td><td><code>listCommits</code></td><td>List commits in a repository, optionally from a branch/tag/revision.</td></tr><tr><td>List Current User Permissions Workspaces</td><td><code>listUserPermissionsWorkspaces</code></td><td>List the workspaces the authenticated user is a member of, with their permission level. Replaces deprecated (HTTP 410, CHANGE-2770).</td></tr><tr><td>List Default Reviewers</td><td><code>listDefaultReviewers</code></td><td>List default reviewers configured on a repository. Requires repository:admin scope.</td></tr><tr><td>List Deploy Keys</td><td><code>listDeployKeys</code></td><td>List deploy keys (SSH) for a repository.</td></tr><tr><td>List Deployment Environment Variables</td><td><code>listDeploymentVariables</code></td><td>List variables for a deployment environment. Requires pipeline:variable scope.</td></tr><tr><td>List Downloads</td><td><code>listDownloads</code></td><td>List download artifacts for a repository.</td></tr><tr><td>List Effective Default Reviewers</td><td><code>listEffectiveDefaultReviewers</code></td><td>List the effective default reviewers for a repository, combining reviewers set on the repository and on its project.</td></tr><tr><td>List Pipeline Schedules</td><td><code>listPipelineSchedules</code></td><td>List pipeline schedules for a repository. Requires pipeline scope.</td></tr><tr><td>List Pipeline Steps</td><td><code>listPipelineSteps</code></td><td>List the steps of a pipeline run.</td></tr><tr><td>List Pipelines</td><td><code>listPipelines</code></td><td>List pipeline runs for a repository.</td></tr><tr><td>List Project Default Reviewers</td><td><code>listProjectDefaultReviewers</code></td><td>List the default reviewers configured for a project; they are added to every pull request on every repository in the project.</td></tr><tr><td>List Pull Request Activity</td><td><code>listPullRequestActivity</code></td><td>List the activity log for a pull request (approvals, updates, comments).</td></tr><tr><td>List Pull Request Comments</td><td><code>listPullRequestComments</code></td><td>List comments on a pull request.</td></tr><tr><td>List Pull Request Commits</td><td><code>listPullRequestCommits</code></td><td>List commits on a pull request.</td></tr><tr><td>List Pull Request Statuses</td><td><code>listPullRequestStatuses</code></td><td>List commit statuses (build statuses) associated with a pull request.</td></tr><tr><td>List Pull Request Tasks</td><td><code>listPullRequestTasks</code></td><td>List the to-do tasks attached to a pull request.</td></tr><tr><td>List Pull Requests</td><td><code>listPullRequests</code></td><td>List pull requests in a repository.</td></tr><tr><td>List Pull Requests Containing Commit</td><td><code>listPullRequestsForCommit</code></td><td>List the pull requests that contain a given commit.</td></tr><tr><td>List Refs</td><td><code>listRefs</code></td><td>List all refs (branches and tags) in a repository.</td></tr><tr><td>List Repositories In Workspace</td><td><code>listRepositories</code></td><td>List repositories in a workspace.</td></tr><tr><td>List Repository Deployments</td><td><code>listRepositoryDeployments</code></td><td>List deployments for a repository. Requires repository scope.</td></tr><tr><td>List Repository Environments</td><td><code>listRepositoryEnvironments</code></td><td>List deployment environments for a repository. Requires repository scope.</td></tr><tr><td>List Repository Forks</td><td><code>listRepositoryForks</code></td><td>List forks of a repository.</td></tr><tr><td>List Repository Group Permissions</td><td><code>listRepositoryGroupPermissions</code></td><td>List explicit group permissions on a repository. Requires repository:admin scope.</td></tr><tr><td>List Repository Group Permissions Config</td><td><code>listRepoGroupPermissionsConfig</code></td><td>List the explicit group access grants configured on a repository.</td></tr><tr><td>List Repository Permissions For Workspace Repo</td><td><code>listWorkspaceSingleRepoPermissions</code></td><td>List the users and their permission level for a single repository within a workspace.</td></tr><tr><td>List Repository Pipeline Variables</td><td><code>listRepoPipelineVariables</code></td><td>List repository-level pipeline variables. Requires pipeline:variable scope.</td></tr><tr><td>List Repository Runners</td><td><code>listRepositoryRunners</code></td><td>List pipeline runners configured against a repository. Requires runner scope.</td></tr><tr><td>List Repository User Permissions</td><td><code>listRepositoryUserPermissions</code></td><td>List explicit user permissions on a repository. Requires repository:admin scope.</td></tr><tr><td>List Repository Watchers</td><td><code>listRepositoryWatchers</code></td><td>List users watching a repository.</td></tr><tr><td>List Snippet Comments</td><td><code>listSnippetComments</code></td><td>List comments on a snippet.</td></tr><tr><td>List Snippets</td><td><code>listSnippets</code></td><td>List snippets in a workspace. Replaces deprecated unscoped (HTTP 410, CHANGE-2770).</td></tr><tr><td>List Subscribable Webhook Events</td><td><code>listSubscribableWebhookEvents</code></td><td>List the specific webhook event types available for a given subject type (repository, workspace, project, etc).</td></tr><tr><td>List Tags</td><td><code>listTags</code></td><td>List tags in a repository.</td></tr><tr><td>List User Emails</td><td><code>listUserEmails</code></td><td>List email addresses for the authenticated user. Requires email scope.</td></tr><tr><td>List User GPG Keys</td><td><code>listUserGpgKeys</code></td><td>List the GPG keys registered on a user account, used to verify signed commits.</td></tr><tr><td>List User SSH Keys</td><td><code>listUserSshKeys</code></td><td>List SSH keys for a user. Requires account scope. selected_user is the account UUID or username.</td></tr><tr><td>List Webhook Resource Types</td><td><code>listWebhookResourceTypes</code></td><td>List the resource types (repository, workspace, etc.) that support webhook subscriptions.</td></tr><tr><td>List Webhooks</td><td><code>listWebhooks</code></td><td>List webhook subscriptions on a repository.</td></tr><tr><td>List Workspace Members</td><td><code>listWorkspaceMembers</code></td><td>List all members of a workspace.</td></tr><tr><td>List Workspace Permissions</td><td><code>listWorkspacePermissions</code></td><td>List the workspace memberships (users and their permission) for a workspace. Requires account scope / workspace membership.</td></tr><tr><td>List Workspace Pipeline Variables</td><td><code>listWorkspacePipelineVariables</code></td><td>List workspace-level pipeline variables. Requires pipeline:variable scope.</td></tr><tr><td>List Workspace Projects</td><td><code>listWorkspaceProjects</code></td><td>List projects in a workspace.</td></tr><tr><td>List Workspace Pull Requests For User</td><td><code>listWorkspacePullRequestsForUser</code></td><td>List the pull requests across every repository in a workspace that a given user authored, reviewed, or is a default reviewer on.</td></tr><tr><td>List Workspace Repository Permissions</td><td><code>listWorkspaceRepositoryPermissions</code></td><td>List the repository permissions for all users across a workspace. Requires account scope / workspace membership.</td></tr><tr><td>List Workspace Runners</td><td><code>listWorkspaceRunners</code></td><td>List pipeline runners configured against a workspace. Requires runner scope.</td></tr><tr><td>List Workspace Webhooks</td><td><code>listWorkspaceWebhooks</code></td><td>List workspace-level webhook subscriptions.</td></tr><tr><td>List workspaces</td><td><code>listWorkspaces</code></td><td>List workspaces the authenticated user is a member of. Replaces deprecated (HTTP 410).</td></tr><tr><td>Merge Pull Request</td><td><code>mergePullRequest</code></td><td>Merge a pull request.</td></tr><tr><td>Remove Default Reviewer</td><td><code>removeDefaultReviewer</code></td><td>Remove a default reviewer from a repository. Requires repository:admin scope.</td></tr><tr><td>Remove Project Default Reviewer</td><td><code>removeProjectDefaultReviewer</code></td><td>Remove a user from a project's default reviewers.</td></tr><tr><td>Remove Pull Request Change Request</td><td><code>removePullRequestChangeRequest</code></td><td>Remove the authenticated user's "changes requested" status from a pull request.</td></tr><tr><td>Reopen Pull Request Comment Thread</td><td><code>reopenPullRequestComment</code></td><td>Reopen a previously resolved pull request comment thread.</td></tr><tr><td>Request Changes On Pull Request</td><td><code>requestChangesPullRequest</code></td><td>Mark a pull request as needing changes (request-changes).</td></tr><tr><td>Resolve Pull Request Comment Thread</td><td><code>resolvePullRequestComment</code></td><td>Mark a pull request comment thread as resolved.</td></tr><tr><td>Search Code In Workspace</td><td><code>searchCodeInWorkspace</code></td><td>Full-text search source code across every repository in a workspace.</td></tr><tr><td>Set Build Status</td><td><code>setBuildStatus</code></td><td>Create a build status on a commit.</td></tr><tr><td>Set Repository Settings Inheritance</td><td><code>setRepositoryOverrideSettings</code></td><td>Set whether a repository overrides its project's branch restrictions and branching model, instead of inheriting them.</td></tr><tr><td>Stop Pipeline</td><td><code>stopPipeline</code></td><td>Stop a running pipeline.</td></tr><tr><td>Trigger Pipeline</td><td><code>triggerPipeline</code></td><td>Trigger (run) a pipeline for a branch/commit/custom selector.</td></tr><tr><td>Unapprove Commit</td><td><code>unapproveCommit</code></td><td>Remove the authenticated user's approval from a commit.</td></tr><tr><td>Unapprove Pull Request</td><td><code>unapprovePullRequest</code></td><td>Remove the authenticated user's approval.</td></tr><tr><td>Update Branch Restriction</td><td><code>updateBranchRestriction</code></td><td>Update a branch restriction by ID. Requires repository:admin scope.</td></tr><tr><td>Update Branching Model Settings</td><td><code>updateBranchingModelSettings</code></td><td>Update the branching model configuration for a repository.</td></tr><tr><td>Update Commit Comment</td><td><code>updateCommitComment</code></td><td>Update the text of a comment on a commit.</td></tr><tr><td>Update Pipeline Schedule</td><td><code>updatePipelineSchedule</code></td><td>Update a pipeline schedule by UUID. Requires pipeline:write scope.</td></tr><tr><td>Update Project</td><td><code>updateProject</code></td><td>Update an existing project.</td></tr><tr><td>Update Pull Request</td><td><code>updatePullRequest</code></td><td>Update an open pull request (title, description, destination, reviewers).</td></tr><tr><td>Update Pull Request Comment</td><td><code>updatePullRequestComment</code></td><td>Update the content of a pull request comment.</td></tr><tr><td>Update Pull Request Task</td><td><code>updatePullRequestTask</code></td><td>Update a pull request task's text or resolve/reopen it.</td></tr><tr><td>Update Repository</td><td><code>updateRepository</code></td><td>Update repository settings.</td></tr><tr><td>Update Repository Group Permission Config</td><td><code>updateRepoGroupPermissionConfig</code></td><td>Grant or change a group's explicit access level on a repository.</td></tr><tr><td>Update Repository Pipeline Variable</td><td><code>updateRepoPipelineVariable</code></td><td>Update a repository-level pipeline variable by UUID. Requires pipeline:variable scope.</td></tr><tr><td>Update Repository User Permission</td><td><code>updateRepositoryUserPermission</code></td><td>Grant or update a user's explicit permission on a repository. Requires repository:admin scope. permission is one of read, write, admin.</td></tr><tr><td>Update Snippet</td><td><code>updateSnippet</code></td><td>Update a snippet (title and/or files) via multipart form.</td></tr><tr><td>Update Webhook</td><td><code>updateWebhook</code></td><td>Update a webhook subscription.</td></tr><tr><td>Update Workspace Pipeline Variable</td><td><code>updateWorkspacePipelineVariable</code></td><td>Update a workspace-level pipeline variable by UUID. Requires pipeline:variable scope.</td></tr><tr><td>Update Workspace Webhook</td><td><code>updateWorkspaceWebhook</code></td><td>Update a workspace-level webhook.</td></tr></tbody></table>

</details>

## Events

Start a workflow when one of these happens, with an [app event trigger](https://docs.fastn.ai/build/integrations/triggers.md).

<table><thead><tr><th width="240">Event</th><th width="260">Id</th><th>When it fires</th></tr></thead><tbody><tr><td>Build Status Created</td><td><code>repo:commit_status_created</code></td><td>A build status (commit status) is created on a commit.</td></tr><tr><td>Build Status Updated</td><td><code>repo:commit_status_updated</code></td><td>An existing build status (commit status) is updated.</td></tr><tr><td>Issue Comment Created</td><td><code>issue:comment_created</code></td><td>A comment is added to an issue.</td></tr><tr><td>Issue Created</td><td><code>issue:created</code></td><td>An issue is created in the repository issue tracker.</td></tr><tr><td>Issue Updated</td><td><code>issue:updated</code></td><td>An issue is updated (state, assignee, or content changes).</td></tr><tr><td>Pull Request Approval Removed</td><td><code>pullrequest:unapproved</code></td><td>A user removes their approval from a pull request.</td></tr><tr><td>Pull Request Approved</td><td><code>pullrequest:approved</code></td><td>A user approves a pull request.</td></tr><tr><td>Pull Request Comment Created</td><td><code>pullrequest:comment_created</code></td><td>A comment is added to a pull request.</td></tr><tr><td>Pull Request Created</td><td><code>pullrequest:created</code></td><td>A pull request is created.</td></tr><tr><td>Pull Request Declined</td><td><code>pullrequest:rejected</code></td><td>A pull request is declined.</td></tr></tbody></table>

<details>

<summary>View 4 more events</summary>

<table><thead><tr><th width="240">Event</th><th width="260">Id</th><th>When it fires</th></tr></thead><tbody><tr><td>Pull Request Merged</td><td><code>pullrequest:fulfilled</code></td><td>A pull request is merged.</td></tr><tr><td>Pull Request Updated</td><td><code>pullrequest:updated</code></td><td>A pull request's title, description, or destination changes, or commits are pushed to the source branch.</td></tr><tr><td>Repository Fork</td><td><code>repo:fork</code></td><td>A user forks a repository.</td></tr><tr><td>Repository Push</td><td><code>repo:push</code></td><td>A user pushes one or more commits to a repository. Event type carried in the X-Event-Key request header.</td></tr></tbody></table>

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fastn.ai/connectors/catalog/developer-tools/bitbucket.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
