---
title: "Refresh the OAuth access token for a saved integration host-side and persist the new tokens on the connection."
method: POST
path: "/v1/integrations/{name}/refresh"
tags: ["integrations"]
---

# Refresh the OAuth access token for a saved integration host-side and persist the new tokens on the connection.

`POST /v1/integrations/{name}/refresh`

## Request

- Base URL: `https://api.kody.codes`
- URL: `https://api.kody.codes/v1/integrations/{name}/refresh`
- Auth: HTTP bearer

Refresh the OAuth access token for a saved integration host-side and persist the new tokens on the connection. Connections whose provider issued neither a refresh token nor an access-token expiry at connect (for example GitHub OAuth Apps with token expiration off) are skipped with refreshed: false instead of failing. Returns metadata only — token values never appear in the output. createAuthenticatedFetch refreshes through this path for every integration; it is the only refresh path for platform (built-in) integrations, whose shared client secret stays server-side.

Org permission: `integration:use`.

## Path parameters

- `name` string, required: Integration (connection) name whose tokens should refresh.

## Request body

- object

## Response `200`

Success.

- object
  - `ok` true, required
  - `refreshed` boolean, required
  - `skippedReason` 'refresh_not_applicable', nullable, required
  - `refreshedAt` string, nullable, required
  - `refreshTokenRotated` boolean, required

## Other responses

- `400`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `401`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `403`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `404`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `409`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `413`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `429`: Too many requests (edge IP/token limit) or an entitlement / plan-cap limit. Wait at least `Retry-After` seconds before retrying.
- `500`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `503`: Error envelope `{ "error": { "code", "message", "details"? } }`.
- `default`: Error envelope `{ "error": { "code", "message", "details"? } }`.

---

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