---
title: "De-identify text."
method: POST
path: "/deid"
---

# De-identify text.

`POST /deid`

A remote procedure call (RPC) operation.

## Query parameters

- `api-version` string, required

## Headers

- `x-ms-client-request-id` string, uuid

## Request body

- DeidentificationContent — Request body for de-identification operation.
  - `inputText` string, required — Input text to de-identify.
  - `operation` 'Redact' | 'Surrogate' | 'Tag' | 'SurrogateOnly' — Operation to perform on the input documents.
  - `taggedEntities` TaggedPhiEntities — Grouped PHI entities with shared encoding specification.
    - `encoding` 'Utf8' | 'Utf16' | 'CodePoint', required — Encoding type for text offset and length calculations.
    - `entities` SimplePhiEntity[], required — List of PHI entities using the specified encoding.
      - `category` 'Unknown' | 'Account' | 'Age' | 'BioID' | 'City' | 'CountryOrRegion' | 'Date' | 'Device' | 'Doctor' | 'Email' | 'Fax' | 'HealthPlan' | 'Hospital' | 'IDNum' | 'IPAddress' | 'License' | 'LocationOther' | 'MedicalRecord' | 'Organization' | 'Patient' | 'Phone' | 'Profession' | 'SocialSecurity' | 'State' | 'Street' | 'Url' | 'Username' | 'Vehicle' | 'Zip', required — List of PHI Entities.
      - `offset` integer, required — Starting index of the location from within the input text using the group's encoding.
      - `length` integer, required — Length of the input text using the group's encoding.
      - `text` string — Text of the entity (optional).
  - `customizations` DeidentificationCustomizationOptions — Customizations options to override default service behaviors for synchronous usage.
    - `redactionFormat` string — Format of the redacted output. Only valid when Operation is Redact. Please refer to https://learn.microsoft.com/azure/healthcare-apis/deidentification/redaction-format for more details.
    - `surrogateLocale` string — Locale in which the output surrogates are written.
    - `inputLocale` string — Locale of the input text. Used for better PHI detection. Defaults to 'en-US'.

## Response `200`

The request has succeeded.

- DeidentificationResult — Response body for de-identification operation.
  - `outputText` string — Output text after de-identification. Not available for "Tag" operation.
  - `taggerResult` PhiTaggerResult — Result of the "Tag" operation.
    - `entities` PhiEntity[], required — List of entities detected in the input.
      - `category` 'Unknown' | 'Account' | 'Age' | 'BioID' | 'City' | 'CountryOrRegion' | 'Date' | 'Device' | 'Doctor' | 'Email' | 'Fax' | 'HealthPlan' | 'Hospital' | 'IDNum' | 'IPAddress' | 'License' | 'LocationOther' | 'MedicalRecord' | 'Organization' | 'Patient' | 'Phone' | 'Profession' | 'SocialSecurity' | 'State' | 'Street' | 'Url' | 'Username' | 'Vehicle' | 'Zip', required — List of PHI Entities.
      - `offset` StringIndex, required — String index encoding model.
        - `utf8` integer, required — The offset or length of the substring in UTF-8 encoding
        - `utf16` integer, required — The offset or length of the substring in UTF-16 encoding. Primary encoding used by .NET, Java, and JavaScript.
        - `codePoint` integer, required — The offset or length of the substring in CodePoint encoding. Primary encoding used by Python.
      - `length` StringIndex, required — String index encoding model.
        - `utf8` integer, required — The offset or length of the substring in UTF-8 encoding
        - `utf16` integer, required — The offset or length of the substring in UTF-16 encoding. Primary encoding used by .NET, Java, and JavaScript.
        - `codePoint` integer, required — The offset or length of the substring in CodePoint encoding. Primary encoding used by Python.
      - `text` string — Text of the entity.
      - `confidenceScore` number, double — Confidence score of the category match.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/azure/apis/healthdataaiservices-healthdataaiservices-deidservices.md) · [All operations](https://skmtc.net/azure/apis/healthdataaiservices-healthdataaiservices-deidservices/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/healthdataaiservices-healthdataaiservices-deidservices/revisions/34f61cfe9d59/schema)
