Bitbucket Pipelines Snippets API

Snippets allow you share code segments or files with yourself, members of your workspace, or the world. Like pull requests, repositories and workspaces, the full set of snippets is defined by what the current user has access to. This includes all snippets owned by any of the workspaces the user is a member of, or snippets by other users that the current user is either watching or has collaborated on (for instance by commenting on it).

Operations 25

GET /snippets List snippets #
POST /snippets Create a snippet #
GET /snippets/{workspace} List snippets in a workspace #
POST /snippets/{workspace} Create a snippet for a workspace #
DELETE /snippets/{workspace}/{encoded_id} Delete a snippet #
GET /snippets/{workspace}/{encoded_id} Get a snippet #
PUT /snippets/{workspace}/{encoded_id} Update a snippet #
GET /snippets/{workspace}/{encoded_id}/comments List comments on a snippet #
POST /snippets/{workspace}/{encoded_id}/comments Create a comment on a snippet #
DELETE /snippets/{workspace}/{encoded_id}/comments/{comment_id} Delete a comment on a snippet #
GET /snippets/{workspace}/{encoded_id}/comments/{comment_id} Get a comment on a snippet #
PUT /snippets/{workspace}/{encoded_id}/comments/{comment_id} Update a comment on a snippet #
GET /snippets/{workspace}/{encoded_id}/commits List snippet changes #
GET /snippets/{workspace}/{encoded_id}/commits/{revision} Get a previous snippet change #
GET /snippets/{workspace}/{encoded_id}/files/{path} Get a snippet's raw file at HEAD #
DELETE /snippets/{workspace}/{encoded_id}/watch Stop watching a snippet #
GET /snippets/{workspace}/{encoded_id}/watch Check if the current user is watching a snippet #
PUT /snippets/{workspace}/{encoded_id}/watch Watch a snippet #
GET /snippets/{workspace}/{encoded_id}/watchers List users watching a snippet #
DELETE /snippets/{workspace}/{encoded_id}/{node_id} Delete a previous revision of a snippet #
GET /snippets/{workspace}/{encoded_id}/{node_id} Get a previous revision of a snippet #
PUT /snippets/{workspace}/{encoded_id}/{node_id} Update a previous revision of a snippet #
GET /snippets/{workspace}/{encoded_id}/{node_id}/files/{path} Get a snippet's raw file #
GET /snippets/{workspace}/{encoded_id}/{revision}/diff Get snippet changes between versions #
GET /snippets/{workspace}/{encoded_id}/{revision}/patch Get snippet patch between versions #

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