---
title: "Scan text for content a reader cannot see: zero-width and tag characters, bidirectional controls, hidden markup and comments, and base64 blobs (decoded and re-scanned one level; undecodable blobs reported as opaque). Deterministic findings carry exact codepoint positions and visibly rendered excerpts, plus a sanitized copy; two labeled heuristic classes are never presented as certain. A clean scan is not a finding that text is safe."
method: POST
path: "/v1/security/scan-text"
tags: ["Platform"]
---

# Scan text for content a reader cannot see: zero-width and tag characters, bidirectional controls, hidden markup and comments, and base64 blobs (decoded and re-scanned one level; undecodable blobs reported as opaque). Deterministic findings carry exact codepoint positions and visibly rendered excerpts, plus a sanitized copy; two labeled heuristic classes are never presented as certain. A clean scan is not a finding that text is safe.

`POST /v1/security/scan-text`

## Request

- Base URL: `https://www.rightshold.com`
- URL: `https://www.rightshold.com/v1/security/scan-text`
- Auth: none required

## Headers

- `X-Request-Id` string

## Request body

- object
  - `text` string, required
  - `context` 'text' | 'email_html': email_html scans raw HTML email bodies and sanitizes for that context

## Response `200`

OK

- object: Inferred from 4 recorded responses; required fields appeared in every one; additional properties may appear.
  - `status` string, required
  - `findings` object[], required
    - `class` string, required
    - `heuristic` boolean, required
    - `start` integer, required
    - `end` integer, required
    - `codepoints` string[], required
    - `excerpt` string, required
    - `detail` string, required
  - `deterministic_count` integer, required
  - `heuristic_count` integer, required
  - `sanitized` string, required
  - `note` string, required
  - `context` string, required

## Other responses

- `400`: Problem details: a stable error code, type URI, title, status and an explanation
- `401`: Problem details: a stable error code, type URI, title, status and an explanation
- `404`: Problem details: a stable error code, type URI, title, status and an explanation
- `405`: Problem details: a stable error code, type URI, title, status and an explanation
- `422`: Problem details: a stable error code, type URI, title, status and an explanation
- `429`: Request budget exhausted; retry after Retry-After seconds
- `500`: Problem details: a stable error code, type URI, title, status and an explanation
- `4XX`: {error, detail}

---

[API](https://skmtc.dev/rightshold/apis/rightshold-api.md) · [All operations](https://skmtc.dev/rightshold/apis/rightshold-api/llms.txt) · [OpenAPI document](https://skmtc.dev/rightshold/apis/rightshold-api/revisions/cfe84fdde1ca?raw)
