Refresh connection credentials
/connection/{id}/refresh-credentials
Forces Saffron to mint a fresh access token for this connection, in place — maintenance for a connection that is still healthy, where reconnect is the repair for one that is not. No body. Same mutation bar as reconnect, and only meaningful on a bound, `active` row whose `authentication_method` is refreshable (`oauth2`, `oauth2_client_credentials`, `jwt_bearer`) — exactly what the row's `can_refresh_credentials` reports, so render controls on that field. Everything else answers `409`: `not_refreshable` (Saffron is not called at all), `needs_reauth` (the provider rejected the refresh; the row is written to `needs_reauth` before this reply), or `connection_disconnected`. The `200` is a receipt, never a payload — the credential itself stays in the vault.
Path Parameters
Connection id (conn_…).
Response Body
The row's status after the refresh (active).
curl -X POST 'https://api.elaichi.ai/connection/<id>/refresh-credentials' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json'const response = await fetch('https://api.elaichi.ai/connection/<id>/refresh-credentials', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);import os
import requests
url = "https://api.elaichi.ai/connection/<id>/refresh-credentials"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
response = requests.post(url, headers=headers)
print(response.json())