---
title: "Rotate clientSecret"
method: PATCH
path: "/auth/clients"
tags: ["auth"]
---

# Rotate clientSecret

`PATCH /auth/clients`

## Request

- Base URL: `https://api.lumahealth.io/api/v2`
- URL: `https://api.lumahealth.io/api/v2/auth/clients`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/lumahealth/apis/rest-service/docs/auth/clients/patch.ts> (a function with typed inputs; its response is checked against the schema)

This action allows our users to change secrets associated with a clientId. This does not generate a new clientId.

## Request body

- object
  - `clientName` string, required: Name of the client

## Response `200`

Returns a clientId and clientSecret

- object
  - `clientId` string, required
  - `clientSecret` string, required

## Other responses

- `400`: If the request parameter - clientName - is malformed/invalid or missing. We will also return 400 if the operation fails.
- `404`: If the user associated with this clientId is not found.

---

[API](https://skmtc.dev/lumahealth/apis/rest-service.md) - [All operations](https://skmtc.dev/lumahealth/apis/rest-service/llms.txt) - [OpenAPI document](https://skmtc.dev/lumahealth/apis/rest-service/revisions/f19aeba84a26?raw)
