---
title: "Rotate the oath client secret"
method: PUT
path: "/tyk/oauth/clients/{apiID}/{keyName}/rotate"
tags: ["OAuth"]
---

# Rotate the oath client secret

`PUT /tyk/oauth/clients/{apiID}/{keyName}/rotate`

Generate a new secret

## Path parameters

- `apiID` string, required
- `keyName` string, required

## Response `200`

New secret has been created

- NewClientRequest
  - `api_id` string
  - `client_id` string
  - `description` string
  - `meta_data` object, nullable
  - `policy_id` string
  - `redirect_uri` string
  - `secret` string

## Other responses

- `403` — Forbidden
- `404` — Not Found
- `500` — Internal server error.

## Changes

- **2024-09-18** `111affa17abe` — 1 info
  - endpoint added
- **2022-05-24** `111d8ca21864` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/tyktechnologies/apis/tyk-gateway-api/changes/tyk/oauth/clients/:apiID/:keyName/rotate/put.md)

---

[API](https://skmtc.dev/tyktechnologies/apis/tyk-gateway-api.md) · [All operations](https://skmtc.dev/tyktechnologies/apis/tyk-gateway-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tyktechnologies/tyk-gateway-api/revisions/900d0a33ae1d/schema)
