---
title: "Redact structured table"
method: POST
path: "/api/Redact/structured_table"
tags: ["Text Redaction"]
---

# Redact structured table

`POST /api/Redact/structured_table`

Returns a modified version of the structured table, redacted according to each column's provided entity type.

## Request body

- StructuredTableRedactionRequest
  - `columns` array[]
    - string[]
  - `piiTypes` string[]
  - `generatorMetadata` object, nullable — A dictionary mapping entity type names to their transformation metadata configuration.

## Response `200`

Returns the redacted table data

- RedactionSdkModel — The result of a redaction operation, containing the original text, redacted text, and details of each entity replacement.
  - `originalText` string — The original input text before redaction.
  - `redactedText` string — The text after redaction has been applied.
  - `usage` integer — The number of words processed.
  - `deIdentifyResults` ReplacementSdkModel[] — The list of entity replacements that were made during redaction.
    - `start` integer — The start character index of the detected entity in the original text.
    - `end` integer — The end character index of the detected entity in the original text.
    - `newStart` integer — The start character index of the replacement in the redacted text.
    - `newEnd` integer — The end character index of the replacement in the redacted text.
    - `label` string — The entity type label (e.g. NAME_GIVEN, LOCATION, DATE_TIME).
    - `text` string — The original text of the detected entity.
    - `newText` string, nullable — The replacement text that was substituted for the original entity.
    - `score` number, double — The confidence score of the entity detection, between 0 and 1.
    - `language` string, nullable — The detected language of the text containing the entity.
    - `exampleRedaction` string, nullable — An example of what the redacted value looks like, if applicable.
    - `jsonPath` string, nullable — The JSON path of the entity, if the source was a JSON document.
    - `xmlPath` string, nullable — The XML path of the entity, if the source was an XML document.
    - `idx` integer, nullable — The index of the text in the bulk request array, if from a bulk redaction operation.

## Other responses

- `400` — Invalid entity types or column count

---

[API](https://skmtc.net/tonic/apis/textual-api.md) · [All operations](https://skmtc.net/tonic/apis/textual-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tonic/textual-api/revisions/41da8739a690/schema)
