Skip to content
Talk to an Engineer Dashboard

Bitbucket

Connect to Bitbucket. Manage repositories, pipelines, pull requests, issues, and code collaboration.

Bitbucket is a cloud-based Git repository hosting service by Atlassian. It supports code collaboration, CI/CD pipelines, pull requests, and deployment environments for teams.

Bitbucket logo

Supports authentication: OAuth 2.0

Register your Bitbucket OAuth consumer credentials with Scalekit so it can manage the OAuth 2.0 authentication flow and token lifecycle on your behalf. You’ll need a Key (Client ID) and Secret (Client Secret) from your Bitbucket workspace settings.

  1. Open OAuth consumers in your Bitbucket workspace

    • Go to Bitbucket and open your workspace by clicking your avatar in the top-right corner and selecting the workspace you want to use.

    • In the left sidebar, click Settings → OAuth consumers.

      Bitbucket workspace settings showing OAuth consumers page
    • Click Add consumer to create a new OAuth application.

  2. Create the OAuth consumer

    • Fill in the consumer details:

      • Name — enter a descriptive name (e.g., Scalekit-Agent)
      • Description — optional description
      • URL — your application’s homepage URL
    • Leave the Callback URL field empty for now — you’ll fill it in after getting the redirect URI from Scalekit.

      Bitbucket Add OAuth consumer form
    • Under Permissions, select the scopes your agent needs. Recommended minimum:

      PermissionScopeRequired for
      AccountReadUser profile access
      RepositoriesReadRead code and metadata
      RepositoriesWriteCreate branches, push commits
      Pull requestsReadRead PR data
      Pull requestsWriteCreate, approve, and merge PRs
      PipelinesReadView pipeline runs
      PipelinesWriteTrigger pipelines
    • Click Save to create the consumer.

  3. Get the redirect URI from Scalekit

    • In Scalekit dashboard, go to Agent Auth → Create Connection. Search for Bitbucket and click Create.

      Searching for Bitbucket in the Scalekit Create Connection panel
    • Copy the Redirect URI shown in the connection configuration panel. It looks like https://<SCALEKIT_ENVIRONMENT_URL>/sso/v1/oauth/<CONNECTION_ID>/callback.

      Scalekit Configure Bitbucket Connection panel showing Redirect URI, Client Key, and Client Secret fields
  4. Add the callback URL in Bitbucket

    • Back in Bitbucket, open your OAuth consumer and click Edit.

    • Paste the Scalekit Redirect URI into the Callback URL field.

    • Click Save to apply the change.

      Bitbucket Edit OAuth consumer with Scalekit callback URL added to the Callback URL field
  5. Copy your OAuth credentials

    • In Bitbucket, go back to Workspace settings → OAuth consumers and click on your consumer name to expand it.

    • The Key and Secret will be shown. Click Reveal next to the secret to display it.

      Bitbucket OAuth consumer expanded showing Key and Secret with Reveal button
    • Copy both values. The secret is not stored by Bitbucket after you leave this page — save it securely.

  6. Add credentials in Scalekit

    • In Scalekit dashboard, go to Agent Auth → Connections and open the Bitbucket connection you created.

    • Enter your credentials:

      • Client Key — the Key from your Bitbucket OAuth consumer
      • Client Secret — the Secret from your Bitbucket OAuth consumer
      • Scopes — select the scopes that match the permissions you granted in step 2
    • Click Save.

Connect a user’s Bitbucket account and make API calls on their behalf — Scalekit handles OAuth 2.0, token storage, and refresh automatically.

You can interact with Bitbucket in two ways — via direct proxy API calls or via Scalekit optimized tool calls. Scroll down to see the list of available Scalekit tools.

Proxy API calls

import { ScalekitClient } from '@scalekit-sdk/node';
import 'dotenv/config';
const connectionName = 'bitbucket'; // get your connection name from connection configurations
const identifier = 'user_123'; // your unique user identifier
// Get your credentials from app.scalekit.com → Developers → Settings → API Credentials
const scalekit = new ScalekitClient(
process.env.SCALEKIT_ENV_URL,
process.env.SCALEKIT_CLIENT_ID,
process.env.SCALEKIT_CLIENT_SECRET
);
const actions = scalekit.actions;
// Authenticate the user — send this link to your user
const { link } = await actions.getAuthorizationLink({
connectionName,
identifier,
});
console.log('Authorize Bitbucket:', link);
process.stdout.write('Press Enter after authorizing...');
await new Promise(r => process.stdin.once('data', r));
// Fetch the authenticated user's Bitbucket profile via Scalekit proxy
const user = await actions.request({
connectionName,
identifier,
path: '/2.0/user',
method: 'GET',
});
console.log(user);

