---
title: "Sync model with Git repository"
method: POST
path: "/v1/models/{modelId}/git/sync"
tags: ["Model Git configuration"]
---

# Sync model with Git repository

`POST /v1/models/{modelId}/git/sync`

Trigger a sync operation between the model and its configured Git repository.

This will pull the latest changes from the repository and apply them to the model.

## Path parameters

- `modelId` string, uuid, required

## Request body

- object
  - `commitMessage` string — Optional commit message to use when pushing changes to the repository.

## Response `200`

Sync operation completed successfully

- object
  - `didSync` boolean — Whether a sync was performed. `false` if the model was already in sync.
  - `gitSha` string, nullable — The git SHA after the sync operation, or null if no sync was performed.
  - `inSync` boolean — Whether the model is currently in sync with the git repository.
  - `message` string — Human-readable status message describing the sync result.

## Other responses

- `400` — Bad Request Possible error messages: - `Bad Request: modelId: Invalid uuid`
- `401` — Missing or invalid authentication
- `403` — Forbidden Possible error messages: - `Forbidden: Requires MANAGE_MODEL permission`
- `404` — Not Found Possible error messages: - `Not Found: Model does not exist` - `Not Found: Git configuration not found for this model`
- `429` — Too Many Requests - Rate limit exceeded (60 requests/minute)

---

[API](https://skmtc.net/omni/apis/omni-api.md) · [All operations](https://skmtc.net/omni/apis/omni-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/omni/omni-api/versions/6b02f7349d0e/schema)
