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

# Update repository

> Update repository settings



## OpenAPI

````yaml https://api.ghostsecurity.ai/openapi.json patch /v2/repos/{id}
openapi: 3.1.0
info:
  contact:
    email: support@ghostsecurity.com
    name: Ghost Security
    url: https://ghostsecurity.com/
  description: 'Provide your Bearer token as: Bearer <token>'
  title: Ghost API
  version: 2.0.0
servers:
  - description: Ghost Security API server
    url: https://api.ghostsecurity.ai
security: []
externalDocs:
  description: ''
  url: ''
paths:
  /v2/repos/{id}:
    patch:
      tags:
        - repos.v2
      summary: Update repository
      description: Update repository settings
      parameters:
        - description: Repository ID
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/types.UpdateRepoRequest'
        description: Repository update data
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/exported.Repository'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.ErrorBadRequest'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.ErrorUnauthorized'
          description: Unauthorized
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.ErrorInternalServerError'
          description: Internal Server Error
      security:
        - bearerauth: []
components:
  schemas:
    types.UpdateRepoRequest:
      description: Repository update request
      properties:
        enabled:
          description: >-
            Whether to enable Exorcist scanning for this repository and any
            projects within it
          example: true
          type: boolean
        posture:
          description: Security posture of the apps in this repository
          enum:
            - internal
            - external
            - hybrid
          example: internal
          type: string
        review_minimum_severity:
          description: Review minimum severity to use for this repository
          enum:
            - high
            - medium
            - low
          example: high
          type: string
        review_mode:
          description: Whether to run code reviews for this repository
          enum:
            - auto
            - manual
            - none
          example: auto
          type: string
        scan_branch:
          description: Branch to scan (if different from default branch)
          example: main
          maxLength: 128
          minLength: 3
          type: string
      type: object
    exported.Repository:
      properties:
        archived:
          type: boolean
        cast_scan_enabled:
          type: boolean
        clone_url:
          type: string
        created_at:
          type: string
        default_branch_name:
          type: string
        description:
          type: string
        full_name:
          type: string
        id:
          type: string
        installation_id:
          type: string
        languages:
          additionalProperties:
            type: number
          type: object
        last_commit_hash:
          type: string
        last_commit_hash_link:
          type: string
        last_committed_at:
          type: string
        last_scanned_at:
          type: string
        name:
          type: string
        organization_id:
          type: string
        package_findings:
          type: integer
        private:
          type: boolean
        projects:
          items:
            $ref: '#/components/schemas/exported.Project'
          type: array
          uniqueItems: false
        provider:
          type: string
        provider_id:
          type: string
        scan_branch:
          type: string
        secret_findings:
          type: integer
        size:
          type: integer
        summary:
          type: string
        updated_at:
          type: string
        url:
          type: string
      type: object
    types.ErrorBadRequest:
      description: Error response for bad requests
      properties:
        error:
          description: Error message
          example: Invalid request body
          type: string
      type: object
    types.ErrorUnauthorized:
      description: Error response for unauthorized requests
      properties:
        error:
          description: Error message
          example: Unauthorized
          type: string
      type: object
    types.ErrorInternalServerError:
      description: Error response for internal server errors
      properties:
        error:
          description: Error message
          example: Internal server error
          type: string
      type: object
    exported.Project:
      properties:
        business_criticality:
          type: string
        cast_scan_enabled:
          type: boolean
        components:
          items:
            $ref: '#/components/schemas/exported.ProjectComponent'
          type: array
          uniqueItems: false
        created_at:
          type: string
        dependencies_file:
          type: string
        deployment_usage:
          type: string
        deployments:
          additionalProperties:
            items:
              type: string
            type: array
          type: object
        enabled:
          type: boolean
        evidence:
          type: string
        exposure:
          type: string
        file_extensions:
          items:
            type: string
          type: array
          uniqueItems: false
        findings_count:
          type: integer
        frameworks:
          items:
            type: string
          type: array
          uniqueItems: false
        has_custom_metadata:
          type: boolean
        id:
          type: string
        languages:
          items:
            type: string
          type: array
          uniqueItems: false
        last_committed_at:
          type: string
        last_scan_id:
          type: string
        last_scan_status:
          type: string
        last_scanned_at:
          type: string
        organization_id:
          type: string
        owner:
          type: string
        primary_framework:
          type: string
        primary_language:
          type: string
        provider:
          type: string
        purpose:
          type: string
        relative_path:
          type: string
        repo:
          $ref: '#/components/schemas/exported.ProjectRepo'
        scanner_business_criticality:
          type: string
        scanner_exposure:
          type: string
        scanner_summary:
          type: string
        sensitive_data_types:
          items:
            type: string
          type: array
          uniqueItems: false
        size:
          type: integer
        summary:
          type: string
        updated_at:
          type: string
        user_business_criticality:
          type: string
        user_exposure:
          type: string
        user_summary:
          type: string
      type: object
    exported.ProjectComponent:
      properties:
        criticality:
          type: number
        description:
          type: string
        folder_name:
          type: string
        type:
          type: string
      type: object
    exported.ProjectRepo:
      properties:
        id:
          type: string
        name:
          type: string
        url:
          type: string
      type: object
  securitySchemes:
    bearerauth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````