Bitbucket Repositories API

A Git repository is a virtual storage of your project. It allows you to save versions of your code, which you can access when needed. The repo resource allows you to access public repos, or repos that belong to a specific workspace.

Business capability
Software Construction Management BC-4200.40

Operations 30

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 List all public repositories (deprecated) · List public repositories #
Ask an LLM
“Can I browse every public repository on Bitbucket, not just one workspace's?”
“Is there a global public-repository listing I can page through by creation date?”
Tell an agent
List public repositories across all of Bitbucket created after {after}.
Search all public repositories site-wide with the older global endpoint using filter {q}.
GET /repositories/{workspace} List repositories in a workspace · List repositories in a workspace #
Ask an LLM
“What repositories does a workspace own?”
“Can I list only the repos in a workspace where I am an admin?”
Tell an agent
List all repositories in workspace {workspace}.
Show repos in {workspace} where my role is {role}, sorted by {sort}.
DELETE /repositories/{workspace}/{repo_slug} Delete a repository · Delete a repository #
Ask an LLM
“How do I permanently delete a repository? Do its forks survive?”
“Can I leave a redirect to a new location when I delete a repo?”
Tell an agent destructive · confirm first
Delete repository {workspace}/{repo_slug}.
Delete repo {repo_slug} in workspace {workspace} and redirect visitors to {redirect_to}.
GET /repositories/{workspace}/{repo_slug} Get a repository · Get a repository #
Ask an LLM
“What is a repository's main branch, language and privacy setting?”
“How do I fetch the details of a single repo?”
Tell an agent
Get repository {workspace}/{repo_slug}.
Show me the settings and metadata of repo {repo_slug} in workspace {workspace}.
POST /repositories/{workspace}/{repo_slug} Create a repository · Create a repository #
Ask an LLM
“How do I create a new git repository in a workspace?”
“Can I put a new repo straight into a project and make it private when I create it?”
Tell an agent
Create a new repository {repo_slug} in workspace {workspace}.
Create private repo {repo_slug} in {workspace} under project {project} with is_private {is_private}.
PUT /repositories/{workspace}/{repo_slug} Update a repository's settings · Update a repository #
Ask an LLM
“Can I rename a repository or change its description through the API?”
“How do I make an existing repo private or change its fork policy?”
Tell an agent
Update the description of {workspace}/{repo_slug} to {description}.
Set repo {repo_slug} in workspace {workspace} to private {is_private} with fork policy {fork_policy}.
GET /repositories/{workspace}/{repo_slug}/filehistory/{commit}/{path} List commits that changed a file · List commits that modified a file #
Ask an LLM
“Which commits modified a specific file, newest first?”
“Can I follow a file's history across renames?”
Tell an agent
List the commits that changed {path} as of {commit} in {workspace}/{repo_slug}.
Show the history of file {path} from revision {commit} in repo {repo_slug}, workspace {workspace}, following renames {renames}.
GET /repositories/{workspace}/{repo_slug}/forks List forks of a repository · List repository forks #
Ask an LLM
“Who has forked a repository?”
“How many forks does a repo have, and where do they live?”
Tell an agent
List the forks of {workspace}/{repo_slug}.
Show every fork of repo {repo_slug} in workspace {workspace}.
POST /repositories/{workspace}/{repo_slug}/forks Fork a repository · Fork a repository #
Ask an LLM
“How do I fork a repository into my own workspace?”
“Can I give a fork a different name from the original repo?”
Tell an agent
Fork {workspace}/{repo_slug}.
Fork repo {repo_slug} from workspace {workspace} under the new name {name}.
GET /repositories/{workspace}/{repo_slug}/hooks List a repository's webhooks · List webhooks for a repository #
Ask an LLM
“What webhooks are installed on a repository?”
“Which URLs does this repo send event notifications to?”
Tell an agent
List the webhooks on {workspace}/{repo_slug}.
Show every webhook subscription installed on repo {repo_slug} in workspace {workspace}.
POST /repositories/{workspace}/{repo_slug}/hooks Create a webhook on a repository · Create a webhook for a repository #
Ask an LLM
“How do I get a callback whenever someone pushes to a repository?”
“Can I subscribe a URL to pull request events on one repo?”
Tell an agent
Create a webhook on {workspace}/{repo_slug}.
Add a push-event webhook to repo {repo_slug} in workspace {workspace}.
DELETE /repositories/{workspace}/{repo_slug}/hooks/{uid} Delete a repository webhook · Delete a webhook for a repository #
Ask an LLM
“How do I remove a webhook from a repository for good?”
“Can I delete a repo webhook that points to a retired endpoint?”
Tell an agent destructive · confirm first
Delete webhook {uid} from {workspace}/{repo_slug}.
Remove repo webhook {uid} on repo {repo_slug}, workspace {workspace}.
GET /repositories/{workspace}/{repo_slug}/hooks/{uid} Get a repository webhook · Get a webhook for a repository #
Ask an LLM
“Which events and URL is a specific repo webhook configured with?”
“Is a given webhook on this repository still active?”
Tell an agent
Get webhook {uid} on {workspace}/{repo_slug}.
Show the configuration of repo webhook {uid} in repo {repo_slug}, workspace {workspace}.
PUT /repositories/{workspace}/{repo_slug}/hooks/{uid} Update a repository webhook · Update a webhook for a repository #
Ask an LLM
“Can I change the URL or events of a webhook already on a repo?”
“How do I pause a repository webhook without deleting it?”
Tell an agent
Update webhook {uid} on {workspace}/{repo_slug}.
Deactivate repo webhook {uid} on repo {repo_slug}, workspace {workspace}.
GET /repositories/{workspace}/{repo_slug}/override-settings Get which repo settings override the project · Retrieve the inheritance state for repository settings #
Ask an LLM
“Does a repository inherit its settings from its project or override them?”
“Which settings on this repo are customized instead of inherited?”
Tell an agent
Show the settings inheritance state for {workspace}/{repo_slug}.
Tell me which settings repo {repo_slug} in workspace {workspace} overrides from its project.
PUT /repositories/{workspace}/{repo_slug}/override-settings Set which repo settings override the project · Set the inheritance state for repository settings #
Ask an LLM
“How do I make a repository stop inheriting a setting from its project?”
“Can I switch a repo back to using its project's settings?”
Tell an agent
Set the settings inheritance state for {workspace}/{repo_slug}.
Make repo {repo_slug} in workspace {workspace} inherit its project settings again.
GET /repositories/{workspace}/{repo_slug}/permissions-config/groups List group permissions on a repository · List explicit group permissions for a repository #
Ask an LLM
“Which groups have explicit access to a repository?”
“What permission level does each group hold on this repo?”
Tell an agent
List explicit group permissions on {workspace}/{repo_slug}.
Show which groups can access repo {repo_slug} in workspace {workspace}.
DELETE /repositories/{workspace}/{repo_slug}/permissions-config/groups/{group_slug} Remove a group's access to a repository · Delete an explicit group permission for a repository #
Ask an LLM
“How do I revoke a group's explicit access to a repository?”
“Can I take a team group off a repo entirely?”
Tell an agent destructive · confirm first
Remove group {group_slug}'s permission on {workspace}/{repo_slug}.
Revoke group {group_slug}'s explicit access to repo {repo_slug} in workspace {workspace}.
GET /repositories/{workspace}/{repo_slug}/permissions-config/groups/{group_slug} Get one group's permission on a repository · Get an explicit group permission for a repository #
Ask an LLM
“What access does a particular group have to a repository?”
“Does a given group have write or admin on this repo?”
Tell an agent
Get group {group_slug}'s permission on {workspace}/{repo_slug}.
Show the access level of group {group_slug} for repo {repo_slug}, workspace {workspace}.
PUT /repositories/{workspace}/{repo_slug}/permissions-config/groups/{group_slug} Grant or change a group's repo permission · Update an explicit group permission for a repository #
Ask an LLM
“How do I give a team group write access to a repository?”
“Can I downgrade a group's access on a repo to read only?”
Tell an agent
Give group {group_slug} {permission} access to {workspace}/{repo_slug}.
Set group {group_slug}'s permission on repo {repo_slug}, workspace {workspace}, to {permission}.
GET /repositories/{workspace}/{repo_slug}/permissions-config/users List user permissions on a repository · List explicit user permissions for a repository #
Ask an LLM
“Which individual users have explicit access to a repository?”
“What permission does each person hold on this repo?”
Tell an agent
List explicit user permissions on {workspace}/{repo_slug}.
Show which individual users can access repo {repo_slug} in workspace {workspace}.
DELETE /repositories/{workspace}/{repo_slug}/permissions-config/users/{selected_user_id} Remove a user's access to a repository · Delete an explicit user permission for a repository #
Ask an LLM
“How do I revoke one person's explicit access to a repository?”
“Can I remove a departing contractor from a single repo?”
Tell an agent destructive · confirm first
Remove user {selected_user_id}'s permission on {workspace}/{repo_slug}.
Revoke user {selected_user_id}'s explicit access to repo {repo_slug} in workspace {workspace}.
GET /repositories/{workspace}/{repo_slug}/permissions-config/users/{selected_user_id} Get one user's permission on a repository · Get an explicit user permission for a repository #
Ask an LLM
“What access does a specific person have to a repository?”
“Does a given user hold admin on this repo explicitly?”
Tell an agent
Get user {selected_user_id}'s permission on {workspace}/{repo_slug}.
Show the access level of user {selected_user_id} for repo {repo_slug}, workspace {workspace}.
PUT /repositories/{workspace}/{repo_slug}/permissions-config/users/{selected_user_id} Grant or change a user's repo permission · Update an explicit user permission for a repository #
Ask an LLM
“How do I give a workspace member admin rights on one repository?”
“Can I grant explicit repo access to the workspace owner?”
Tell an agent
Give user {selected_user_id} {permission} access to {workspace}/{repo_slug}.
Set user {selected_user_id}'s permission on repo {repo_slug}, workspace {workspace}, to {permission}.
GET /repositories/{workspace}/{repo_slug}/src Browse the root of the main branch · Get the root directory of the main branch #
Ask an LLM
“What files sit at the top level of a repository's main branch?”
“Can I get the root directory listing as metadata instead of raw content?”
Tell an agent
List the root directory of the main branch in {workspace}/{repo_slug}.
Show top-level files on the default branch of repo {repo_slug}, workspace {workspace}, in format {format}.
POST /repositories/{workspace}/{repo_slug}/src Commit files by uploading them · Create a commit by uploading a file #
Ask an LLM
“Can I commit a file to a repository without cloning it?”
“How do I upload a change to a specific branch with my own commit message?”
Tell an agent
Commit an uploaded file to {workspace}/{repo_slug} with message {message}.
Upload files to branch {branch} of repo {repo_slug} in {workspace} as a commit by {author} with message {message}.
GET /repositories/{workspace}/{repo_slug}/src/{commit}/{path} Read a file or directory at a revision · Get file or directory contents #
Ask an LLM
“How do I read the contents of a file as it was at a specific commit?”
“Can I list a directory recursively up to a certain depth?”
Tell an agent
Get {path} at revision {commit} in {workspace}/{repo_slug}.
List directory {path} at {commit} in repo {repo_slug}, workspace {workspace}, to depth {max_depth}.
GET /repositories/{workspace}/{repo_slug}/watchers List a repository's watchers · List repositories watchers #
Ask an LLM
“Who is watching a repository for updates?”
“How many people follow this repo?”
Tell an agent
List the watchers of {workspace}/{repo_slug}.
Show who watches repo {repo_slug} in workspace {workspace}.
GET /user/permissions/repositories List my repo permissions everywhere (deprecated) · List repository permissions for a user #
Ask an LLM
“Which repositories can I access across all my workspaces, and at what level?”
“Is there an older, non-workspace endpoint for my repository permissions?”
Tell an agent
List my explicit repository permissions across all workspaces.
Show my repository access everywhere using the deprecated global endpoint, filtered by {q}.
GET /user/workspaces/{workspace}/permissions/repositories List my repo permissions in one workspace · List repository permissions in a workspace for a user #
Ask an LLM
“What is my effective permission on each repository in a workspace?”
“Which repos in a given workspace can I write to?”
Tell an agent
List my repository permissions in workspace {workspace}.
Show the repos in {workspace} where my access matches {q}.

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-repositories-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-repositories-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Bitbucket Repositories 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 (237 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/bitbucket/refs/heads/main/openapi/bitbucket-repositories-api-openapi.yml