Skip to main content
POST
/
v2
/
pii
/
redact
Redact PII
curl --request POST \
  --url https://api.orq.ai/v2/pii/redact \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": "<string>",
  "language": "<string>",
  "threshold": 123
}
'
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({text: '<string>', language: '<string>', threshold: 123})
};

fetch('https://api.orq.ai/v2/pii/redact', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
import requests

url = "https://api.orq.ai/v2/pii/redact"

payload = {
    "text": "<string>",
    "language": "<string>",
    "threshold": 123
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "redacted_text": "<string>",
  "mappings": {}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
text
string
language
string
threshold
number<double>

Response

200 - application/json

OK

redacted_text
string
mappings
object

Maps each placeholder (e.g. "<PERSON_1>") to the original value it replaced.