> ## Documentation Index
> Fetch the complete documentation index at: https://zeropath.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Bitbucket Access Token Installation



## OpenAPI

````yaml https://zeropath.com/openapi/v1.yaml post /api/v1/installations/create-bitbucket-token-installation
openapi: 3.1.0
info:
  title: ZeroPath API
  version: 1.0.0
  description: Public API for ZeroPath
servers:
  - url: https://zeropath.com
    description: Production server
    x-fern-server-name: Production
  - url: https://dev.branch.zeropath.com
    description: Development server
    x-fern-server-name: Development
security:
  - apiTokenId: []
    apiTokenSecret: []
tags:
  - name: Organizations
    description: Operations related to organizations
  - name: Stats
    description: Operations related to stats
  - name: Repositories
    description: Operations related to repositories
  - name: Installations
    description: Operations related to installations
  - name: Issues
    description: Operations related to issues
  - name: SCA
    description: Software Composition Analysis
  - name: Scans
    description: Operations related to scans
  - name: Rules
    description: Operations related to custom security rules
  - name: Referrals
    description: Operations related to referrals
paths:
  /api/v1/installations/create-bitbucket-token-installation:
    post:
      tags:
        - Installations
      summary: Create Bitbucket Access Token Installation
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBitbucketTokenInstallationInput'
      responses:
        '200':
          description: Bitbucket installation created or updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitbucketInstallationMutationResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    CreateBitbucketTokenInstallationInput:
      oneOf:
        - type: object
          properties:
            accessToken:
              type: string
            organizationId:
              type: string
            customDomain:
              type: string
            targetScope:
              type: string
              enum:
                - INSTANCE
            mode:
              type: string
              enum:
                - create
                - update
              description: Defaults to create. Update requires installationId.
            installationId:
              type: string
              description: Existing installation to rotate when mode is update.
          required:
            - accessToken
            - organizationId
            - customDomain
            - targetScope
          additionalProperties: false
        - type: object
          properties:
            accessToken:
              type: string
            organizationId:
              type: string
            customDomain:
              type: string
            workspace:
              type: string
              description: Cloud workspace slug or Data Center project key.
            targetScope:
              type: string
              enum:
                - WORKSPACE_OR_PROJECT
            mode:
              type: string
              enum:
                - create
                - update
              description: Defaults to create. Update requires installationId.
            installationId:
              type: string
              description: Existing installation to rotate when mode is update.
          required:
            - accessToken
            - organizationId
            - workspace
            - targetScope
          additionalProperties: false
        - type: object
          description: Legacy workspace/project-scoped request without targetScope.
          properties:
            accessToken:
              type: string
            organizationId:
              type: string
            customDomain:
              type: string
            workspace:
              type: string
            mode:
              type: string
              enum:
                - create
                - update
            installationId:
              type: string
              description: Existing installation to rotate when mode is update.
          required:
            - accessToken
            - organizationId
            - workspace
          additionalProperties: false
    BitbucketInstallationMutationResponse:
      type: object
      properties:
        ok:
          type: boolean
          enum:
            - true
        installationId:
          type: string
      required:
        - ok
        - installationId
      additionalProperties: false
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
  securitySchemes:
    apiTokenId:
      type: apiKey
      in: header
      name: X-ZeroPath-API-Token-Id
      x-fern-header:
        name: apiTokenId
        env: ZEROPATH_API_TOKEN_ID
    apiTokenSecret:
      type: apiKey
      in: header
      name: X-ZeroPath-API-Token-Secret
      x-fern-header:
        name: apiTokenSecret
        env: ZEROPATH_API_TOKEN_SECRET

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.