---
title: "Refresh connection credentials"
method: POST
path: "/connection/{id}/refresh-credentials"
tags: ["Connections"]
---

# Refresh connection credentials

`POST /connection/{id}/refresh-credentials`

## Request

- Base URL: `https://api.elaichi.ai`
- URL: `https://api.elaichi.ai/connection/{id}/refresh-credentials`
- Auth: HTTP bearer

Forces Elaichi to mint a fresh access token for this connection in place. Use it for maintenance on a connection that is still healthy; reconnect is the repair for one that is not. No body. Same permission as reconnect, and only meaningful on a bound, `active` row whose `authentication_method` is refreshable (`oauth2`, `oauth2_client_credentials`, `jwt_bearer`), which is what the row's `can_refresh_credentials` reports. Everything else answers `409`: `not_refreshable` (no provider call is made), `needs_reauth` (the provider rejected the refresh; the row is set to `needs_reauth` before this reply), or `connection_disconnected`. The `200` is a receipt, never the credential itself.

## Path parameters

- `id` string, required

## Headers

- `X-Organization-Id` string

## Response `200`

OK

- object
  - `refreshed_at` string, date-time, required
  - `status` string, required: The row's status after the refresh (`active`).

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `429`: Rate limited

---

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