---
title: "Run an on-demand health check for a git connection."
method: POST
path: "/git-connections/{connection_id}/health-check"
tags: ["Git Provider Connections"]
---

# Run an on-demand health check for a git connection.

`POST /git-connections/{connection_id}/health-check`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/git-connections/{connection_id}/health-check`
- Auth: HTTP bearer

Probes the upstream (GitHub App, PAT, or OAuth token), persists the result,
and fires admin notifications on status transitions. Returns the updated
connection.

## Path parameters

- `connection_id` integer, required

## Response `200`

Health check completed

- ConnectionResponse
  - `account_name` string, required
  - `account_type` string, required
  - `consecutive_health_failures` integer, required
  - `created_at` string, date-time, required
  - `has_authenticated_credentials` boolean, required: Whether this connection can make authenticated provider requests. This exposes capability only; credential values are never serialized.
  - `health_message` string, nullable: Human-readable reason when health_status is "unhealthy"; null otherwise.
  - `health_status` string, required: Current health status: "healthy", "unhealthy", or "unknown".
  - `id` integer, required
  - `installation_id` string, nullable
  - `is_active` boolean, required
  - `is_expired` boolean, required
  - `last_health_check_at` string, date-time, nullable
  - `last_sync_error` string, nullable: Why the most recent repository sync failed or timed out; null once a sync succeeds.
  - `last_sync_error_at` string, date-time, nullable
  - `last_synced_at` string, date-time, nullable
  - `provider_id` integer, required
  - `synced_repository_count` integer, required: Running count of repositories persisted by the current (or most recent) sync. Resets to 0 when a new sync begins; useful for showing live progress on large syncs.
  - `syncing` boolean, required
  - `updated_at` string, date-time, required
  - `user_id` integer, nullable

## Other responses

- `401`: Unauthorized
- `404`: Connection not found
- `500`: Internal server error

## Changes

- **2026-10-05** `4b228ebed583`: 2 info
  - added the optional property `last_sync_error` to the response with the `200` status
  - added the optional property `last_sync_error_at` to the response with the `200` status
- **2026-10-05** `63a80791dc58`: 2 warning
  - removed the optional property `last_sync_error` from the response with the `200` status
  - removed the optional property `last_sync_error_at` from the response with the `200` status
- **2026-09-25** `d733ab882435`: 2 info
  - added the optional property `last_sync_error` to the response with the `200` status
  - added the optional property `last_sync_error_at` to the response with the `200` status
- **2026-09-07** `38e97c3c35dd`: 1 info
  - added the required property `has_authenticated_credentials` to the response with the `200` status
- **2026-09-07** `f7404eb7ac98`: 1 breaking
  - removed the required property `has_authenticated_credentials` from the response with the `200` status

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/git-connections/:connection_id/health-check/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)
