Bitbucket Deployments API

Teams are deploying code faster than ever, thanks to continuous delivery practices and tools like Bitbucket Pipelines. Bitbucket Deployments gives teams visibility into their deployment environments and helps teams to track how far changes have progressed in their deployment pipeline.

Business capability
Software Release & Deployment Management BC-4210

Operations 16

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}/deploy-keys List a repository's deploy keys · List repository deploy keys #
Ask an LLM
“Which read-only access keys are installed on this repo?”
“Can I audit the deploy keys that can clone a repository?”
Tell an agent
List deploy keys on repository {workspace}/{repo_slug}.
Show every access key added to repo {repo_slug}.
POST /repositories/{workspace}/{repo_slug}/deploy-keys Add a deploy key to a repository · Add a repository deploy key #
Ask an LLM
“How do I give a build server SSH access to a single repo?”
“Can I add a labelled access key to one repository?”
Tell an agent
Add a deploy key to repository {workspace}/{repo_slug}.
Install a new access key for my CI server on repo {repo_slug}.
DELETE /repositories/{workspace}/{repo_slug}/deploy-keys/{key_id} Remove a repository deploy key · Delete a repository deploy key #
Ask an LLM
“How do I revoke a deploy key from one repo?”
“Can I delete a repository access key that leaked?”
Tell an agent destructive · confirm first
Delete deploy key {key_id} from repository {workspace}/{repo_slug}.
Revoke repo access key {key_id} in {repo_slug}.
GET /repositories/{workspace}/{repo_slug}/deploy-keys/{key_id} Get a repository deploy key · Get a repository deploy key #
Ask an LLM
“What label and comment does a specific repo deploy key have?”
“When was a particular repository access key last used?”
Tell an agent
Get deploy key {key_id} on repository {workspace}/{repo_slug}.
Show repo access key {key_id}'s label.
PUT /repositories/{workspace}/{repo_slug}/deploy-keys/{key_id} Relabel a repository deploy key · Update a repository deploy key #
Ask an LLM
“How do I rename the label on an existing repo deploy key?”
“Can I change a repository access key's comment without replacing it?”
Tell an agent
Update the label on deploy key {key_id} in repository {workspace}/{repo_slug}.
Change the comment on repo access key {key_id}.
GET /repositories/{workspace}/{repo_slug}/deployments List deployments in a repository · List deployments #
Ask an LLM
“What has been deployed from this repository recently?”
“Can I see the deployment history across all environments of a repo?”
Tell an agent
List deployments in {workspace}/{repo_slug}.
Show the deployment history for repo {repo_slug} in workspace {workspace}.
GET /repositories/{workspace}/{repo_slug}/deployments/{deployment_uuid} Get a deployment · Get a deployment #
Ask an LLM
“What's the state of one specific deployment?”
“Can I see which release and environment a given deployment targeted?”
Tell an agent
Get deployment {deployment_uuid} in {workspace}/{repo_slug}.
Show details of deployment {deployment_uuid} for repo {repo_slug}.
GET /repositories/{workspace}/{repo_slug}/environments List deployment environments · List environments #
Ask an LLM
“Which deployment environments are set up for this repo?”
“Can I list test, staging and production environments for a repository?”
Tell an agent
List deployment environments for {workspace}/{repo_slug}.
Show every environment configured on repo {repo_slug}.
POST /repositories/{workspace}/{repo_slug}/environments Create a deployment environment · Create an environment #
Ask an LLM
“How do I add a new deployment environment like QA to a repo?”
“Can I create a named environment for tracking deployments?”
Tell an agent
Create a deployment environment named {name} in {workspace}/{repo_slug}.
Add environment {name} to repo {repo_slug}.
GET /repositories/{workspace}/{repo_slug}/environments/{environment_uuid} Get a deployment environment · Get an environment #
Ask an LLM
“What are the settings of one deployment environment?”
“Can I look up an environment by its UUID?”
Tell an agent
Get environment {environment_uuid} in {workspace}/{repo_slug}.
Show the details of deployment environment {environment_uuid} on repo {repo_slug}.
DELETE /repositories/{workspace}/{repo_slug}/environments/{environment_uuid} Delete a deployment environment · Delete an environment #
Ask an LLM
“How do I delete a deployment environment we no longer use?”
“Can I remove an environment from a repository entirely?”
Tell an agent destructive · confirm first
Delete environment {environment_uuid} from {workspace}/{repo_slug}.
Remove deployment environment {environment_uuid} on repo {repo_slug}.
POST /repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes Change a deployment environment's settings · Update an environment #
Ask an LLM
“How do I rename or reconfigure an existing deployment environment?”
“Can I submit changes to an environment's settings through the API?”
Tell an agent
Update environment {environment_uuid} in {workspace}/{repo_slug}.
Apply changes to deployment environment {environment_uuid} on repo {repo_slug}.
GET /workspaces/{workspace}/projects/{project_key}/deploy-keys List a project's deploy keys · List project deploy keys #
Ask an LLM
“Which access keys can read every repo in a project?”
“Can I see the deploy keys set at project level?”
Tell an agent
List deploy keys on project {project_key} in {workspace}.
Show project-level access keys for {project_key}.
POST /workspaces/{workspace}/projects/{project_key}/deploy-keys Add a deploy key to a project · Create a project deploy key #
Ask an LLM
“How do I give one SSH key read access to all repos in a project?”
“Can a single access key cover a whole project?”
Tell an agent
Add a deploy key to project {project_key} in {workspace}.
Create a project-wide access key on {project_key}.
DELETE /workspaces/{workspace}/projects/{project_key}/deploy-keys/{key_id} Remove a project deploy key · Delete a deploy key from a project #
Ask an LLM
“How do I revoke a project-wide deploy key?”
“Can I delete an access key from a project?”
Tell an agent destructive · confirm first
Delete deploy key {key_id} from project {project_key} in {workspace}.
Revoke project access key {key_id} on {project_key}.
GET /workspaces/{workspace}/projects/{project_key}/deploy-keys/{key_id} Get a project deploy key · Get a project deploy key #
Ask an LLM
“What are the details of one project-level deploy key?”
“Can I look up a project access key by its id?”
Tell an agent
Get deploy key {key_id} on project {project_key} in {workspace}.
Show project access key {key_id} for {project_key}.

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