POST
/
v1
/
policies
curl --request POST \
  --url https://api.guardion.ai/v1/policies \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "<string>",
  "definition": "<string>",
  "target": "user",
  "detectors": [
    {
      "model": "modern-guard",
      "expected": "block",
      "reference": "<string>",
      "threshold": 123
    }
  ],
  "override_response": "<string>"
}'
{
  "id": "<string>",
  "definition": "<string>",
  "target": "user",
  "detectors": [
    {
      "model": "modern-guard",
      "expected": "block",
      "reference": "<string>",
      "threshold": 123
    }
  ],
  "override_response": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
id
string
required
target
enum<string>
required
Available options:
user,
assistant,
system,
developer,
context
detectors
object[]
required
definition
string | null
override_response
string | null

Response

200
application/json
Successful Response
id
string
required
target
enum<string>
required
Available options:
user,
assistant,
system,
developer,
context
detectors
object[]
required
definition
string | null
override_response
string | null