---
title: "Add a BitBucket repository to zeropath"
method: POST
path: "/api/v1/repositories/add-bitbucket"
tags: ["Repositories"]
---

# Add a BitBucket repository to zeropath

`POST /api/v1/repositories/add-bitbucket`

## Request

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

## Request body

- AddBitBucketRepoInput
  - `organizationId` string, required
  - `installationId` string: Bitbucket installation that listed these repositories. Required when the organization has multiple installations.
  - `repos` object[], required
    - `gitAuthorEmail` string, required
    - `repositoryUrl` string, required
    - `repositoryName` string, required
    - `defaultBranch` string, nullable, required
    - `webhookSigningSecret` string: Ignored. ZeroPath creates and stores one signing secret per Bitbucket project.

## Response `200`

Successful response

- object[]
  - `id` string, required
  - `webhookCreated` boolean
  - `webhookError` string

## 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)
