Skip to main content

Test sensitive words

Test sensitive words. POST /api/openapi/v1/sensitive-word-libraries/test, scope admin.v1.sensitive-words.manage.

  • Scope: admin.v1.sensitive-words.manage
  • Permission: Manage sensitive-word libraries
  • Action: manage
  • Endpoint: POST/api/openapi/v1/sensitive-word-libraries/test
Use Authorization: Bearer \<API_KEY\>. The application must have subject_scope={"mode":"all"}; restricted scopes return 403. Scopes are independently granted. Do not cache responses. Submit text to the existing sensitive-word service using the current organization configuration. Results, matching rules and audit behavior match the UI.

Common request headers

Apply the “Authentication and headers” section in “Configure the QwenWork console through APIs”: Authorization is required and X-Request-Id is optional. See this page for the required scope. Whether Idempotency-Key applies and is required is specified in this page’s request parameters; a tracing identifier does not replace an idempotency key.

Request parameters

Request body: required; Content-Type: application/json.
NameLocationTypeRequiredDescriptionExample
textbodystringYestext; maxLength=10000-

Response statuses

HTTP statusTriggerResponse structureClient action
200Request succeededSee “Response” on this pageRead the response.
defaultOther authentication, authorization, validation or dependency errorsSee “General error” in “Configure the QwenWork console through APIs”Handle the status and code; verify the result and idempotency requirements before retrying writes.

Response

Content-Type: application/json
NameTypeRequiredDescriptionExample
blockedbooleanYesblocked-
matched_librariesarray\<object\> | nullYesmatched libraries-

matched_libraries[]

FieldTypeRequiredDescription
idstringYesRecord identifier
namestringYesName

Errors and retries

Existing UI error codes and validation are preserved. 401/403 indicate authentication or authorization failure; 409 requires rereading before retry; 413 indicates an oversized request; 400/422 indicate invalid input; 503 indicates an unavailable dependency. The response and machine contract are authoritative. Retry idempotent creates with the same Idempotency-Key and payload.