Create an AI filter policy for an organisation
POST
/api/v3/organizations/{organisation}/ai/filter-policies
const url = 'https://dashboard.quantcdn.io/api/v3/organizations/example/ai/filter-policies';const options = { method: 'POST', 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 POST \ --url https://dashboard.quantcdn.io/api/v3/organizations/example/ai/filter-policies \ --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
The organisation ID
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
description
string
enabled
boolean
rules
required
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 created successfully
Media typeapplication/json
object
Examplegenerated
{}Validation error
Failed to create filter policy
