---
title: "Reconnect Instance"
method: POST
path: "/api/integrations/instances/{instance_id}/reconnect"
tags: ["integrations"]
---

# Reconnect Instance

`POST /api/integrations/instances/{instance_id}/reconnect`

## Request

- Base URL: `https://app.thinqos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.thinqos.com/api/integrations/instances/{instance_id}/reconnect`
- Auth: none declared

Needs-attention repair: re-probe, report, and preserve every access grant.

What this does NOT do is the point (TOS-2708): it never deletes the
connection row, never touches folder membership, never drops a resource
binding, and never clears a stored token. It re-runs the same probe the Test
button runs — which may resolve the problem outright when the cause was
transient (a rate limit, a service blip) — recomputes the per-tool rollup,
and returns the specific next action plus the grants that survived.

When the credential genuinely has to be re-authorized, the browser OAuth
flow at ``reauthorize_path`` UPSERTS onto this same connection row
(``_record_oauth_login_tokens``), which is what makes the preservation
guarantee true rather than aspirational.

## Path parameters

- `instance_id` string, uuid, required

## Headers

- `x-impersonate-identity-id` string, nullable

## Response `200`

Successful Response

- ReconnectResponse: Returned by the needs-attention repair/reconnect flow (TOS-2708). ``preserved_grants`` enumerates, concretely, what reconnecting does NOT touch — the guarantee ``preservation_notice`` states in prose. Both are computed from what actually exists on the connection, not hardcoded copy, so the promise cannot drift away from the behavior.
  - `instance_id` string, uuid, required
  - `health` ConnectionHealthOut, required: Health of one connection, rendered without the client inventing anything. ``status`` carries the Connected-filter buckets directly (``ready`` / ``degraded`` / ``needs_attention`` / ``unknown``), so the list filters and the degraded/failure screens all read one field. ``credential_status`` keeps the underlying evidence-ladder value for callers that need it. ``unknown`` means CONNECTED BUT NOT YET MEASURED — a credential-free integration that owns no connection row, or a connection probed before the rollup existed. There is no evidence of a problem, so it belongs in the **Ready** filter bucket; render the detail as "Not checked yet" rather than showing ``summary`` (which would read "0 of 0 tools available"). It is a distinct value rather than being folded into ``ready`` because claiming "no capability is failing" when nothing was measured is a fabrication.
    - `status` 'ready' | 'degraded' | 'needs_attention' | 'unknown', required
    - `credential_status` 'connected' | 'needs_reconnect' | 'admin_repair' | 'unreachable' | 'missing', required
    - `healthy_tools` integer, required
    - `total_tools` integer, required
    - `affected_tools` AffectedToolOut[]
      - `name` string, required
      - `reason` string, required
      - `failure_code` string, nullable
      - `evidence` 'probe' | 'telemetry', required
      - `observed_at` string, date-time, nullable
    - `healthy_summary` string, required
    - `summary` string, required
    - `checked_at` string, date-time, nullable
    - `failure` ConnectionFailureDetail: The four named fields the connection-failure screen renders, plus the action. Populated from the closed ``IntegrationFailureCode`` taxonomy (TOS-2708), so every failure category — OAuth denial, wrong account, invalid/expired key, missing scopes, failed safe probe, rate limit, unreachable endpoint, partially unavailable tools — resolves to named copy rather than an error string the user has to interpret.
      - `code` string, required
      - `failed_check` string, required
      - `cause` string, required
      - `preserved` string, required
      - `diagnostic_reference` string, required
      - `next_action` string, required
  - `resolved` boolean, required
  - `next_action` string, required
  - `reauthorize_path` string, nullable
  - `preserved_grants` string[]
  - `preservation_notice` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/thinqos/apis/thinqos-api.md) · [All operations](https://skmtc.dev/thinqos/apis/thinqos-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thinqos/apis/thinqos-api/revisions/5387b4ded614?raw)
