---
title: "Reencrypt Stored Search Tool Keys"
method: POST
path: "/v1/search-tools/reencrypt"
tags: ["search-tools"]
---

# Reencrypt Stored Search Tool Keys

`POST /v1/search-tools/reencrypt`

Re-encrypt stored search-tool keys with the primary OTARI_SECRET_KEY.

The search-tool half of the ``OTARI_SECRET_KEY`` rotation procedure; run it
alongside ``POST /v1/provider-credentials/reencrypt``. Rows that cannot be
decrypted are left untouched and must be recovered by replacing the affected
tool's key.

## Response `200`

Successful Response

- ReencryptSearchToolsResponse — Result of re-encrypting stored search-tool keys with the primary secret key.
  - `reencrypted` integer, required — Number of stored search-tool keys re-encrypted.
  - `unreadable` integer, required — Number of encrypted keys left untouched because they could not be decrypted.

---

[API](https://skmtc.net/mozilla-ai/apis/otari.md) · [All operations](https://skmtc.net/mozilla-ai/apis/otari/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mozilla-ai/otari/revisions/6133543facaf/schema)
