---
title: "Rotate webhook secret"
method: POST
path: "/v1/models/{modelId}/git/rotate-webhook-secret"
tags: ["Model Git configuration"]
---

# Rotate webhook secret

`POST /v1/models/{modelId}/git/rotate-webhook-secret`

## Request

- Base URL: `https://blobsrus.omniapp.co/api`
- URL: `https://blobsrus.omniapp.co/api/v1/models/{modelId}/git/rotate-webhook-secret`
- Auth: HTTP bearer

<Note>
  This endpoint requires Modeler permissions or higher.
</Note>

Rotate the pull request webhook signing secret for the Git configuration of a shared model, or a shared extension model in the **Develop independently** branch workflow, and return the updated Git configuration with the new secret. The previous secret stops validating webhook deliveries immediately.

If the git repository is shared across multiple models, the secret belongs to whichever model owns the shared configuration. Rotating the secret for any of the sharing models rotates the one shared secret for all of them.

This is the only endpoint that returns the new secret value. Call `GET /v1/models/{modelId}/git?include=webhookSecret` to retrieve it after the rotation, if needed.

## Path parameters

- `modelId` string, uuid, required

## Response `200`

Webhook secret rotated successfully. The response includes the new webhook secret.

- object
  - `authMethod` 'ssh' | 'https_token' | 'github_app', required: Authentication method. "ssh" for deploy key, "https_token" for deploy token/PAT, "github_app" for a GitHub App installation.
  - `baseBranch` string, required: The target branch for Omni pull requests
  - `branchPerPullRequest` boolean, required: If `true`, all pull requests will create a branch in Omni
  - `cloneUrl` string, required: Clone URL of the git repository (SSH or HTTPS)
  - `commitSigningCommitterEmail` string, nullable, required: Committer email written into signed commits (`github_app` auth). Null when signing is not configured.
  - `commitSigningCommitterName` string, nullable, required: Committer display name written into signed commits (`github_app` auth). Null when signing is not configured.
  - `commitSigningPublicKey` string, nullable, required: SSHSIG signing public key to register on the committer's GitHub user (`github_app` auth). Null for other auth methods.
  - `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
  - `githubAppInstallationId` string, nullable, required: GitHub App installation ID. Null unless `github_app` auth.
  - `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, required: The new webhook secret. Returned only here — read it back later with GET /git?include=webhookSecret.
  - `webhookUrl` string, required: Webhook URL to configure in your git provider

## Other responses

- `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`
- `422`: Unprocessable Entity Possible error messages: - `Model is not a shared model or a shared extension with isolated branches`
- `429`: Too Many Requests - Rate limit exceeded (60 requests/minute)

## Changes

- **2026-11-03** `43290040f88f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omni/apis/omni-api/changes/v1/models/:modelId/git/rotate-webhook-secret/post.md)

---

[API](https://skmtc.dev/omni/apis/omni-api.md) - [All operations](https://skmtc.dev/omni/apis/omni-api/llms.txt) - [OpenAPI document](https://skmtc.dev/omni/apis/omni-api/revisions/43290040f88f?raw)
