Walled Ai
  1. api reference
Walled Ai
  • walledai
    • Introduction To WalledAi
    • Error Codes
    • sdk
      • Walled AI SDK (Python)
      • Walled AI SDK (Node.js)
    • api reference
      • walledprotect
        POST
      • walledredact
        POST
  1. api reference

walledredact

POST
https://services.walled.ai/v1/walled-redact
The WalledRedact detects and masks personally identifiable information (PII) in text, replacing sensitive data with placeholders.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params

Body Params application/json

Examples

Responses

🟢200Success
application/json
Body

🟠403Forbidden
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location --request POST 'https://services.walled.ai/v1/walled-redact' \
--header 'x-api-key: <your-walledai-api-key>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
	"text": [
		{
			"role": "user",
			"content": "Hi, I'\''m John Doe. I live at 123 Maple Street and my email is john.doe@example.com"
		},
		{
			"role": "assistant",
			"content": "Hello John, how can I assist you today?"
		}
	]
}'
Response Response Example
200 - Multi Text Response
{
    "success": true,
    "statusCode": 200,
    "data": {
        "input": [
            {
                "role": "user",
                "content": "Hi, I'm John Doe. I live at 123 Maple Street and my email is john.doe@example.com"
            },
            {
                "role": "assistant",
                "content": "Hello John, how can I assist you today?"
            }
        ],
        "masked_text": [
            {
                "role": "user",
                "content": "Hi, I’m [Person_1]. I live at [Address_1] and my email is [Email_1]."
            },
            {
                "role": "assistant",
                "content": "Hello [Person_1], how can I assist you today?"
            }
        ],
        "mapping": {
            "[Person_1]": "John Doe",
            "[Address_1]": "123 Maple Street",
            "[Email_1]": "john.doe@example.com"
        },
        "error": null
    }
}
Modified at 2025-08-28 08:38:54
Previous
walledprotect
Built with