Update a specific AI filter policy
PUT
/api/v3/organizations/{organisation}/ai/filter-policies/{policyId}
const url = 'https://dashboard.quantcdn.io/api/v3/organizations/example/ai/filter-policies/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","description":"example","enabled":true,"rules":[{"name":"example","match":{"type":"word","values":["example"],"pattern":"example"},"action":"BLOCK","applyTo":"input"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://dashboard.quantcdn.io/api/v3/organizations/example/ai/filter-policies/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "description": "example", "enabled": true, "rules": [ { "name": "example", "match": { "type": "word", "values": [ "example" ], "pattern": "example" }, "action": "BLOCK", "applyTo": "input" } ] }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”organisation
required
string
policyId
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
string
description
string
enabled
boolean
rules
Array<object>
object
name
string
match
Match criteria
object
type
string
values
Required when type=word
Array<string>
pattern
Required when type=regex
string
action
string
applyTo
string
Responses
Section titled “Responses”Filter policy updated successfully
Media typeapplication/json
object
Examplegenerated
{}Validation error
Failed to update filter policy
