---
title: "Create Bitbucket Access Token Installation"
method: POST
path: "/api/v1/installations/create-bitbucket-token-installation"
tags: ["Installations"]
---

# Create Bitbucket Access Token Installation

`POST /api/v1/installations/create-bitbucket-token-installation`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v1/installations/create-bitbucket-token-installation`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

## Request body

- union
  - object
    - `accessToken` string, required
    - `organizationId` string, required
    - `customDomain` string, required
    - `targetScope` 'INSTANCE', required
    - `mode` 'create' | 'update': Defaults to create. Update requires installationId.
    - `installationId` string: Existing installation to rotate when mode is update.
  - object
    - `accessToken` string, required
    - `organizationId` string, required
    - `customDomain` string
    - `workspace` string, required: Cloud workspace slug or Data Center project key.
    - `targetScope` 'WORKSPACE_OR_PROJECT', required
    - `mode` 'create' | 'update': Defaults to create. Update requires installationId.
    - `installationId` string: Existing installation to rotate when mode is update.
  - object: Legacy workspace/project-scoped request without targetScope.
    - `accessToken` string, required
    - `organizationId` string, required
    - `customDomain` string
    - `workspace` string, required
    - `mode` 'create' | 'update'
    - `installationId` string: Existing installation to rotate when mode is update.

## Response `200`

Bitbucket installation created or updated

- BitbucketInstallationMutationResponse
  - `ok` true, required
  - `installationId` string, required

## Other responses

- `400`: Bad Request
- `401`: Unauthorized

---

[API](https://skmtc.dev/zeropath/apis/zeropath-api-2.md) - [All operations](https://skmtc.dev/zeropath/apis/zeropath-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/zeropath/apis/zeropath-api-2/revisions/ea6ae4b68cd3?raw)
