---
title: "Deanonymize Text"
method: POST
path: "/deanonymize"
tags: ["Anonymizer"]
---

# Deanonymize Text

`POST /deanonymize`

## Request body

- DeanonymizeRequest
  - `text` string, required — The anonymized text
  - `deanonymizers` object, required — Object where the key is DEFAULT or the ENTITY_TYPE and the value is decrypt since it is the only one supported
  - `anonymizer_results` OperatorResult[], required — Array of anonymized PIIs
    - `operator` string — Name of the used operator
    - `entity_type` string, required — Type of the PII entity
    - `start` integer, required — Start index of the changed text
    - `end` integer, required — End index in the changed text
    - `text` string — The new text returned

## Response `200`

OK

- DeanonymizeResponse
  - `text` string
  - `items` OperatorResult[] — Array of deanonymized entities
    - `operator` string — Name of the used operator
    - `entity_type` string, required — Type of the PII entity
    - `start` integer, required — Start index of the changed text
    - `end` integer, required — End index in the changed text
    - `text` string — The new text returned

## Other responses

- `400` — Bad request
- `422` — Unprocessable Entity

## Changes

- **2023-01-25** `ad83f14db552` — 1 breaking
  - removed `#/components/schemas/Decrypt` from the `deanonymizers` request property `anyOf` list
- **2022-02-22** `4339e6a46b07` — 2 breaking, 5 info
  - request body became required
  - the response's body type/format changed from ``/`` to `object`/`` for status `200`
  - added the media type `application/json` to the request body
  - added the media type `application/json` for the response with the status `400`
  - …3 more
- **2021-05-05** `08cf7bba99bb` — 4 breaking, 2 warning, 1 info
  - removed the media type `application/json` from the request body
  - the response's body type/format changed from `object`/`` to ``/`` for status `200`
  - removed the media type `application/json` for the response with the status `400`
  - removed the media type `application/json` for the response with the status `422`
  - …3 more
- **2021-04-07** `e662ae1f18ec` — 1 info
  - the `deanonymizers` request property default value `{"DEFAULT":{"type":"decrypt","key":"3t6w9z$C&F)J@NcR"}}` was added
- **2021-04-07** `490b207906ce` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/data-privacy-stack/apis/presidio/changes/deanonymize/post.md)

---

[API](https://skmtc.dev/data-privacy-stack/apis/presidio.md) · [All operations](https://skmtc.dev/data-privacy-stack/apis/presidio/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/data-privacy-stack/presidio/revisions/c114dc1262f2/schema)
