---
title: "Create a Bitbucket Cloud provider with access token or app password authentication"
method: POST
path: "/git-providers/bitbucket"
tags: ["Git Providers"]
---

# Create a Bitbucket Cloud provider with access token or app password authentication

`POST /git-providers/bitbucket`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/git-providers/bitbucket`
- Auth: HTTP bearer

## Request body

- CreateBitbucketRequest
  - `auth` union, required: Authentication credentials — either an access token or an app password.
    - object: Personal / Workspace / Repository Access Token.
      - `token` string, password, required: The Bitbucket access token value.
      - `type` 'access_token', required
    - object: HTTP Basic / App Password authentication.
      - `password` string, password, required: App password generated in Bitbucket security settings.
      - `type` 'app_password', required
      - `username` string, required: Bitbucket account username.
  - `name` string, required: Display name for this provider.

## Response `201`

Bitbucket provider created successfully

- ProviderResponse
  - `auth_method` string, required
  - `base_url` string, nullable
  - `created_at` string, date-time, required
  - `id` integer, required
  - `is_active` boolean, required
  - `is_default` boolean, required
  - `name` string, required
  - `provider_type` string, required
  - `updated_at` string, date-time, required

## Other responses

- `400`: Bad request — missing or invalid auth fields
- `401`: Unauthorized
- `403`: Forbidden
- `500`: Internal server error

## Changes

- **2026-10-23** `7d41b820a372`: 1 breaking, 1 info
  - removed `subschema #1, subschema #2` from the `auth` request property `oneOf` list
  - added `subschema #1, subschema #2` to the `auth` request property `oneOf` list
- **2026-10-23** `24af93ff5379`: 1 breaking, 1 info
  - removed `subschema #1, subschema #2` from the `auth` request property `oneOf` list
  - added `subschema #1, subschema #2` to the `auth` request property `oneOf` list
- **2026-10-22** `842d42ed4659`: 1 breaking, 1 info
  - removed `subschema #1, subschema #2` from the `auth` request property `oneOf` list
  - added `subschema #1, subschema #2` to the `auth` request property `oneOf` list
- **2026-10-22** `1a12a50b75ee`: 1 breaking, 1 info
  - removed `subschema #1, subschema #2` from the `auth` request property `oneOf` list
  - added `subschema #1, subschema #2` to the `auth` request property `oneOf` list
- **2026-10-21** `79089e9f49ee`: 1 breaking, 1 info
  - removed `subschema #1, subschema #2` from the `auth` request property `oneOf` list
  - added `subschema #1, subschema #2` to the `auth` request property `oneOf` list

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/git-providers/bitbucket/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
