---
title: "Rotate the client id on a shared OAuth app."
method: POST
path: "/v1/oauth-apps/{slug}/rotate-credentials"
tags: ["integrations"]
---

# Rotate the client id on a shared OAuth app.

`POST /v1/oauth-apps/{slug}/rotate-credentials`

## Request

- Base URL: `https://api.kody.codes`
- URL: `https://api.kody.codes/v1/oauth-apps/{slug}/rotate-credentials`
- Auth: HTTP bearer

Rotate the client id on a shared OAuth app. Every connection on that app sees the new client id on the next join — one write instead of updating each connection. Rotate the client secret value from /account/integrations.

Org permission: `integration:write`.

## Path parameters

- `slug` string, required: OAuth app slug whose client credentials should be rotated.

## Request body

- object
  - `clientId` string, required: New OAuth client id (inline value).

## Response `200`

Success.

- object
  - `app` object, required
    - `slug` string, required
    - `provider` string, required
    - `label` string, nullable, required
    - `clientId` string, required
    - `hasClientSecret` boolean, required
    - `tokenUrl` string, uri, required
    - `authorizeUrl` string, uri, nullable, required
    - `deviceAuthorizationUrl` string, uri, nullable, required
    - `apiBaseUrl` string, uri, nullable, required
    - `flow` 'pkce' | 'confidential' | 'device', required
    - `usePkce` boolean, nullable, required
    - `tokenExchangeStyle` 'form' | 'basic-json' | 'basic-form', nullable, required
    - `scopeSeparator` string, nullable, required
    - `extraAuthorizeParams` object, required
    - `connectionCount` integer, required
    - `connections` object[], required
      - `name` string, required
      - `accountLabel` string, nullable, required
    - `logoPath` string, nullable
    - `autoLogoPath` string, nullable
    - `logoSource` 'upload' | 'favicon', nullable
    - `createdAt` string, required
    - `updatedAt` string, 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/705f4f022728?raw)