Scalekit tools

The 148 tools are grouped by the OAuth scope they require. Grant these scopes when creating your Bitbucket OAuth consumer in the setup guide.

ScopeWhat it covers
accountAuthenticated user’s profile and email addresses
repositoryRead access to repositories, branches, commits, diffs, and source files
repository:writeCreate and delete branches, tags, commits, and repository settings
repository:adminBranch restrictions, deploy keys, permission management, repository deletion
pullrequestRead pull requests, comments, tasks, and commit statuses
pullrequest:writeCreate, approve, merge, decline pull requests and manage PR tasks
issueRead issues, components, milestones, and versions (requires issue tracker enabled)
issue:writeCreate, update, and delete issues, comments, votes, and watches
pipelineRead pipeline runs, schedules, steps, logs, variables, and deployment environments
pipeline:writeTrigger, stop, and configure pipelines, schedules, variables, and environments
webhookCreate, read, update, and delete repository webhooks

Creates a new branch in a Bitbucket repository from a specified commit hash or branch. Requires repository:write scope.

NameTypeRequiredDescription
namestringYesNew branch name
repo_slugstringYesRepository slug or UUID
target_hashstringYesCommit SHA to branch from
workspacestringYesWorkspace slug or UUID

Deletes a branch from a Bitbucket repository. Requires repository:write scope.

NameTypeRequiredDescription
namestringYesBranch name to delete
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns details of a specific branch in a Bitbucket repository. Requires repository scope.

NameTypeRequiredDescription
namestringYesBranch name (e.g. main)
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Creates a branch permission rule for a repository (e.g. restrict who can push to main). Requires repository:admin scope.

NameTypeRequiredDescription
kindstringYesRestriction type (e.g. push)
patternstringYesBranch pattern to restrict (e.g. main)
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
groupsstring | nullNoGroup slugs to exempt from the restriction
usersstring | nullNoUser account IDs to exempt from the restriction
valuestringNoNumeric threshold (e.g. minimum approvals)

Deletes a branch permission rule. Requires repository:admin scope.

NameTypeRequiredDescription
idstringYesBranch restriction ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns a specific branch permission rule by ID. Requires repository:admin scope.

NameTypeRequiredDescription
idstringYesBranch restriction ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Updates a branch permission rule. Requires repository:admin scope.

NameTypeRequiredDescription
idstringYesBranch restriction ID
kindstringYesRestriction type (e.g. push)
patternstringYesBranch pattern to restrict
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
valuestringNoNumeric threshold (e.g. minimum approvals)

Lists branch permission rules for a repository. Requires repository:admin scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns all branches in a Bitbucket repository. Requires repository scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
qstring | nullNoFilter query string
sortstring | nullNoSort field

Returns the effective branching model for a repository (e.g. Gitflow configuration). Requires repository scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns the branching model configuration settings for a repository. Requires repository scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Updates the branching model configuration settings for a repository. Requires repository:write scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
development_branchstring | nullNoDevelopment branch name (e.g. develop)
production_branchstring | nullNoProduction branch name (e.g. main)

Approves a specific commit in a Bitbucket repository. Requires repository:write scope.

NameTypeRequiredDescription
commitstringYesFull or short commit SHA
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Creates a build status for a specific commit. Used to report CI/CD pipeline results back to Bitbucket. Requires pipeline:write scope.

NameTypeRequiredDescription
commitstringYesFull or short commit SHA
keystringYesUnique build key identifying the pipeline
statestringYesBuild state: INPROGRESS, SUCCESSFUL, or FAILED
urlstringYesURL linking to the build result
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
descriptionstring | nullNoHuman-readable build description
namestring | nullNoDisplay name for the build

Returns the build status for a specific commit and build key. Requires pipeline scope.

NameTypeRequiredDescription
commitstringYesFull or short commit SHA
keystringYesBuild key identifying the pipeline
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Updates an existing build status for a specific commit and key. Requires pipeline:write scope.

