---
title: "Detect Protected Material for Text"
method: POST
path: "/text:detectProtectedMaterial"
---

# Detect Protected Material for Text

`POST /text:detectProtectedMaterial`

A synchronous API for detecting protected material in the given text.

## Query parameters

- `api-version` string, required

## Request body

- DetectTextProtectedMaterialOptions — The request of detecting potential protected material present in the given text.
  - `text` string, required — The text to be analyzed, which may contain protected material. The characters will be counted in Unicode code points.

## Response `200`

The request has succeeded.

- DetectTextProtectedMaterialResult — The combined detection results of potential protected material.
  - `protectedMaterialAnalysis` TextProtectedMaterialAnalysisResult, required — The individual detection result of potential protected material.
    - `detected` boolean, required — Whether potential protected material is detected or not.

## Other responses

- `default` — An unexpected error response.

## Changes

- **2026-07-13** (2023-04-30-preview) `120760ad4fa5` — 1 breaking
  - api path removed without deprecation
- **2026-07-13** (2023-04-30-preview) `5a0d4f8a7408` — 1 info
  - endpoint added
- **2023-05-09** (2023-04-30-preview) `935ba3d5e45a` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/azure/apis/cognitiveservices-contentsafety/changes/text:detectProtectedMaterial/post.md)

---

[API](https://skmtc.dev/azure/apis/cognitiveservices-contentsafety.md) · [All operations](https://skmtc.dev/azure/apis/cognitiveservices-contentsafety/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/cognitiveservices-contentsafety/revisions/d4969093cba0/schema)
