Bitbucket Source API

Browse the source code in the repository and create new commits by uploading.

Business capability
Software Construction Management BC-4200.40

Operations 4

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /repositories/{workspace}/{repo_slug}/filehistory/{commit}/{path} List commits that changed a file · List commits that modified a file #
Ask an LLM
“Who changed this file and when?”
“Can the file history follow renames?”
Tell an agent
List commits that modified {path} as of {commit} in {workspace}/{repo_slug}.
Show the history of {path} at {commit}, following renames {renames}.
GET /repositories/{workspace}/{repo_slug}/src Browse the main branch root directory · Get the root directory of the main branch #
Ask an LLM
“What files are at the top level of my repo's main branch?”
“Can I browse the root of a repository without knowing a commit hash?”
Tell an agent
Show the root directory of the main branch in {workspace}/{repo_slug}.
Browse the top-level files of {repo_slug} as {format}.
POST /repositories/{workspace}/{repo_slug}/src Commit files by uploading them · Create a commit by uploading a file #
Ask an LLM
“Can I make a commit by uploading a file, without git?”
“How do I commit a file to a specific branch with a message?”
Tell an agent
Upload files to {workspace}/{repo_slug} as a new commit with message {message}.
Commit uploaded files to branch {branch} with author {author}.
GET /repositories/{workspace}/{repo_slug}/src/{commit}/{path} Read a file or directory at a revision · Get file or directory contents #
Ask an LLM
“What did this file look like at an older commit?”
“Can I list a directory's contents several levels deep?”
Tell an agent
Get the contents of {path} at {commit} in {workspace}/{repo_slug}.
List directory {path} at {commit} up to depth {max_depth}.

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/bitbucket:bitbucket-source-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

bitbucket-source-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Bitbucket Source API
  description: Code against the Bitbucket API to automate simple tasks, embed Bitbucket data into your own site, build mobile or desktop apps, or even add custom UI add-ons into Bitbucket itself using the Connect framework.
  version: '2.0'
  termsOfService: https://www.atlassian.com/legal/customer-agreement
  contact:
    name: Bitbucket Support
    url: https://support.atlassian.com/bitbucket-cloud/
    email: support@bitbucket.org
servers:
- url: https://api.bitbucket.org/2.0
tags:


# --- truncated at 32 KB (152 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/bitbucket/refs/heads/main/openapi/bitbucket-source-api-openapi.yml