Bitbucket
Connect agents to the Bitbucket Cloud REST API and start workflows on supported pull request, comment, push, build status, repository, and Pipelines trace events.
What your agents can do
Helios indexes the Bitbucket Cloud REST API, so agents search it at run time and call the endpoints the credential allows. The credential is attached server-side.
- Open pull requests, and review, comment on, approve, decline, or merge them
- Read diffs, commits, branches, and files at any ref
- Check build statuses and Bitbucket Pipelines runs, steps, and logs, and run or stop pipelines
- Create branches and tags, and report build statuses
- With admin permissions, manage repository and project settings, branch restrictions, default reviewers, and Pipelines variables
Agents can send JSON and multipart request bodies, including file uploads. Bitbucket removed its issue tracker and wikis on August 20, 2026, so there are no issue or wiki endpoints or events.
Authentication
| Method | Type | Description |
|---|---|---|
| Atlassian API Token | API Key | An API token with Bitbucket scopes, sent with your account email |
| Bitbucket Access Token | API Key | A workspace, project, or repository access token |
| Your own Bitbucket OAuth app | OAuth 2.0 | An OAuth consumer you create in your Bitbucket workspace |
Every method asks for two more fields:
- Workspace ID is the first part of your Bitbucket URLs, as in
bitbucket.org/<workspace ID>. - Repository is optional. Leave it empty to use the whole workspace. To use one repository, enter its slug, as in
bitbucket.org/<workspace ID>/<repository slug>. Helios then tests the connection against that repository and registers the webhook there. Project and repository access tokens need it to connect.
Bitbucket stopped accepting app passwords on July 28, 2026, so Helios does not offer them. See Integration authentication for how credentials are stored and injected.
Each method below lists the permissions for full access, and names the ones Helios itself needs after the table. Permissions marked admin grant administration rights, such as editing branch restrictions or deleting projects. An API token or OAuth app only gets them where its account is an admin.
Atlassian API Token
You need a Bitbucket account in the workspace. For triggers with Repository empty, the account must be a workspace admin. With Repository set, it must be an admin of that repository.
- In Bitbucket, select your avatar, then Account settings, and open the Security tab.
- Select Create and manage API tokens, then Create API token with scopes.
- Enter a name and an expiry date, and select Next. Choose Bitbucket as the app, and select Next.
- Select the scopes below, then select Next and Create token. Copy the token.
- In Helios, choose Atlassian API Token. Enter the token in API Token, your Atlassian account's email in Atlassian Account Email, and the workspace in Workspace ID. Optional: enter a repository slug in Repository.
- Save.
| Permission | Scopes | What it allows |
|---|---|---|
| Repositories | read:repository:bitbucket, write:repository:bitbucket, admin:repository:bitbucket (admin), delete:repository:bitbucket | Read and change code, branches, tags, and build statuses. Admin creates repositories and edits branch restrictions and default reviewers. Delete removes repositories |
| Pull requests | read:pullrequest:bitbucket, write:pullrequest:bitbucket | Read and comment on pull requests. Write opens, updates, approves, declines, and merges them |
| Projects | read:project:bitbucket, admin:project:bitbucket (admin) | Read projects. Admin creates, updates, and deletes them |
| Workspaces | read:workspace:bitbucket, admin:workspace:bitbucket (admin) | Read the workspace and its members. Admin updates the workspace |
| User | read:user:bitbucket, write:user:bitbucket | Read and update the token owner's account |
| Pipelines | read:pipeline:bitbucket, write:pipeline:bitbucket, admin:pipeline:bitbucket (admin) | Read runs, steps, and logs. Write starts and stops pipelines. Admin manages Pipelines variables |
| Runners | read:runner:bitbucket, write:runner:bitbucket | Read and manage Pipelines runners |
| Webhooks | read:webhook:bitbucket, write:webhook:bitbucket, delete:webhook:bitbucket | Read, register, and remove webhooks |
| Snippets | read:snippet:bitbucket, write:snippet:bitbucket, delete:snippet:bitbucket | Read, create, and delete snippets |
| SSH keys | read:ssh-key:bitbucket, write:ssh-key:bitbucket, delete:ssh-key:bitbucket | Read and manage SSH keys and deploy keys |
| GPG keys | read:gpg-key:bitbucket, write:gpg-key:bitbucket, delete:gpg-key:bitbucket | Read and manage GPG keys |
| Permissions | read:permission:bitbucket, write:permission:bitbucket, delete:permission:bitbucket | Read and change repository and project permissions |
Helios itself uses read:workspace:bitbucket to test the connection when Repository is empty, and read:repository:bitbucket when it is set. It uses the three webhook scopes to register and remove the Helios webhook. The pull request, pipeline, and project events also need read:pullrequest:bitbucket, read:pipeline:bitbucket, and read:project:bitbucket.
An API token expires after at most one year, and its scopes can't be changed. Before it expires, or to add scopes, create a new token and enter it through Manage. Bitbucket records every change made with the token as the account that owns it.
Bitbucket Access Token
Repository access tokens work on every plan. Workspace and project access tokens need Bitbucket Premium.
- Open the settings for the token's scope:
- Repository: select More actions (…) next to the repository name, then Settings → Security → Access tokens.
- Project: select More actions (…) on the project, then Settings → Security → Access tokens.
- Workspace: select the settings cog, then Workspace settings → Security → Access tokens.
- Select Create access token, enter a name, and choose an expiry.
- Select every permission below that the token type offers. Then create the token and copy it.
- In Helios, choose Bitbucket Access Token. Enter the token in Access Token and the workspace in Workspace ID.
- For a project or repository access token, enter a repository slug in Repository. These tokens only reach their own project or repository, and without it Helios tests the connection against the whole workspace.
- Save.
| Permission | Levels | Scopes | Token types |
|---|---|---|---|
| Repositories | Read, Write, Admin (admin), Delete | repository, repository:write, repository:admin, repository:delete | All |
| Pull requests | Read, Write | pullrequest, pullrequest:write | All |
| Webhooks | Read and write | webhook | All |
| Pipelines | Read, Write, Edit variables | pipeline, pipeline:write, pipeline:variable | All |
| Runners | Read, Write | runner, runner:write | All |
| Projects | Read | project | Project, workspace |
| Projects | Admin (admin) | project:admin | Workspace |
| Account | Read | account | Workspace |
Helios itself needs Repositories Read and Webhooks Read and write. The pull request and pipeline events also need Pull requests Read and Pipelines Read, and the project event needs Projects Read.
Bitbucket's docs don't say whether a workspace access token can register a workspace webhook. If no webhook appears, set Repository to register it on one repository. Access token permissions can't be changed after creation. If the token has an expiry date, or you need more permissions, create a new token and enter it through Manage.
Your own Bitbucket OAuth app
You need to be a workspace admin to add an OAuth consumer.
-
In Bitbucket, select the settings cog, then Workspace settings → Apps and features → OAuth consumers, and select Add consumer.
-
Enter a Name, and set Callback URL to:
https://api.heliosapp.com/integrations/bitbucket/oauth_callback -
Under Permissions, select every permission below.
-
Select Save. Select the consumer's name to show its Key and Secret.
-
In Helios, choose Your own Bitbucket OAuth app. Enter the key in OAuth Consumer Key, the secret in OAuth Consumer Secret, and the workspace in Workspace ID. Optional: enter a repository slug in Repository.
-
Save, then approve access in Bitbucket.
| Permission | Levels | Scopes |
|---|---|---|
| Account | Email, Read, Write | email, account, account:write |
| Projects | Read, Admin (admin) | project, project:admin |
| Repositories | Read, Write, Admin (admin), Delete | repository, repository:write, repository:admin, repository:delete |
| Pull requests | Read, Write | pullrequest, pullrequest:write |
| Snippets | Read, Write | snippet, snippet:write |
| Webhooks | Read and write | webhook |
| Pipelines | Read, Write, Edit variables | pipeline, pipeline:write, pipeline:variable |
| Runners | Read, Write | runner, runner:write |
Helios itself needs Repositories Read and Webhooks Read and write. The pull request and pipeline events also need Pull requests Read and Pipelines Read, and the project event needs Projects Read.
Helios doesn't ask for scopes, and there is no Admin access option for this method. Bitbucket gives every token exactly the permissions set on the consumer, so change them there, then click Re-connect. Agents act as the person who approved access, and the admin permissions only work where that person is an admin. For a workspace webhook, that person must be a workspace admin. Otherwise, set Repository to a repository they administer.
Helios renews access tokens with the refresh token. A refresh token that isn't used for three months expires. If that happens, open the connection and click Re-connect.
Triggers
Bitbucket can start a Workflow when something happens in your repositories. Helios registers a webhook titled Helios when you save the connection, so there is nothing to paste into Bitbucket. The webhook subscribes to the events below that its credentials and repository setting allow. Deleting the connection removes the webhook.
- With Repository empty, Helios registers one workspace webhook. It covers every repository in the workspace, including ones created later. Bitbucket only lets workspace admins create workspace webhooks.
- With Repository set, Helios registers the webhook on that repository only. This needs admin access to the repository. Bitbucket sends
repository.created,repository.imported,repository.transferred,repository.deleted, andproject.updatedonly to workspace webhooks, so the trigger picker shows them as unavailable.
Bitbucket only lets a webhook subscribe to an event when the credential can read what the event is about. If the credential lacks Pull requests Read, Pipelines Read, or Projects Read, Helios subscribes to the other events and the trigger picker shows the refused ones as unavailable. Add the permission, or create a new token with it, and save the connection again.
Setting Repository on a connection that had a workspace webhook removes that webhook. Any other change to Workspace ID or Repository on a saved connection leaves the old webhook in Bitbucket. Create a new connection and delete the old one instead.
| Event | Description | Filters |
|---|---|---|
pull_request.created | A pull request was created | repository, destination branch (pattern) |
pull_request.updated | A pull request was updated, including new commits on its branch | repository, destination branch (pattern) |
pull_request.approved | A pull request was approved | repository, destination branch (pattern) |
pull_request.unapproved | An approval was removed from a pull request | repository, destination branch (pattern) |
pull_request.changes_requested | Someone requested changes on a pull request | repository, destination branch (pattern) |
pull_request.changes_request_removed | A request for changes was removed from a pull request | repository, destination branch (pattern) |
pull_request.merged | A pull request was merged | repository, destination branch (pattern) |
pull_request.declined | A pull request was declined | repository, destination branch (pattern) |
pull_request_comment.created | A comment was added to a pull request | repository, destination branch (pattern) |
pull_request_comment.updated | A comment on a pull request was edited | repository, destination branch (pattern) |
pull_request_comment.deleted | A comment on a pull request was deleted | repository, destination branch (pattern) |
pull_request_comment.resolved | A comment on a pull request was resolved | repository, destination branch (pattern) |
pull_request_comment.reopened | A resolved comment on a pull request was reopened | repository, destination branch (pattern) |
repository.pushed | Commits, branches or tags were pushed to a repository | repository, branch (pattern), tag (pattern) |
repository.forked | A repository was forked | repository |
repository.updated | A repository's name, description, website or language changed | repository |
repository.created | A repository was created in the workspace | none |
repository.imported | A repository was imported into the workspace | none |
repository.transferred | A repository transfer was accepted | repository |
repository.deleted | A repository was permanently deleted | repository |
commit_comment.created | A comment was added to a commit | repository |
build_status.created | A build reported a status on a commit, such as a Bitbucket Pipelines run | repository, branch (pattern), build state, build name (pattern) |
build_status.updated | A build status on a commit changed | repository, branch (pattern), build state, build name (pattern) |
pipeline_span.created | A finished Bitbucket Pipelines run sent a trace span for the run, a step, a container or a log | repository, branch (pattern), span name (pattern) |
project.updated | A project's settings changed | none |
Every filter is optional. Patterns are case-sensitive.
- Repository lists the workspace's repositories, or only the one set on the connection. Choose one or more. An event without a repository, such as
project.updated, never matches it. - Destination branch matches the branch a pull request merges into, such as
mainorrelease/*. - Branch matches any branch a push created, updated, or deleted, the branch a build ran on, or the branch a pipeline ran on. A build status that doesn't name a branch never matches it.
- Tag matches any tag a push created, moved, or deleted, such as
v*. - Build state is one or more of Successful, Failed, In progress, and Stopped.
- Build name matches the build's name, such as
Unit tests*. - Span name matches the name of a trace span, such as
bbc.pipeline_run.
Some notes on specific events:
- Bitbucket Pipelines reports a build as In progress first, then updates it. For failed Pipelines builds, use
build_status.updatedwith Build state set to Failed. A build system that reports a failed status straight away sendsbuild_status.createdinstead. - A finished Pipelines run sends spans for the run and for its steps, containers, and logs. Set Span name to
bbc.pipeline_runto start one run for each pipeline run. repository.deletedarrives when Bitbucket permanently deletes the repository, which can be up to 30 days after someone deletes it.- New commits on a pull request's branch arrive as
pull_request.updated, whether they were pushed with git or committed through the API. Helios does not offer the separate pull request push event. - A comment edited through the API may not send
pull_request_comment.updated.
Deliveries are verified with the HMAC-SHA256 X-Hub-Signature header. Bitbucket sends no delivery timestamp, so Helios drops repeated deliveries by their X-Request-UUID instead. Bitbucket sends a delivery again, up to two more times, when Helios answers with a server error.
An agent that comments on a pull request can start another pull_request_comment.created run. An agent that opens, approves, or declines a pull request can start the matching pull_request event. One that creates a branch or tag can start repository.pushed, and one that reports a build status can start build_status.created. Say in the prompt which events to ignore, such as comments the agent wrote. See Guarding against events you don't want.
Check that it works
- The connection: after you save, the connection's status shows Connected. Error means Bitbucket rejected the credential or couldn't find the workspace or repository. Click Test Connection to check again.
- The webhook: for a repository webhook, select More actions (…) next to the repository name, then Settings, then Webhooks under Workflow. A webhook titled Helios should be listed. View requests shows its deliveries after you select Enable history. Bitbucket's docs describe no page that lists workspace webhooks, so check a workspace webhook with a test event.
- A trigger:
- Add
pull_request.createdto a workflow with no filters. - Open a test pull request.
- Check that a run starts. Then open the connection in Helios and click Webhook events to see the event.
- Add
Common errors
| What you see | Cause | Fix |
|---|---|---|
| The connection's status shows Error | The token expired or was revoked, Workspace ID or Repository is wrong, or the token lacks read:workspace:bitbucket or read:repository:bitbucket | Check the IDs against your Bitbucket URLs, or create a new token with the scopes above |
| Error with a project or repository access token | Repository is empty | Enter a repository slug in Repository |
| Error after you entered an app password | Bitbucket no longer accepts app passwords | Create an API token with scopes, and enter it in API Token |
Approve access in Bitbucket to finish connecting | Access wasn't approved in Bitbucket | Open the connection and click Re-connect |
| Some events show as unavailable in the trigger picker | Repository is set, and the event is sent only to workspace webhooks. Or the credential lacks the permission the event needs | Leave Repository empty, or add the permission named in the picker. Then save the connection again |
| No Helios webhook, and no runs start | With Repository empty, the account isn't a workspace admin. With it set, the account isn't a repository admin. Or the token lacks the webhook scopes or Repositories Read | Use an admin's credential with the webhook scopes, or set Repository to a repository the account administers. Then save the connection again |
| An old Helios webhook stays after you change the workspace or repository | Helios only removes webhooks for the current workspace and repository | Delete the old webhook in Bitbucket, or create a new connection and delete the old one |
| No run starts, but the webhook is listed | The filters don't match the event | Remove the filters, check that a run starts, then add them back one at a time |
Limits
Bitbucket Cloud counts authenticated requests per user over a rolling hour. Most repository data allows 1,000 requests an hour, and webhook calls allow 1,000 an hour. Requests over a limit get 429 Too Many Requests. See Bitbucket's API request limits. A repository can have up to 50 webhooks.
Workspaces on the Free plan can't use snippets or the repository's Downloads section, and Bitbucket answers those calls with 402 Payment Required. They need the Standard or Premium plan. See changes to Bitbucket Cloud's free plan.
Last updated on
GitLab
The GitLab integration lets Helios agents search and call the GitLab REST API on GitLab.com or a self-managed instance, and run agents automatically when something happens in your projects or groups, such as a push, a new merge request, a failed pipeline, or a comment.
Docusign
The Docusign integration lets Helios agents call the eSignature, Click, Admin, Rooms, Workspaces, Web Forms, Workflow Builder, Agreement Manager, Connected Fields, and Monitor APIs, and run agents automatically on Docusign Connect events.