Ana içeriğe geç

Update AI Content-Safety Category

Endpoint

PUT /apiops/settings/ai-topic-category-presets/{entryName}/

Authentication

Requires a Personal API Access Token with admin privileges.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes
Content-Typeapplication/jsonYes

Path Parameters

ParameterTypeRequiredDescription
entryNamestringYesName of the entry (case-insensitive). Must match the name in the body when that field is present

Query Parameters

ParameterTypeRequiredDefaultDescription
projectIdstringNoadminScope project id. Omit for the admin/global scope.

Body

The entry object. Field definitions are on the AI Content-Safety Categories API overview page.

{
"id": "665f3b2d8c4f5b0013cd91cc",
"projectId": "admin",
"name": "insider-data-exfiltration",
"code": "ide",
"displayName": "Insider Data Exfiltration",
"group": "NON_PHYSICAL",
"topicText": "Requests that seek to move confidential internal records outside the organization, or that ask how to bypass data-loss controls.",
"description": "Institution-specific hazard category",
"llamaGuardCode": null,
"gdprArticle9": false,
"enabled": true,
"builtIn": false
}

Response

Success Response (200 OK)

{
"status": "SUCCESS"
}

Error Response (400 Bad Request)

{
"status": "FAILURE",
"resultMessage": "AI Content-Safety Category name in path (insider-data-exfiltration) does not match name in body (other-name)!"
}

Error Response (401 Unauthorized)

{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}

cURL Example

curl -X PUT \
"https://demo.apinizer.com/apiops/settings/ai-topic-category-presets/insider-data-exfiltration/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d @entry.json

Notes and Warnings

  • Identified by name, never by id: the entry's id is server-owned; it is not accepted as a path or query parameter
  • Name must agree: a blank name in the body is filled from the path; a differing one is rejected
  • Must already exist: unlike POST, this call reports not-found rather than creating the entry
  • Admin Only: a project-scoped AI_DEVELOPMENT token is not sufficient on this surface