# Redact PII with curl

> The complete curl reference for the Redactly redaction API: text, files, styles, and entity filters.

Canonical: https://bitbanger.in/integrations/curl
Last updated: 2026-10-27

Every endpoint is a plain HTTP call, so curl is the shortest path to a working integration and the easiest way to check behaviour before you write code.

## Code

```
# Redact a string
curl -X POST https://api.bitbanger.in/v1/redact \
  -H "X-API-Key: rdct_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"text": "Call Jane Doe on 555-867-5309", "style": "replace"}'

# Redact a file (JSON or CSV)
curl -X POST https://api.bitbanger.in/v1/redact/file \
  -H "X-API-Key: rdct_your_key_here" \
  -F "file=@customers.csv" \
  --output customers_redacted.csv

# Check the service
curl https://api.bitbanger.in/health
```

## Notes

- style accepts replace, mask, or remove. Omitting it defaults to replace.
- The file endpoint only accepts .json and .csv.
- /health returns the status and the detector build identifier, which is useful for uptime checks.

## Related

- [API reference](https://bitbanger.in/docs)
- [Playground](https://bitbanger.in/redact)
- [All 40 entity types](https://bitbanger.in/entities/)
