> For the complete documentation index, see [llms.txt](https://docs.teleskope.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.teleskope.ai/the-platform/api-service/scanning-api/v1-classify.md).

# v1/classify

Detect personal or sensitive information in a payload without modifying it. Use the body fields below to control which elements are reported. To redact rather than detect, use [v1/scrub](/the-platform/api-service/redaction-api/v1-scrub.md).

{% openapi src="/files/cGyOSqpybs6wM3Oy8JMJ" path="/v1/classify" method="post" %}
[{"openapi":"3.12.json](https://2383928706-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgO8NOoWqwRd6MduHoEy7%2Fuploads%2Fgit-blob-8868525e0357b58fd3f49b11e1b4d888773e49fc%2F%7B%22openapi%22%3A%223.12.json?alt=media)
{% endopenapi %}

## Body options

| Field               | Type      | Description                                                                                                                                                            |
| ------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `content`           | string    | Text to classify. Required.                                                                                                                                            |
| `filters`           | string\[] | Allow-list of element labels to report. Omit to report every supported element.                                                                                        |
| `excludeFilters`    | string\[] | Deny-list of element labels to skip. Takes precedence over `filters`.                                                                                                  |
| `sensitivityLevels` | string\[] | Restrict results to these tiers: `low`, `medium`, `high`, `critical`. Elements with no assigned tier are always included.                                              |
| `useML`             | boolean   | Enable ML-based detection in addition to rules. Defaults to `true`.                                                                                                    |
| `treatAsJSON`       | boolean   | Treat `content` as a JSON string: classify only inside string values. Use for JSON payloads. The root must be an object; wrap a top-level array as `{"items": [...]}`. |

## Response fields

Each entry in `classifications` describes one detected element.

| Field       | Type      | Description                                                                             |
| ----------- | --------- | --------------------------------------------------------------------------------------- |
| `index`     | integer   | Position of this result within `classifications`.                                       |
| `class`     | string    | Element label, for example `email`. Use this value with `filters` and `excludeFilters`. |
| `category`  | string\[] | Categories the element belongs to.                                                      |
| `startChar` | integer   | Character offset of the match within `content`.                                         |
| `charSize`  | integer   | Length of the match in characters.                                                      |
| `startByte` | integer   | Byte offset of the match within `content`.                                              |
| `byteSize`  | integer   | Length of the match in bytes.                                                           |
| `version`   | integer   | Taxonomy version used for this result.                                                  |

Use `startChar` and `charSize` in languages with character-indexed strings, and `startByte` and `byteSize` when slicing raw bytes. The two differ whenever the payload contains multi-byte characters.

The response also carries `scanner_version`, `ml_classifier_used`, and `timing`.

{% hint style="warning" %}
Earlier revisions of this page showed `data_element`, `star_char`, and `char_size`. The API has never emitted those names. Code written against them parses a valid response and finds nothing. Read `class`, `startChar`, and `charSize`.
{% endhint %}

## Element labels

`filters` and `excludeFilters` accept element labels from the [Entity Taxonomy](/specifications/data-elements/entity-taxonomy-v2.md).

Names and email addresses are `medium` tier. Setting `sensitivityLevels` to `["high", "critical"]` alone excludes them; use `["medium", "high", "critical"]` to cover everyday personal data.

## Related

* [v1/classifyCollection](/the-platform/api-service/scanning-api/v1-classifycollection.md) — classify multiple values in one request.
* [v1/scrub](/the-platform/api-service/redaction-api/v1-scrub.md) — redact instead of detect.
* [Redaction Methodologies](/specifications/redaction-methodologies.md) — how each redaction style transforms a detected value.
