---
title: "POST /git-connections/reauthorize/complete"
method: POST
path: "/git-connections/reauthorize/complete"
tags: ["Git Providers"]
---

# POST /git-connections/reauthorize/complete

`POST /git-connections/reauthorize/complete`

## Request

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

## Request body

- CompleteReauthorizationRequest
  - `code` string, required: Empty when the user cancelled at the provider; the state is still consumed.
  - `state` string, required

## Response `200`

Original connection reauthorized

- 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

- `400`: Invalid state, cancellation or provider configuration
- `401`: Authentication required
- `403`: Permission denied
- `404`: Connection missing or inaccessible
- `409`: Wrong provider account
- `428`: Recent MFA verification required
- `500`: Internal error

## Changes

- **2026-11-03** `54ac461aec46`: 1 breaking, 1 info
  - api path removed without deprecation
  - endpoint added
- **2026-11-03** `fcfcfae25744`: 1 info
  - endpoint added

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