---
title: "Update Git Repository"
method: PATCH
path: "/api/v1/git-repositories/{repository_id}"
tags: ["git-integration", "Git Integration"]
---

# Update Git Repository

`PATCH /api/v1/git-repositories/{repository_id}`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/api/v1/git-repositories/{repository_id}`
- Auth: none declared

Update a git repository.

Args:
    repository_id: Repository public ID (UUID)
    repository_data: Repository update data
    ctx: Application context with session, user, and company info

Returns:
    StandardResponse with success message

## Path parameters

- `repository_id` string, required

## Headers

- `Authorization` string

## Request body

- GitRepositoryUpdate: Schema for updating a git repository.
  - `repository_name` string, nullable: Repository name
  - `repository_url` string, uri, nullable: Repository URL
  - `default_branch` string, nullable: Default branch name
  - `is_active` boolean, nullable: Whether repository is active
  - `sync_method` 'webhook' | 'polling' | 'manual': Repository synchronization method.
  - `polling_interval_minutes` integer, nullable: Polling interval in minutes
  - `webhook_enabled` boolean, nullable: Enable webhook sync

## Response `200`

Successful Response

- StandardResponse: Standard API response wrapper.
  - `success` boolean, required
  - `data` unknown
  - `message` string, nullable
  - `error` string, nullable
  - `meta` object, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api.md) · [All operations](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api/revisions/51c755fb5d0b?raw)
