---
title: Bitbucket API Integration on Truto
slug: bitbucket
category: Ticketing
canonical: "https://truto.one/integrations/detail/bitbucket/"
---

# Bitbucket API Integration on Truto



**Category:** Ticketing  
**Status:** Generally available

## Unified APIs

### Unified CI/CD API

- **Branches** — The branch represent a branch in the CI/CD.
- **Builds** — The build represent a build in the CI/CD.
- **Caches** — The cache represent a cache in the CI/CD.
- **Jobs** — The job represent a job in the CI/CD.
- **Pull-Requests** — 
- **Repos** — The repo represent a repository in the CI/CD.
- **Workspaces** — The Workspace object is used to represent a workspace within a company.

### Unified User Directory API

- **Roles** — The Role object represents a role of a User.
- **Users** — The User object represents a User.
- **Workspaces** — Workspaces represent concepts like teams, workspaces, projects in apps that support them

### Unified Ticketing API

- **Attachments** — Attachments are the files associated with a ticket or a comment.
- **Collections** — Tickets and contacts can be grouped into Collections. Collection resource usually maps to the various grouping systems used in the underlying product. Some examples are lists, projects, epics, etc. You can differentiate between these grouping systems using the type attribute of a Collection.
- **Comments** — Comments represent the communication happening on a Ticket, both between a User and a Contact and the internal things like notes, private comments, etc. A Ticket can have one or more Comments.
- **Ticket Priorities** — Ticket Priorities represent the intended order in which the Tickets should be worked on. Some products provide customizing the Ticket Priorities.
- **Ticket Status** — Ticket Status represents the completion level of the Ticket. Some products provide customizing the Ticket Status.
- **Ticket Types** — Ticket Types represent the classification system used by the underlying products for Tickets. Some examples are bugs, feature, incident, etc.
- **Tickets** — Core resource which represents some work that needs to be carried out. Tickets are usually mapped to issues, tasks, work items, etc. depending on the underlying product.
- **Workspaces** — Workspaces represent the top-level subdivision in a ticketing system. They usually have their own set of settings, tickets, statuses, priorities and users. Some of the usual terminologies used by the products for the top-level subdivision are projects, bases, spaces, workspace, etc. A Workspace could belong to an Organization.

### Unified Search API

- **Search** — Search endpoint for all the apps.

## How it works

1. **Link your customer's Bitbucket account.** Use Truto's frontend SDK; we handle every OAuth and API key flow so you don't need to create the OAuth app.
2. **Authentication is automatic.** Truto refreshes tokens, stores credentials securely, and injects them into every API request.
3. **Call Truto's API to reach Bitbucket.** The Proxy API is a 1-to-1 mapping of the Bitbucket API.
4. **Get a unified response format.** Every response uses a single shape, with cursor-based pagination and data in the `result` field.

## Use cases

- **Sync Bitbucket Issues into your product management platform** — Product and roadmapping SaaS companies can offer their users a native Bitbucket integration that pulls issue status, priority, and type changes in real time. This lets product managers track engineering progress without leaving their preferred tool, while developers stay in Bitbucket.
- **Escalate customer bugs directly into Bitbucket repositories** — Helpdesk and support SaaS platforms can let agents create Bitbucket Issues from support tickets with a single click, attaching error logs and customer context. Developer replies posted as Bitbucket comments flow back as internal notes, keeping both teams in sync without context-switching.
- **Ingest CI/CD and pull request data for developer analytics** — Engineering intelligence platforms can pull branches, pull requests, builds, and jobs from their customers' Bitbucket workspaces to calculate cycle time, review latency, and DORA metrics — giving engineering leaders actionable visibility into delivery performance.
- **Auto-create security and compliance issues in Bitbucket** — Security posture and vulnerability management SaaS products can programmatically open prioritized Bitbucket Issues with remediation guidance whenever a scan detects a problem, reducing mean-time-to-remediation by meeting developers where they already work.
- **Mirror Bitbucket workspace membership for access control** — Any B2B SaaS that needs to scope data visibility per user can sync Bitbucket workspace members and roles, ensuring their application respects the same permissions structure customers have already configured in Bitbucket.

## What you can build

- **Two-way issue sync with status mapping** — Automatically map Bitbucket Issue states (open, resolved, duplicate) and priorities (critical, major, trivial) to your product's internal ticket lifecycle so updates flow bidirectionally without manual effort.
- **One-click bug filing from support tickets** — Let support agents create a Bitbucket Issue in the correct repository, pre-populated with customer context and file attachments, directly from your helpdesk UI.
- **Cross-platform comment thread** — Surface Bitbucket Issue comments as internal notes in your application and push replies back as Bitbucket comments, enabling seamless conversation across tools.
- **CI/CD health dashboard** — Aggregate build and job outcomes from Bitbucket Pipelines across all customer repos to display pass/fail trends, average build duration, and pipeline bottlenecks.
- **Pull request cycle-time analytics** — Track PR open-to-merge duration, review wait times, and branch activity across Bitbucket repositories to power engineering productivity insights.
- **Workspace-aware user provisioning** — Sync Bitbucket workspace users and their roles into your app to auto-provision accounts and enforce repository-scoped access control without manual configuration.

## FAQs

### What authentication method does Bitbucket use through Truto?

Bitbucket Cloud supports OAuth 2.0 for user-authorized access. Truto manages the full OAuth flow — token acquisition, storage, and automatic refresh — so your application never handles raw credentials.

### How are Bitbucket Issues mapped in the Unified Ticketing API?

Bitbucket Issues map to Tickets. The issue's 'kind' field (bug, enhancement, task, proposal) maps to Ticket Types, 'state' (open, new, resolved, on hold, invalid, duplicate, wontfix, closed) maps to Ticket Statuses, and 'priority' (trivial, minor, major, critical, blocker) maps to Ticket Priorities. Repositories serve as Collections.

### Which Unified APIs cover Bitbucket?

Bitbucket is available through the Unified Ticketing API (issues, comments, attachments, priorities, statuses, types, workspaces), the Unified CI/CD API (repos, branches, pull requests, builds, jobs, caches, workspaces), the Unified User Directory API (users, roles, workspaces), and the Unified Search API.

### Does Truto handle Bitbucket API pagination automatically?

Yes. Bitbucket's REST API uses cursor-based pagination. Truto abstracts this entirely — your application receives complete result sets through the Unified API without implementing pagination logic.

### Can I create and update Bitbucket Issues, or is access read-only?

The Unified Ticketing API supports both read and write operations. You can create new issues, update existing issue fields (status, priority, assignee), post comments, and add attachments programmatically.

### Are Bitbucket-specific tools available today, or built on request?

Bitbucket currently has no pre-built proxy tools. Truto builds integration tools on request, typically with fast turnaround. The Unified APIs (Ticketing, CI/CD, User Directory, Search) are available and provide standardized access to Bitbucket data.
