---
title: "Regenerate service account secret"
method: POST
path: "/v1/service-accounts/{id}/secret/regenerate"
tags: ["Service Accounts"]
---

# Regenerate service account secret

`POST /v1/service-accounts/{id}/secret/regenerate`

## Request

- Base URL: `https://docs.grepr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.grepr.ai/v1/service-accounts/{id}/secret/regenerate`
- Auth: one of:
  - API key in header `GREPR-API-KEY`
  - OpenID Connect (`https://grepr-prod.us.auth0.com/.well-known/openid-configuration`)

Generates a new OAuth2 client secret for the service account. The old secret will be invalidated immediately.

## Path parameters

- `id` string, required

## Response `200`

Secret regenerated successfully

- string

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Service account not found

---

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