Bitbucket REST API
Git repository management and CI/CD platform API
Bitbucket REST API enables developers to automate Git repository operations, manage pull requests, configure pipelines, and integrate with Atlassian's DevOps ecosystem. The API provides programmatic access to version control, code review workflows, branch permissions, and deployment automation. Teams use it to build custom integrations, automate release processes, and create developer productivity tools.
https://api.bitbucket.org/2.0
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /repositories/{workspace}/{repo_slug} | Get details about a specific repository including metadata, size, and configuration |
| GET | /repositories/{workspace}/{repo_slug}/pullrequests | List all pull requests for a repository with filtering and pagination options |
| POST | /repositories/{workspace}/{repo_slug}/pullrequests | Create a new pull request with source and destination branches |
| GET | /repositories/{workspace}/{repo_slug}/commits | Retrieve commit history for a repository or specific branch |
| GET | /repositories/{workspace}/{repo_slug}/src/{commit}/{path} | Get file contents at a specific commit or branch |
| POST | /repositories/{workspace}/{repo_slug}/webhooks | Create a webhook to receive events for repository changes and actions |
| GET | /repositories/{workspace}/{repo_slug}/pipelines | List pipeline executions with status, duration, and build information |
| POST | /repositories/{workspace}/{repo_slug}/pipelines | Trigger a new pipeline build for a branch or custom configuration |
| GET | /repositories/{workspace}/{repo_slug}/refs/branches | List all branches in the repository with commit references |
| POST | /repositories/{workspace}/{repo_slug}/refs/branches | Create a new branch from a specific commit or existing branch |
| GET | /repositories/{workspace}/{repo_slug}/issues | Retrieve issues tracked in the repository with filtering options |
| GET | /workspaces/{workspace}/projects | List all projects within a workspace for organization |
| GET | /repositories/{workspace}/{repo_slug}/downloads | List downloadable artifacts and releases for the repository |
| GET | /repositories/{workspace}/{repo_slug}/branch-restrictions | Get branch permission rules and merge restrictions |
| GET | /user/permissions/repositories | List repositories the authenticated user has access to with permission levels |
Sponsor this page
AvailableReach developers actively building with Bitbucket. See live pageview data and self-serve checkout — your slot goes live in minutes.
View inventory & pricing →Code Examples
curl -X GET 'https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Accept: application/json'
Use Bitbucket from Claude / Cursor / ChatGPT
Get a hosted MCP endpoint for Bitbucket. Paste your Bitbucket API key, copy back one URL, drop it into Claude Desktop, Cursor, or any AI client that supports remote MCP. Your AI calls Bitbucket directly with your credentials — no local install, works on mobile.
create_pull_request
Create a new pull request with title, description, source branch, and destination branch
merge_pull_request
Merge an approved pull request with specified merge strategy and commit message
get_repository_files
Browse and retrieve file contents from a repository at a specific commit or branch
trigger_pipeline
Start a CI/CD pipeline build for a branch with optional custom variables
search_code
Search code across repositories in a workspace using query patterns
Connect in 60 seconds
Paste your Bitbucket key → get an MCP URL → paste into Claude/Cursor. Hosted by IOX, encrypted at rest.
Connect Bitbucket to your AI →