---
title: "Install or reinstall the GitHub repository webhook for a project"
method: POST
path: "/projects/{project_id}/github/reinstall-webhook"
tags: ["Projects"]
---

# Install or reinstall the GitHub repository webhook for a project

`POST /projects/{project_id}/github/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}/github/reinstall-webhook`
- Auth: HTTP bearer

For projects on a GitHub connection that is not a GitHub App (personal
access token or OAuth). Removes the existing repository webhook (if any)
and registers a fresh one with a new signing secret. Use this when the
webhook could not be registered automatically (the token lacks webhook
permission) or was deleted on GitHub, and pushes have stopped deploying.

## Path parameters

- `project_id` integer, required

## Response `200`

Webhook installed

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

## Other responses

- `400`: Project is not on a GitHub PAT/OAuth connection, or GitHub refused to create the webhook
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Project not found
- `500`: Internal server error

## Changes

> 98 revisions in range; 1 not diffed.

- **2026-10-22** `2b6a033a7458`: 1 info
  - endpoint added
- **2026-10-22** `06005615b19e`: 1 breaking
  - api path removed without deprecation
- **2026-10-22** `eb81785fa098`: 1 info
  - endpoint added
- **2026-10-22** `7d41b820a372`: 1 breaking
  - api path removed without deprecation
- **2026-10-22** `7e09c5559730`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/projects/:project_id/github/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/fdfa2df06ae7?raw)