NameTypeRequiredDescription
commitstringYesFull or short commit SHA
keystringYesBuild key identifying the pipeline
statestringYesBuild state: INPROGRESS, SUCCESSFUL, or FAILED
urlstringYesURL linking to the build result
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
descriptionstring | nullNoHuman-readable build description
namestring | nullNoDisplay name for the build

Creates a new comment on a specific commit in a Bitbucket repository. Requires repository:write scope.

NameTypeRequiredDescription
commitstringYesFull or short commit SHA
contentstringYesComment body (Markdown supported)
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Deletes a specific comment on a commit. Requires repository:write scope.

NameTypeRequiredDescription
comment_idstringYesComment ID
commitstringYesFull or short commit SHA
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns a specific comment on a commit. Requires repository scope.

NameTypeRequiredDescription
comment_idstringYesComment ID
commitstringYesFull or short commit SHA
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Updates an existing comment on a commit. Requires repository:write scope.

NameTypeRequiredDescription
comment_idstringYesComment ID
commitstringYesFull or short commit SHA
contentstringYesUpdated comment body
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Lists all comments on a specific commit in a Bitbucket repository. Requires repository scope.

NameTypeRequiredDescription
commitstringYesFull or short commit SHA
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns details of a specific commit including author, message, date, and diff stats. Requires repository scope.

NameTypeRequiredDescription
commitstringYesFull or short commit SHA
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Lists all statuses (build results) for a specific commit. Requires pipeline scope.

NameTypeRequiredDescription
commitstringYesFull or short commit SHA
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Removes an approval from a specific commit. Requires repository:write scope.

NameTypeRequiredDescription
commitstringYesFull or short commit SHA
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns a list of commits for a repository, optionally filtered by branch. Requires repository scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
branchstring | nullNoBranch, tag, or commit hash to filter by

Returns a specific component by ID from the repository’s issue tracker. Requires issue scope.

NameTypeRequiredDescription
component_idstringYesComponent ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Lists all components defined for a repository’s issue tracker. Requires issue scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Adds a user as a default reviewer for pull requests in a repository. Requires repository:admin scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
usernamestringYesUser account UUID
workspacestringYesWorkspace slug or UUID

Checks if a user is a default reviewer for a repository. Requires repository:admin scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
usernamestringYesUser account UUID
workspacestringYesWorkspace slug or UUID

Removes a user from the default reviewers for a repository. Requires repository:admin scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
usernamestringYesUser account UUID
workspacestringYesWorkspace slug or UUID

Lists all default reviewers for a repository. Requires repository:admin scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Adds a new deploy key (SSH public key) to a Bitbucket repository for read-only or read-write access. Requires repository:admin scope.

NameTypeRequiredDescription
keystringYesSSH public key (e.g. ssh-rsa AAAA...)
labelstringYesDescriptive label for this key
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Removes a deploy key from a Bitbucket repository. Requires repository:admin scope.

NameTypeRequiredDescription
key_idintegerYesDeploy key ID from list deploy keys response
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns a list of deploy keys (SSH keys) configured on a Bitbucket repository. Requires repository:admin scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns a specific deployment by UUID. Requires pipeline scope.

NameTypeRequiredDescription
deployment_uuidstringYesDeployment UUID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Creates a new variable for a deployment environment. Requires pipeline:write scope.

NameTypeRequiredDescription
environment_uuidstringYesDeployment environment UUID
keystringYesVariable name
valuestringYesVariable value
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
securedstringNoSet to true to mask the value in logs

Deletes a variable from a deployment environment. Requires pipeline:write scope.

NameTypeRequiredDescription
environment_uuidstringYesDeployment environment UUID
variable_uuidstringYesVariable UUID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Updates an existing variable for a deployment environment. Requires pipeline:write scope.

NameTypeRequiredDescription
environment_uuidstringYesDeployment environment UUID
variable_uuidstringYesVariable UUID
keystringYesVariable name
valuestringYesNew variable value
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
securedstringNoSet to true to mask the value in logs

Lists all variables for a deployment environment. Requires pipeline scope.

NameTypeRequiredDescription
environment_uuidstringYesDeployment environment UUID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Lists all deployments for a repository. Requires pipeline scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns a JSON summary of file changes for a given commit spec (e.g. main..feature-branch). Shows which files were added, modified, or deleted with line counts. Requires repository scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
specstringYesCommit spec, e.g. main..feature-branch or abc123..def456
workspacestringYesWorkspace slug or UUID
pathstring | nullNoOptional file path to restrict the diff

