---
title: "Regenerate service key"
method: POST
path: "/projects/{id}/service-keys/{keyId}/regenerate"
tags: ["Service Keys"]
---

# Regenerate service key

`POST /projects/{id}/service-keys/{keyId}/regenerate`

## Request

- Base URL: `https://api.volcano.dev`
- URL: `https://api.volcano.dev/projects/{id}/service-keys/{keyId}/regenerate`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Generate new JWT value for existing key.
The old key stops working within a few seconds.
Update your backend services with the new key before regenerating in production.

## Path parameters

- `id` string, uuid, required
- `keyId` string, uuid, required

## Response `200`

Key regenerated - save the new key_value immediately!

- ServiceKey: Service role key for admin operations. **WARNING:** Bypasses all RLS - backend use only!
  - `id` string, uuid, required
  - `project_id` string, uuid
  - `name` string, required: Descriptive name for the key
  - `key_value` string: Full JWT token for Authorization header. Returned on create, get, and list (decrypted from storage). **Store securely - NEVER expose in frontend code!**
  - `key_prefix` string, required: First 12 characters of the key for display/identification
  - `permissions` string[], required: Operations this key may perform. ["*"] grants full admin access (default for keys created without an explicit scope). Scoped keys list specific permissions, e.g. ["functions.invoke", "locks.manage"].
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Changes

- **2026-10-07** `23e7875e7c4c`: 1 info
  - the endpoint scheme security `ProjectAccessToken` was added to the API
- **2026-09-19** `3a6f365f3f35`: 2 breaking, 8 info
  - added the new path request parameter `id`
  - the response's body type changed from no type to `object` for status `200`
  - added the optional property `created_at` to the response with the `200` status
  - added the optional property `key_value` to the response with the `200` status
  - …6 more
- **2026-08-27** `bb44e98aba2e`: 5 breaking, 5 warning
  - the response's body type changed from `object` to no type for status `200`
  - removed the required property `id` from the response with the `200` status
  - removed the required property `key_prefix` from the response with the `200` status
  - removed the required property `name` from the response with the `200` status
  - …6 more

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/projects/:id/service-keys/:keyId/regenerate/post.md)

---

[API](https://skmtc.dev/kong/apis/volcano-api.md) - [All operations](https://skmtc.dev/kong/apis/volcano-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/volcano-api/revisions/84c4488f91e9?raw)
