---
title: "Reinstall the GitLab webhook for a project"
method: POST
path: "/projects/{project_id}/gitlab/reinstall-webhook"
tags: ["Projects"]
---

# Reinstall the GitLab webhook for a project

`POST /projects/{project_id}/gitlab/reinstall-webhook`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/projects/{project_id}/gitlab/reinstall-webhook`
- Auth: HTTP bearer

Removes the existing webhook (if any) and installs a fresh one.
Use this when a webhook has been manually deleted on the GitLab side
and automatic deployments have stopped working.

## Path parameters

- `project_id` integer, required

## Response `200`

Webhook reinstalled

- ReinstallWebhookResponse: Response for `POST /projects/{project_id}/gitlab/reinstall-webhook`
  - `hook_id` integer, required: The new GitLab hook ID that was installed.
  - `message` string, required: Human-readable status message.

## Other responses

- `400`: Project is not connected to a GitLab repository
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Project not found
- `500`: Internal server error

## Changes

- **2026-05-30** `b72341d12f63`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/projects/:project_id/gitlab/reinstall-webhook/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