Returns diff stats between two commits or a branch/commit spec in a repository. Requires repository scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
specstringYesCommit spec, e.g. main..feature-branch
workspacestringYesWorkspace slug or UUID

Deletes a specific download artifact from a repository. Requires repository:write scope.

NameTypeRequiredDescription
filenamestringYesFilename of the download artifact
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Lists all download artifacts for a repository. Requires repository scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Creates a new deployment environment for a repository (e.g. Test, Staging, Production). Requires pipeline:write scope.

NameTypeRequiredDescription
environment_typestringYesEnvironment type: Production, Staging, or Test
namestringYesDisplay name for the environment
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Deletes a deployment environment by UUID. Requires pipeline:write scope.

NameTypeRequiredDescription
environment_uuidstringYesDeployment environment UUID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns a specific deployment environment by UUID. Requires pipeline scope.

NameTypeRequiredDescription
environment_uuidstringYesDeployment environment UUID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Lists all deployment environments for a repository (e.g. Test, Staging, Production). Requires pipeline scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Lists the commits that modified a specific file path. Requires repository scope.

NameTypeRequiredDescription
commitstringYesBranch name, tag, or commit SHA to start from
pathstringYesFile path to get history for (e.g. src/main.py)
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Posts a new comment on a Bitbucket issue. Requires issue:write scope.

NameTypeRequiredDescription
contentstringYesComment body
issue_idintegerYesNumeric issue ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Deletes a specific comment on an issue. Requires issue:write scope.

NameTypeRequiredDescription
comment_idstringYesComment ID
issue_idstringYesIssue ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Updates an existing comment on an issue. Requires issue:write scope.

NameTypeRequiredDescription
comment_idstringYesComment ID
contentstringYesUpdated comment body
issue_idstringYesIssue ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns all comments on a Bitbucket issue. Requires issue scope.

NameTypeRequiredDescription
issue_idintegerYesNumeric issue ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Creates a new issue in a Bitbucket repository’s issue tracker. Requires issue:write scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
titlestringYesIssue title
workspacestringYesWorkspace slug or UUID
assignee_account_idstring | nullNoUser account ID to assign the issue to
contentstring | nullNoIssue description
kindstring | nullNoIssue kind: bug, enhancement, proposal, or task
prioritystring | nullNoIssue priority level

Deletes an issue from a Bitbucket repository’s issue tracker. Requires issue:write scope.

NameTypeRequiredDescription
issue_idintegerYesNumeric issue ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns details of a specific issue in a Bitbucket repository. Requires issue scope.

NameTypeRequiredDescription
issue_idintegerYesNumeric issue ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Removes a vote from an issue. Requires issue:write scope.

NameTypeRequiredDescription
issue_idstringYesIssue ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Stops watching an issue to stop receiving notifications. Requires issue:write scope.

NameTypeRequiredDescription
issue_idstringYesIssue ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Updates an existing issue in a Bitbucket repository. Requires issue:write scope.

NameTypeRequiredDescription
issue_idintegerYesNumeric issue ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
contentstring | nullNoUpdated issue description
kindstring | nullNoIssue kind
prioritystring | nullNoIssue priority level
statusstring | nullNoIssue status
titlestring | nullNoUpdated issue title

Casts a vote for an issue. Requires issue:write scope.

NameTypeRequiredDescription
issue_idstringYesIssue ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Checks if the authenticated user has voted for an issue. Requires issue scope.

NameTypeRequiredDescription
issue_idstringYesIssue ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Starts watching an issue to receive notifications. Requires issue:write scope.

NameTypeRequiredDescription
issue_idstringYesIssue ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Checks if the authenticated user is watching an issue. Requires issue scope.

NameTypeRequiredDescription
issue_idstringYesIssue ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns all issues in a Bitbucket repository’s issue tracker. Requires issue scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
qstring | nullNoFilter query string
sortstring | nullNoSort field

Returns the common ancestor (merge base) between two commits. Requires repository scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
revspecstringYesTwo commit SHAs separated by .. (e.g. abc123..def456)
workspacestringYesWorkspace slug or UUID

Returns a specific milestone by ID from the issue tracker. Requires issue scope.

NameTypeRequiredDescription
milestone_idstringYesMilestone ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Lists all milestones defined for a repository’s issue tracker. Requires issue scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns details of a specific Bitbucket pipeline run by its UUID. Requires pipeline scope.

