---
title: "Create git configuration"
method: POST
path: "/api/v1/models/{modelId}/git"
tags: ["Models"]
---

# Create git configuration

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

## Path parameters

- `modelId` string, uuid, required — Model UUID

## Request body

- ModelsGitCreateBody
  - `authMethod` 'ssh' | 'https_token' — Authentication method. "ssh" for deploy key (default), "https_token" for deploy token/PAT.
  - `baseBranch` string — The target branch for Omni pull requests. Defaults to "main"
  - `branchPerPullRequest` boolean — If true, all pull requests will create a branch in Omni. Defaults to false
  - `cloneUrl` string — Clone URL of the git repository. SSH (git@...) for deploy key auth, HTTPS (https://...) for token auth.
  - `gitFollower` boolean — If true, the shared model will be read-only. Defaults to false
  - `gitServiceProvider` 'github' | 'gitlab' | 'azure_devops' | 'bitbucket' | 'bitbucket_datacenter' | 'auto' — The git provider type. Use "auto" for automatic detection. Defaults to "auto"
  - `modelPath` string — Path to model files in the repository. Defaults to omni/<model-name>. Use a plain name (e.g., "my_model") for omni/my_model, or a leading slash for a custom path (e.g., "/bi/models/sales")
  - `requirePullRequest` 'always' | 'users-only' | 'never' — Controls when pull requests are required. Defaults to "never"
  - `sshUrl` string — Deprecated — use cloneUrl. Clone URL of the git repository.
  - `token` string — HTTPS token for authentication (deploy token value, PAT, etc.). Required when authMethod is "https_token".
  - `webUrl` string — Custom web URL for the git repository. Use when the clone URL goes through a tunnel/VPC and differs from the inferred HTTPS address

## Response `201`

Git configuration created

- ModelsGitCreateResponse
  - `authMethod` 'ssh' | 'https_token', required — Authentication method. "ssh" for deploy key, "https_token" for deploy token/PAT.
  - `baseBranch` string, required — The target branch for Omni pull requests
  - `branchPerPullRequest` boolean, required — If true, all pull requests will create a branch in Omni, even those created outside of the tool
  - `cloneUrl` string, required — Clone URL of the git repository (SSH or HTTPS)
  - `gitFollower` boolean, required — If true, the shared model is read-only and can only be updated by merging pull requests to the base branch
  - `gitServiceProvider` string, required — The git provider type
  - `modelPath` string, nullable, required — Path to model files in the repository
  - `publicKey` string, nullable, required — SSH public key for repository access (deploy key). Null for HTTPS token auth.
  - `requirePullRequest` 'always' | 'users-only' | 'never', required — When pull requests are required: "always" for all changes, "users-only" for user-initiated changes only, "never" for direct commits.
  - `sshUrl` string, required — Deprecated — use cloneUrl. Clone URL of the git repository.
  - `webUrl` string, nullable, required — Custom web URL for the git repository, or null if not set
  - `webhookSecret` string — Webhook secret for signature verification. Only included if requested via ?include=webhookSecret
  - `webhookUrl` string, required — Webhook URL to configure in your git provider

## Other responses

- `400` — Invalid SSH URL or configuration
- `401` — Authentication required
- `403` — Permission denied
- `404` — Model not found
- `409` — Git already configured for this model

---

[API](https://skmtc.dev/omniapp/apis/omni-api.md) · [All operations](https://skmtc.dev/omniapp/apis/omni-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/omniapp/omni-api/revisions/c5d16d10108e/schema)
