---
title: "Rotate Encryption Keys"
method: POST
path: "/api/admin/rotate-encryption"
---

# Rotate Encryption Keys

`POST /api/admin/rotate-encryption`

## Request

- Base URL: `https://api.soeru.biz` (the document declares no server; this is the origin it was published from)
- URL: `https://api.soeru.biz/api/admin/rotate-encryption`
- Auth: none declared

Re-encrypt all shop credentials with the current ENCRYPTION_KEY.

Requires ENCRYPTION_KEY_PREVIOUS to be set so old data can be decrypted.
Each shop's encrypted fields are decrypted (using old or new key) and
re-encrypted with the current key.

## Headers

- `x-admin-key` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/soeru/apis/soeru-api.md) · [All operations](https://skmtc.dev/soeru/apis/soeru-api/llms.txt) · [OpenAPI document](https://skmtc.dev/soeru/apis/soeru-api/revisions/63f8d371abed?raw)