NameTypeRequiredDescription
pipeline_uuidstringYesPipeline UUID from list pipelines response
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Creates a new scheduled pipeline for a repository using a cron expression. Requires pipeline:write scope.

NameTypeRequiredDescription
branchstringYesBranch to run the scheduled pipeline on
cron_expressionstringYesCron schedule expression (e.g. 0 0 * * * for daily at midnight)
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
enabledstringNoSet to false to disable the schedule

Deletes a pipeline schedule. Requires pipeline:write scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
schedule_uuidstringYesPipeline schedule UUID
workspacestringYesWorkspace slug or UUID

Returns a specific pipeline schedule by UUID. Requires pipeline scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
schedule_uuidstringYesPipeline schedule UUID
workspacestringYesWorkspace slug or UUID

Updates a pipeline schedule’s cron expression or enabled status. Requires pipeline:write scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
schedule_uuidstringYesPipeline schedule UUID
workspacestringYesWorkspace slug or UUID
cron_expressionstring | nullNoNew cron schedule expression
enabledstringNoSet to false to disable the schedule

Lists all pipeline schedules for a repository. Requires pipeline scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Retrieves the log output for a specific step of a Bitbucket pipeline run. Requires pipeline scope.

NameTypeRequiredDescription
pipeline_uuidstringYesPipeline UUID
repo_slugstringYesRepository slug or UUID
step_uuidstringYesStep UUID from list pipeline steps
workspacestringYesWorkspace slug or UUID

Returns a list of steps for a specific Bitbucket pipeline run. Requires pipeline scope.

NameTypeRequiredDescription
pipeline_uuidstringYesPipeline UUID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Stops a running Bitbucket pipeline. Requires pipeline:write scope.

NameTypeRequiredDescription
pipeline_uuidstringYesPipeline UUID from list or trigger response
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Triggers a new Bitbucket pipeline run for a specific branch, tag, or commit. Requires pipeline:write scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
branchstring | nullNoBranch to trigger the pipeline on
commit_hashstring | nullNoCommit SHA to run the pipeline at
pipeline_namestring | nullNoCustom pipeline key from bitbucket-pipelines.yml
variablesstring | nullNoArray of variable objects with key and value fields

Creates a new pipeline variable for a Bitbucket repository. Requires pipeline:write scope.

NameTypeRequiredDescription
keystringYesVariable name
valuestringYesVariable value
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
securedboolean | nullNoSet to true to mask this variable in pipeline logs

Deletes a pipeline variable from a Bitbucket repository. Requires pipeline:write scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
variable_uuidstringYesVariable UUID from list pipeline variables
workspacestringYesWorkspace slug or UUID

Updates an existing pipeline variable for a Bitbucket repository. Requires pipeline:write scope.

NameTypeRequiredDescription
keystringYesNew variable name
valuestringYesNew variable value
variable_uuidstringYesVariable UUID from list pipeline variables
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
securedboolean | nullNoSet to true to mask this variable in pipeline logs

Returns a list of pipeline variables defined for the repository. Requires pipeline scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns pipeline runs for a Bitbucket repository, optionally filtered by status or branch. Requires pipeline scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
sortstring | nullNoSort field (e.g. -created_on for newest first)

Lists all activity (comments, approvals, updates) for a specific pull request. Requires pullrequest scope.

NameTypeRequiredDescription
pull_request_idstringYesNumeric pull request ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Approves a pull request on behalf of the authenticated user. Requires pullrequest:write scope.

NameTypeRequiredDescription
pull_request_idintegerYesNumeric pull request ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Posts a new comment on a pull request. Requires pullrequest:write scope.

NameTypeRequiredDescription
contentstringYesComment body text
pull_request_idintegerYesNumeric pull request ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Deletes a comment from a pull request. Requires pullrequest:write scope.

NameTypeRequiredDescription
comment_idintegerYesNumeric comment ID
pull_request_idintegerYesNumeric pull request ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns all comments on a pull request. Requires pullrequest scope.

NameTypeRequiredDescription
pull_request_idintegerYesNumeric pull request ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns all commits included in a pull request. Requires pullrequest scope.

