PUT /zones/{zone_id}/ai-security/custom-topics
Update the custom topic list of the zone, overwriting it entirely with the topics in the request, so include every topic you want to keep. Changes can take up to a minute to propagate.
Each entry has a label, used to reference the topic in rule expressions and analytics, and a topic
description, which the classifier scores prompts against while AI Security for Apps is enabled. The following
rules apply:
- A zone can hold at most 20 topics.
labelmust be 2–20 characters, using only lowercase letters (a–z), digits (0–9), and hyphens.topicmust be 2–50 printable ASCII characters.- Labels must be unique within the zone, and so must topic descriptions.
Servers
- https://api.cloudflare.com/client/v4
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
zone_id |
String | Yes |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
topics[] |
Array | No |
Custom topic categories for AI Security for Apps content detection. |
topics[].topic |
String | Yes |
Description of the topic category. Must contain only printable ASCII characters. |
topics[].label |
String | Yes |
Unique label identifier. Must contain only lowercase letters (a–z), digits (0–9), and hyphens. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.