---
title: "Re-identify the CRYPTO_REPLACE values in a text."
method: POST
path: "/api/reidentify/text"
tags: ["Re-identification"]
---

# Re-identify the CRYPTO_REPLACE values in a text.

`POST /api/reidentify/text`

## Request

- Base URL: `/` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/reidentify/text`
- Auth: HTTP bearer

Finds every CRYPTO_REPLACE token ({{...}}) in the text, decrypts it with the crypto key of the named policy, and returns the text with each token that decrypted replaced by its original value. A token that does not decrypt, because it was altered or encrypted under another key, is left as it is and counted as failed. FPE_ENCRYPT_REPLACE and other strategies are not restored. The caller must supply a stated reason, which is recorded in the audit log with the tokens and the counts. An admin may act for another user by supplying that user's username via the owner parameter. Requires the `reidentify` scope.

## Query parameters

- `owner` string

## Headers

- `Authorization` string, required

## Request body

- ReidentifyTextRequest
  - `policyName` string
  - `reason` string
  - `text` string

## Response `200`

OK

- ReidentifyTextResponse
  - `failed` integer
  - `found` integer
  - `restored` integer
  - `text` string

## Other responses

- `400`: Missing or invalid request fields, or the policy has no crypto key.
- `401`: Missing or invalid API key.
- `403`: Insufficient scope, disabled API, or access denied.
- `404`: Named policy not found, or owner not found.
- `406`: No representation matches Accept.
- `413`: Content Too Large
- `415`: Unsupported Media Type
- `500`: Internal Server Error
- `503`: Service Unavailable

## Changes

- **2026-10-20** `60e0bb5b3dd8`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/philterd/apis/philter-api/changes/api/reidentify/text/post.md)

---

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