NameTypeRequiredDescription
pull_request_idintegerYesNumeric pull request ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Creates a new pull request in a Bitbucket repository. Requires pullrequest:write scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
source_branchstringYesBranch containing the changes
titlestringYesPull request title
workspacestringYesWorkspace slug or UUID
close_source_branchboolean | nullNoSet to true to delete source branch on merge
descriptionstring | nullNoPR description (Markdown supported)
destination_branchstring | nullNoTarget branch to merge into (e.g. main)
reviewersstring | nullNoArray of reviewer objects with uuid field

Declines (rejects) an open pull request in a Bitbucket repository. Requires pullrequest:write scope.

NameTypeRequiredDescription
pull_request_idintegerYesNumeric pull request ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns a JSON diffstat for a pull request. Get commit hashes from bitbucket_pull_request_get (source.commit.hash and destination.commit.hash). Requires pullrequest scope.

NameTypeRequiredDescription
dest_commitstringYesDestination commit hash
repo_slugstringYesRepository slug or UUID
source_commitstringYesSource commit hash
workspacestringYesWorkspace slug or UUID
pull_request_idstring | nullNoPull request ID

Returns details of a specific pull request including title, description, source/destination branches, state, and reviewers. Requires pullrequest scope.

NameTypeRequiredDescription
pull_request_idintegerYesNumeric pull request ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Merges a pull request in a Bitbucket repository. Requires pullrequest:write scope.

NameTypeRequiredDescription
pull_request_idintegerYesNumeric pull request ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
close_source_branchboolean | nullNoSet to true to delete source branch on merge
merge_strategystring | nullNoMerge strategy: merge_commit, squash, or fast_forward
messagestring | nullNoMerge commit message

Removes a change request from a pull request, unblocking it from merging. Requires pullrequest:write scope.

NameTypeRequiredDescription
pull_request_idstringYesPull request ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Requests changes on a pull request, blocking it from merging until changes are addressed. Requires pullrequest:write scope.

NameTypeRequiredDescription
pull_request_idstringYesPull request ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Lists all commit statuses for the commits in a pull request. Requires pullrequest scope.

NameTypeRequiredDescription
pull_request_idstringYesPull request ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Creates a new task on a pull request. Requires pullrequest:write scope.

NameTypeRequiredDescription
contentstringYesTask description
pull_request_idstringYesPull request ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
pendingstringNoSet to true to mark the task as pending

Deletes a task from a pull request. Requires pullrequest:write scope.

NameTypeRequiredDescription
pull_request_idstringYesPull request ID
repo_slugstringYesRepository slug or UUID
task_idstringYesTask ID
workspacestringYesWorkspace slug or UUID

Returns a specific task on a pull request. Requires pullrequest scope.

NameTypeRequiredDescription
pull_request_idstringYesPull request ID
repo_slugstringYesRepository slug or UUID
task_idstringYesTask ID
workspacestringYesWorkspace slug or UUID

Updates a task on a pull request (e.g. resolve/reopen or change content). Requires pullrequest:write scope.

NameTypeRequiredDescription
pull_request_idstringYesPull request ID
repo_slugstringYesRepository slug or UUID
task_idstringYesTask ID
workspacestringYesWorkspace slug or UUID
contentstring | nullNoUpdated task description
pendingstringNoSet to false to mark the task as resolved

Lists all tasks on a pull request. Requires pullrequest scope.

NameTypeRequiredDescription
pull_request_idstringYesPull request ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Removes the authenticated user’s approval from a pull request. Requires pullrequest:write scope.

NameTypeRequiredDescription
pull_request_idintegerYesNumeric pull request ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Updates a pull request’s title, description, reviewers, or destination branch. Requires pullrequest:write scope.

NameTypeRequiredDescription
pull_request_idintegerYesNumeric pull request ID
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
descriptionstring | nullNoUpdated PR description
destination_branchstring | nullNoUpdated target branch
titlestring | nullNoUpdated PR title

Lists overall activity for all pull requests in a repository. Requires pullrequest scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns pull requests for a Bitbucket repository, filterable by state. Requires pullrequest scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
qstring | nullNoFilter query string
sortstring | nullNoSort field (e.g. -updated_on)
statestring | nullNoPR state filter: OPEN, MERGED, or DECLINED

Lists all branches and tags (refs) for a repository. Requires repository scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns all repositories in a Bitbucket workspace. Requires repository scope.

NameTypeRequiredDescription
workspacestringYesWorkspace slug or UUID
qstring | nullNoFilter query string
sortstring | nullNoSort field, prefix with - for descending

