Skip to main content
POST
/
api
/
v1
/
security
/
redact
Redact Content
curl --request POST \
  --url https://api.promptguard.dev/api/v1/security/redact \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "<string>",
  "pii_types": [
    "<string>"
  ]
}
'
{
  "original": "<string>",
  "redacted": "<string>",
  "piiFound": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

API Key authentication for developer endpoints (/api/v1/*). Use format: 'Bearer pg_api_your_key_here'

Headers

x-api-key
string | null

Body

application/json
content
string
required

Text to redact

Maximum string length: 100000
pii_types
string[] | null

Specific PII types to redact (default: all)

Response

Successful Response

original
string
required
redacted
string
required
piiFound
string[]
required