Bitbucket

App · Code Repositories · 5 actions

Browse Bitbucket repositories and pull requests and manage branches with an Atlassian API token.

Actions

ActionWhat it does
Create branchCreate a new branch in a repository.
Delete branchDelete a branch from a repository.
Get current userGet the Atlassian account the connection's API token belongs to.
List pull requestsList a repository's pull requests, most recently updated first.
List repositoriesList the repositories in a workspace that the connected account can access, most recently updated first.

Create branch

Create a new branch in a repository. Points the new branch at the tip of an existing branch (defaults to the repository's main branch) unless you supply a specific commit hash.

Inputs

WorkspaceworkspacetextRequired
The workspace that owns the repository (the part before the '/' in 'workspace/repository'), visible in any repository's URL at bitbucket.org/<workspace>/<repository>.
Repositoryrepo_slugtextRequired
The repository to act on (the part after the '/' in 'workspace/repository').
New branch namenametextRequired
The name for the new branch (without any 'refs/heads/' prefix).
Source branchfrom_branchtext
The existing branch to base the new one on. Defaults to the repository's main branch when not set.
Source commit hashcommit_hashtext
A specific commit hash to point the new branch at. Takes precedence over the source branch when provided.

Outputs

hashtext
html_urltext
nametext
Example output
{
  "hash": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0",
  "html_url": "https://bitbucket.org/my-team/hello-world/branch/feature/new-widget",
  "name": "feature/new-widget"
}

Delete branch

Delete a branch from a repository.

Inputs

WorkspaceworkspacetextRequired
The workspace that owns the repository (the part before the '/' in 'workspace/repository'), visible in any repository's URL at bitbucket.org/<workspace>/<repository>.
Repositoryrepo_slugtextRequired
The repository to act on (the part after the '/' in 'workspace/repository').
Branch namenametextRequired
The name of the branch to delete (without any 'refs/heads/' prefix).

Outputs

deletedtrue/false
nametext
Example output
{
  "deleted": true,
  "name": "feature/old-widget"
}

Get current user

Get the Atlassian account the connection's API token belongs to. Useful for verifying the connection works.

Inputs

None.

Outputs

account_idtext
display_nametext
html_urltext
nicknametext
uuidtext
Example output
{
  "account_id": "5f8a1b2c3d4e5f6a7b8c9d0e",
  "display_name": "Octo Bit",
  "html_url": "https://bitbucket.org/octobit/",
  "nickname": "octobit",
  "uuid": "{9133e9d5-8f9a-4f5d-9c2f-3c2d1a6b7c8d}"
}

List pull requests

List a repository's pull requests, most recently updated first. Defaults to open pull requests.

Inputs

WorkspaceworkspacetextRequired
The workspace that owns the repository (the part before the '/' in 'workspace/repository'), visible in any repository's URL at bitbucket.org/<workspace>/<repository>.
Repositoryrepo_slugtextRequired
The repository to act on (the part after the '/' in 'workspace/repository').
Statestatetext
Which pull requests to include. Defaults to open ones.One of: OPEN, MERGED, DECLINED, SUPERSEDED. Default: OPEN.

Outputs

pull_requestslist
Example output
{
  "pull_requests": [
    {
      "author": "Octo Bit",
      "created_on": "2026-07-30T11:00:00.000000+00:00",
      "destination_branch": "main",
      "html_url": "https://bitbucket.org/my-team/hello-world/pull-requests/7",
      "id": 7,
      "source_branch": "feature/new-widget",
      "state": "OPEN",
      "title": "Add new widget",
      "updated_on": "2026-07-30T12:00:00.000000+00:00"
    }
  ]
}

List repositories

List the repositories in a workspace that the connected account can access, most recently updated first.

Inputs

WorkspaceworkspacetextRequired
The workspace that owns the repository (the part before the '/' in 'workspace/repository'), visible in any repository's URL at bitbucket.org/<workspace>/<repository>.

Outputs

repositorieslist
Example output
{
  "repositories": [
    {
      "description": "An example repository.",
      "full_name": "my-team/hello-world",
      "html_url": "https://bitbucket.org/my-team/hello-world",
      "is_private": true,
      "mainbranch": "main",
      "name": "Hello World",
      "slug": "hello-world",
      "updated_on": "2026-07-30T12:00:00.000000+00:00"
    }
  ]
}

On this page