Creates a new Bitbucket repository in the specified workspace. Requires repository:write scope.

NameTypeRequiredDescription
repo_slugstringYesURL-friendly repository name
workspacestringYesWorkspace slug or UUID
descriptionstring | nullNoShort description of the repository
has_issuesboolean | nullNoSet to true to enable the issue tracker
has_wikiboolean | nullNoSet to true to enable the wiki
is_privateboolean | nullNoSet to false to make the repository public
project_keystring | nullNoProject key to associate the repository with (e.g. PROJ)
scmstring | nullNoSource control type: git or hg

Permanently deletes a Bitbucket repository and all its data. Requires repository:admin scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Forks a Bitbucket repository into the authenticated user’s workspace or a specified workspace. Requires repository:write scope.

NameTypeRequiredDescription
repo_slugstringYesSource repository slug or UUID
workspacestringYesSource workspace slug or UUID
is_privateboolean | nullNoSet to true for a private fork
namestring | nullNoName for the forked repository
workspace_destinationstring | nullNoDestination workspace slug for the fork

Returns details of a specific Bitbucket repository including description, language, size, and clone URLs. Requires repository scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Removes a group’s explicit permission from a repository. Requires repository:admin scope.

NameTypeRequiredDescription
group_slugstringYesGroup slug (e.g. developers)
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns the explicit repository permission for a specific group. Requires repository:admin scope.

NameTypeRequiredDescription
group_slugstringYesGroup slug (e.g. developers)
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Sets the explicit permission for a group on a repository. Requires repository:admin scope.

NameTypeRequiredDescription
group_slugstringYesGroup slug (e.g. developers)
permissionstringYesPermission level: read, write, or admin
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Removes a user’s explicit permission from a repository. Requires repository:admin scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
usernamestringYesUser account UUID
workspacestringYesWorkspace slug or UUID

Returns the explicit repository permission for a specific user. Requires repository:admin scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
usernamestringYesUser account UUID
workspacestringYesWorkspace slug or UUID

Sets the explicit permission for a user on a repository. Requires repository:admin scope.

NameTypeRequiredDescription
permissionstringYesPermission level: read, write, or admin
repo_slugstringYesRepository slug or UUID
usernamestringYesUser account UUID
workspacestringYesWorkspace slug or UUID

Lists all explicit group permissions for a repository. Requires repository:admin scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Lists all explicit user permissions for a repository. Requires repository:admin scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Updates a Bitbucket repository’s description, privacy settings, or other configuration. Requires repository:write scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
descriptionstring | nullNoUpdated repository description
has_issuesboolean | nullNoSet to true to enable issues
has_wikiboolean | nullNoSet to true to enable wiki
is_privateboolean | nullNoSet to true for private, false for public

Lists all users watching a repository. Requires repository scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Retrieves metadata (size, type, MIME type, last commit) for a file or directory in a repository at a specific commit. Requires repository scope.

NameTypeRequiredDescription
commitstringYesBranch name, tag, or commit SHA
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
pathstring | nullNoFile or directory path (e.g. src/app.py or README.md)

Creates a new tag in a Bitbucket repository pointing to a specific commit. Requires repository:write scope.

NameTypeRequiredDescription
namestringYesTag name (e.g. v1.0.0)
repo_slugstringYesRepository slug or UUID
target_hashstringYesCommit SHA to tag
workspacestringYesWorkspace slug or UUID
messagestring | nullNoOptional annotation message for the tag

Deletes a tag from a Bitbucket repository. Requires repository:write scope.

NameTypeRequiredDescription
namestringYesTag name to delete
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns all tags in a Bitbucket repository. Requires repository scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID
qstring | nullNoFilter query (e.g. name~"v1")
sortstring | nullNoSort field, prefix with - for descending

Returns all email addresses associated with the authenticated Bitbucket user. Requires account scope.

Returns the authenticated user’s Bitbucket profile including display name, account ID, and account links. Requires account scope.

Returns a specific version by ID from the issue tracker. Requires issue scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
version_idstringYesVersion ID
workspacestringYesWorkspace slug or UUID

Lists all versions defined for a repository’s issue tracker. Requires issue scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Creates a new webhook on a Bitbucket repository to receive event notifications at a specified URL. Requires webhook scope.

