RedactKit Quickstart
Redact personally identifiable information (PII) from text with a single HTTP call.
HTTP Endpoint
POST /api/redact/text accepts JSON payloads with an input string and returns the redacted result.
- Content‑Type must be application/json.
- Max input size (demo): ~50k chars.
- Entities (demo): email, phone, PAN, Aadhaar, credit card.
Try with cURL
curl -X POST https://redactkit.com/api/redact/text \
-H "Content-Type: application/json" \
-d '{"input":"Email: dev@company.com | PAN: ABCDE1234F | Phone: +91 99888 77665 | Aadhaar: 1234-5678-9012 | Card: 4444 3333 2222 1111"}'
Example response:
{
"input": "Email: dev@company.com | PAN: ABCDE1234F | Phone: +91 99888 77665 | Aadhaar: 1234-5678-9012 | Card: 4444 3333 2222 1111",
"output": "Email: [REDACTED_EMAIL] | PAN: [REDACTED_PAN] | Phone: [REDACTED_PHONE] | Aadhaar: [REDACTED_AADHAAR] | Card: [REDACTED_CARD]"
}
Use from JavaScript/TypeScript
async function redact(input) {
const res = await fetch("https://redactkit.com/api/redact/text", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ input }),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
return data.output;
}
redact("Contact me: dev@company.com, PAN ABCDE1234F")
.then(console.log)
.catch(console.error);
Request & Response
Request
POST /api/redact/text
Content-Type: application/json
{
"input": "string"
}
Response
200 OK
{
"input": "string",
"output": "string"
}
Errors: 400 (invalid JSON or missing input), 415 (wrong Content‑Type).
Coming soon: POST /api/redact/pdf for PDF uploads, custom entity configs, API keys & rate limits.