Bitbucket Pipelines Addon API
The addon resource is intended to use used by Bitbucket Cloud Connect Apps, and only supports JWT authentication.
The addon resource is intended to use used by Bitbucket Cloud Connect Apps, and only supports JWT authentication.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/bitbucket-pipelines:bitbucket-pipelines-addon-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
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: 3.2.0
info:
title: Bitbucket Addon 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:
- name: Addon
description: 'The addon resource is intended to use used by Bitbucket Cloud Connect
Apps, and only supports JWT authentication.'
paths:
/addon:
parameters: []
delete:
tags:
- Addon
description: 'Deletes the application for the user.
This endpoint is intended to be used by Bitbucket Connect apps
and only supports JWT authentication -- that is how Bitbucket
identifies the particular installation of the app. Developers
with applications registered in the "Develop Apps" section
of Bitbucket Marketplace need not use this endpoint as
updates for those applications can be sent out via the
UI of that section.
```
$ curl -X DELETE https://api.bitbucket.org/2.0/addon \
-H "Authorization: JWT "
```'
summary: Delete an app
responses:
'204':
description: Request has succeeded. The application has been deleted for the user.
'401':
description: No authorization.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: Improper authentication.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2: []
- basic: []
- api_key: []
operationId: deleteAddon
x-operation-id-source: derived
put:
tags:
- Addon
description: 'Updates the application installation for the user.
This endpoint is intended to be used by Bitbucket Connect apps
and only supports JWT authentication -- that is how Bitbucket
identifies the particular installation of the app. Developers
with applications registered in the "Develop Apps" section
of Bitbucket need not use this endpoint as updates for those
applications can be sent out via the UI of that section.
Passing an empty body will update the installation using the
existing descriptor URL.
```
$ curl -X PUT https://api.bitbucket.org/2.0/addon \
-H "Authorization: JWT " \
--header "Content-Type: application/json" \
--data ''{}''
```
The new `descriptor` for the installation can be also provided
in the body directly.
```
$ curl -X PUT https://api.bitbucket.org/2.0/addon \
-H "Authorization: JWT " \
--header "Content-Type: application/json" \
--data ''{"descriptor": $NEW_DESCRIPTOR}''
```
In both these modes the URL of the descriptor cannot be changed. To
change the descriptor location and upgrade an installation
the request must be made exclusively with a `descriptor_url`.
```
$ curl -X PUT https://api.bitbucket.org/2.0/addon \
-H "Authorization: JWT " \
--header "Content-Type: application/json" \
--data ''{"descriptor_url": $NEW_URL}''
```
The `descriptor_url` must exactly match the marketplace registration
that Atlassian has for the application. Contact your Atlassian
developer advocate to update this registration. Once the registration
has been updated you may call this resource for each installation.
Note that the scopes of the application cannot be increased
in the new descriptor nor reduced to none.'
summary: Update an installed app
responses:
'204':
description: Request has succeeded. The installation has been updated to the new descriptor.
'400':
description: Scopes have increased or decreased to none.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'401':
description: No authorization.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: Improper authentication.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2: []
- basic: []
- api_key: []
operationId: putAddon
x-operation-id-source: derived
/addon/linkers:
parameters: []
get:
tags:
- Addon
description: 'Gets a list of all linkers
for the authenticated application.
This endpoint is deprecated and will be removed by May 2026.'
summary: List linkers for an app
responses:
'200':
description: Successful.
'401':
description: Authentication must use app JWT
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2: []
- basic: []
- api_key: []
deprecated: true
operationId: getAddonLinkers
x-operation-id-source: derived
/addon/linkers/{linker_key}:
parameters:
- name: linker_key
in: path
description: 'The unique key of a [linker module](/cloud/bitbucket/modules/linker/)
as defined in an application descriptor.'
required: true
schema:
type: string
get:
tags:
- Addon
description: 'Gets a linker specified by `linker_key`
for the authenticated application.
This endpoint is deprecated and will be removed by May 2026.'
summary: Get a linker for an app
responses:
'200':
description: Successful.
'401':
description: Authentication must use app JWT
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: The linker does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2: []
- basic: []
- api_key: []
deprecated: true
operationId: getAddonLinkersByLinkerKey
x-operation-id-source: derived
/addon/linkers/{linker_key}/values:
parameters:
- name: linker_key
in: path
description: 'The unique key of a [linker module](/cloud/bitbucket/modules/linker/)
as defined in an application descriptor.'
required: true
schema:
type: string
delete:
tags:
- Addon
description: 'Delete all linker values for the
specified linker of the authenticated application.
This endpoint is deprecated and will be removed by May 2026.'
summary: Delete all linker values
responses:
'204':
description: Successfully deleted the linker values.
'401':
description: Authentication must use app JWT
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: The linker does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2: []
- basic: []
- api_key: []
deprecated: true
operationId: deleteAddonLinkersByLinkerKeyValues
x-operation-id-source: derived
get:
tags:
- Addon
description: 'Gets a list of all linker values for the
specified linker of the authenticated application.
A linker value lets applications supply values to modify its regular expression.
The base regular expression must use a Bitbucket-specific match group `(?K)`
which will be translated to `([\w\-]+)`. A value must match this pattern.
Read more about linker values
This endpoint is deprecated and will be removed by May 2026.'
summary: List linker values for a linker
responses:
'200':
description: Successful.
'401':
description: Authentication must use app JWT
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: The linker does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2: []
- basic: []
- api_key: []
deprecated: true
operationId: getAddonLinkersByLinkerKeyValues
x-operation-id-source: derived
post:
tags:
- Addon
description: 'Creates a linker value for the specified
linker of authenticated application.
A linker value lets applications supply values to modify its regular expression.
The base regular expression must use a Bitbucket-specific match group `(?K)`
which will be translated to `([\w\-]+)`. A value must match this pattern.
Read more about linker values
This endpoint is deprecated and will be removed by May 2026.'
summary: Create a linker value
responses:
'201':
description: Successfully created the linker value.
'401':
description: Authentication must use app JWT
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: The linker does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'409':
description: The linker already has the value being added.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2: []
- basic: []
- api_key: []
deprecated: true
operationId: postAddonLinkersByLinkerKeyValues
x-operation-id-source: derived
put:
tags:
- Addon
description: 'Bulk update linker values for the specified
linker of the authenticated application.
A linker value lets applications supply values to modify its regular expression.
The base regular expression must use a Bitbucket-specific match group `(?K)`
which will be translated to `([\w\-]+)`. A value must match this pattern.
Read more about linker values
This endpoint is deprecated and will be removed by May 2026.'
summary: Update a linker value
responses:
'204':
description: Successfully updated the linker values.
'400':
description: Invalid input.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'401':
description: Authentication must use app JWT
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: The linker does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2: []
- basic: []
- api_key: []
deprecated: true
operationId: putAddonLinkersByLinkerKeyValues
x-operation-id-source: derived
/addon/linkers/{linker_key}/values/{value_id}:
parameters:
- name: linker_key
in: path
description: 'The unique key of a [linker module](/cloud/bitbucket/modules/linker/)
as defined in an application descriptor.'
required: true
schema:
type: string
- name: value_id
in: path
description: The numeric ID of the linker value.
required: true
schema:
type: integer
delete:
tags:
- Addon
description: 'Delete a single linker value
of the authenticated application.
This endpoint is deprecated and will be removed by May 2026.'
summary: Delete a linker value
responses:
'204':
description: Successfully deleted the linker value.
'401':
description: Authentication must use app JWT
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: The linker value does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2: []
- basic: []
- api_key: []
deprecated: true
operationId: deleteAddonLinkersByLinkerKeyValuesByValueId
x-operation-id-source: derived
get:
tags:
- Addon
description: 'Get a single linker value
of the authenticated application.
This endpoint is deprecated and will be removed by May 2026.'
summary: Get a linker value
responses:
'200':
description: Successful.
'401':
description: Authentication must use app JWT
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: The linker value does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2: []
- basic: []
- api_key: []
deprecated: true
operationId: getAddonLinkersByLinkerKeyValuesByValueId
x-operation-id-source: derived
/addon/{addon_key}/client-key:
parameters:
- name: addon_key
in: path
description: 'The Connect addon key as defined in an application descriptor.
'
required: true
schema:
type: string
get:
tags:
- Addon
description: 'Get the client key of the Connect addon associated with a Forge app install via forgeAppId linkage.
This endpoint is part of the Connect -> Forge migration tooling. It is intended to be used by a Forge app
using `asApp().requestBitbucket()` only.
Prerequisite: app developer needs to register the linkage between their Connect and Forge app by setting
`forgeAppId` in the Connect addon descriptor to `app.id` from Forge app manifest, then update the installations.
If the request came from an installation of a registered Forge app, the client key of the linked Connect addon
installed in the same workspace will be returned.
```
api.asApp().requestBitbucket(route`/2.0/addon/{addon-key}/client-key`)
```'
summary: Get the client key of a Connect addon
responses:
'200':
description: The client key of the Connect addon linked to the Forge app installation where the request was made
'401':
description: Invalid authentication.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: Improper authorization.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: The Connect addon or the Forge app does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2: []
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- admin:workspace:bitbucket
x-atlassian-auth-types:
- forge-oauth2
operationId: getAddonByAddonKeyClientKey
x-operation-id-source: derived
components:
schemas:
error:
type: object
title: Error
description: Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`.
properties:
type:
type: string
error:
type: object
properties:
message:
type: string
detail:
type: string
data:
type: object
description: Optional structured data that is endpoint-specific.
properties: {}
additionalProperties: true
required:
- message
additionalProperties: false
required:
- type
additionalProperties: true
securitySchemes:
basic:
type: http
scheme: basic
description: Basic HTTP Authentication as per [RFC-2617](https://tools.ietf.org/html/rfc2617) (Digest not supported). Note that Basic Auth is available only with username and app password as credentials.
oauth2:
type: oauth2
flows:
authorizationCode:
scopes:
repository: Read your repositories
repository:write: Read and modify your repositories
repository:admin: Administer your repositories
repository:delete: Delete your repositories
project: Read your workspace's project settings and read repositories contained within your workspace's projects
project:admin: Read and modify settings for projects in your workspace
email: Read your account's primary email address
account: Read your account information
account:write: Read and modify your account information
team: Read your team membership information
team:write: Read and modify your team membership information
pipeline: Access your repositories' build pipelines
pipeline:write: Access and rerun your repositories' build pipelines
pipeline:variable: Access your repositories' build pipelines and configure their variables
runner: Access your workspaces/repositories' runners
runner:write: Access and edit your workspaces/repositories' runners
test: Access your workspaces/repositories' test
test:write: Access and edit your workspaces/repositories' test
pullrequest: Read your repositories and their pull requests
pullrequest:write: Read and modify your repositories and their pull requests
webhook: Read and modify your repositories' webhooks
issue: Read your repositories' issues
issue:write: Read and modify your repositories' issues
snippet: Read your snippets
snippet:write: Read and modify your snippets
wiki: Read and modify your repositories' wikis
authorizationUrl: https://bitbucket.org/site/oauth2/authorize
tokenUrl: https://bitbucket.org/site/oauth2/access_token
description: OAuth 2 as per [RFC-6749](https://tools.ietf.org/html/rfc6749).
api_key:
name: Authorization
type: apiKey
description: API Keys can be used as Basic HTTP Authentication credentials and provide a substitute for the account's actual username and password. API Keys are only available to team accounts and there is only 1 key per account. API Keys do not support scopes and have therefore access to all contents of the account.
in: header
x-revision: 1e0692ed4864
x-atlassian-narrative:
documents:
# --- truncated at 32 KB (129 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/bitbucket-pipelines/refs/heads/main/openapi/bitbucket-pipelines-addon-api-openapi.yml