Anon

Anonymize sensitive entities in text

Uses Microsoft Presidio analyzer and anonymizer to detect PII entities in text and replace them with truncated SHA-256 hashes (16 characters). Returns both the anonymized text and a mapping of original values to their anonymized replacements for potential re-identification.

post/v1/anon

Request

  • Base URL: https://apipie.ai
  • URL: https://apipie.ai/v1/anon
  • Auth: API key in header Authorization

Request body

textstring required

Text containing potentially sensitive information to be anonymized

Example request

{
  "text": "John Doe lives in Seattle and his phone number is 555-123-4567"
}

Response

Successfully anonymized text with value mappings

anon_textstring

Text with all detected PII replaced by truncated SHA-256 hashes

Example response

{
  "anon_text": "6cea57c2fb6cbc2a lives in 52235717290f5d20 and his phone number is d36e83082288d9f2",
  "mappings": [
    {
      "actual_value": "John Doe",
      "mapped_value": "f241fffc3e5e67ab9",
      "type": "PERSON"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.