NameTypeRequiredDescription
eventsstringYesArray of Bitbucket event identifiers (e.g. repo:push, pullrequest:created)
repo_slugstringYesRepository slug or UUID
urlstringYesHTTPS URL that will receive webhook POST requests
workspacestringYesWorkspace slug or UUID
activeboolean | nullNoSet to false to disable the webhook
descriptionstring | nullNoOptional description for the webhook
secretstring | nullNoOptional shared secret for payload signature verification

Deletes a webhook from a Bitbucket repository. Requires webhook scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
uidstringYesWebhook UID from list webhooks response
workspacestringYesWorkspace slug or UUID

Returns the details of a specific webhook installed on a Bitbucket repository. Requires webhook scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
uidstringYesWebhook UID from list webhooks response
workspacestringYesWorkspace slug or UUID

Updates an existing webhook on a Bitbucket repository, including its URL, events, and active status. Requires webhook scope.

NameTypeRequiredDescription
eventsstringYesArray of Bitbucket event identifiers
repo_slugstringYesRepository slug or UUID
uidstringYesWebhook UID from list webhooks response
urlstringYesHTTPS URL that will receive webhook POST requests
workspacestringYesWorkspace slug or UUID
activeboolean | nullNoSet to false to disable the webhook
descriptionstring | nullNoOptional description for the webhook

Returns a list of webhooks installed on a Bitbucket repository. Requires webhook scope.

NameTypeRequiredDescription
repo_slugstringYesRepository slug or UUID
workspacestringYesWorkspace slug or UUID

Returns details of a specific Bitbucket workspace by its slug. Requires repository scope.

NameTypeRequiredDescription
workspacestringYesWorkspace slug (e.g. myteam) or UUID

Returns all members of a Bitbucket workspace. Requires repository scope.

NameTypeRequiredDescription
workspacestringYesWorkspace slug or UUID

Creates a new pipeline variable at the workspace level, available to all repositories in the workspace. Requires pipeline:write scope.

NameTypeRequiredDescription
keystringYesVariable name
valuestringYesVariable value
workspacestringYesWorkspace slug or UUID
securedstringNoSet to true to mask the value in pipeline logs

Deletes a workspace pipeline variable. Requires pipeline:write scope.

NameTypeRequiredDescription
variable_uuidstringYesVariable UUID
workspacestringYesWorkspace slug or UUID

Returns a specific workspace pipeline variable by UUID. Requires pipeline scope.

NameTypeRequiredDescription
variable_uuidstringYesVariable UUID
workspacestringYesWorkspace slug or UUID

Updates a workspace pipeline variable. Requires pipeline:write scope.

NameTypeRequiredDescription
keystringYesVariable name
valuestringYesNew variable value
variable_uuidstringYesVariable UUID
workspacestringYesWorkspace slug or UUID
securedstringNoSet to true to mask the value in pipeline logs

Lists all pipeline variables defined at the workspace level. Requires pipeline scope.

NameTypeRequiredDescription
workspacestringYesWorkspace slug or UUID

Creates a new project in a workspace. Requires repository:admin scope.

NameTypeRequiredDescription
keystringYesProject key (e.g. PROJ)
namestringYesProject display name
workspacestringYesWorkspace slug or UUID
descriptionstring | nullNoProject description
is_privatestringNoSet to false to make the project public

Deletes a project from a workspace. Requires repository:admin scope.

NameTypeRequiredDescription
project_keystringYesProject key (e.g. PROJ)
workspacestringYesWorkspace slug or UUID

Returns a specific project from a workspace by project key. Requires repository scope.

NameTypeRequiredDescription
project_keystringYesProject key (e.g. PROJ)
workspacestringYesWorkspace slug or UUID

Updates an existing project in a workspace. Requires repository:admin scope.

NameTypeRequiredDescription
keystringYesProject key
namestringYesUpdated project name
project_keystringYesCurrent project key
workspacestringYesWorkspace slug or UUID
descriptionstring | nullNoUpdated project description
is_privatestringNoSet to false to make the project public

Lists all projects in a workspace. Requires repository scope.

NameTypeRequiredDescription
workspacestringYesWorkspace slug or UUID

Searches for code across all repositories in a workspace. Requires repository scope.

NameTypeRequiredDescription
search_querystringYesCode search query (e.g. def main)
workspacestringYesWorkspace slug or UUID
pageinteger | nullNoPage number for pagination
pageleninteger | nullNoNumber of results per page (max 100)