---
title: "Rotate app client secret"
method: POST
path: "/auth/app-clients/{id}/$rotate-secret"
tags: ["AppClient"]
---

# Rotate app client secret

`POST /auth/app-clients/{id}/$rotate-secret`

## Request

- Base URL: `https://api.sandbox.zusapi.com`
- URL: `https://api.sandbox.zusapi.com/auth/app-clients/{id}/$rotate-secret`
- Auth: HTTP bearer

Rotates (ie. changes) the app client secret.

## Path parameters

- `id` string, required

## Response `200`

Success

- CreatedAppClient
  - `data` object
    - `type` string
    - `id` string, uuid, nullable
    - `attributes` object
      - `createdAt` integer: Unix timestamp the object was created.
      - `updatedAt` integer: Unix timestamp the object was last updated.
      - `deletedAt` integer, nullable: Unix timestamp the object was deleted.
      - `name` string: App client name.
      - `type` string: Type of application (native, single_page_application, regular_web_application, or machine_to_machine).
      - `clientId` string: Client ID to use in conjunction with client secret for client credentials authentication.
      - `clientSecret` string: Client secret to use in conjunction with client ID for client credentials authentication. Only displayed after creating the app client. To get a new client secret use the rotate-secret endpoint.
      - `userType` string: Indicates if the user is an "individual" user (such as a patient) or a "builder" user (such as a provider).
    - `relationships` object
      - `auth/app-client-settings` object: Settings associated with the app client
        - `data` object
          - `type` string
          - `id` string, uuid, nullable
      - `auth/builders` object: Builder associated with the app client
        - `data` object
          - `type` string
          - `id` string, uuid, nullable
      - `auth/roles` object: Roles associated with the app client
        - `data` object
          - `type` string
          - `id` string, uuid, nullable

---

[API](https://skmtc.dev/zushealth/apis/auth-service-api.md) - [All operations](https://skmtc.dev/zushealth/apis/auth-service-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zushealth/apis/auth-service-api/revisions/18ab13a98b59?raw)
