PUT
/
v1
/
applications
/
{application_id}
/
policies
/
{policy_id}
curl --request PUT \
  --url https://guard-api.metatext.ai/v1/applications/{application_id}/policies/{policy_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "<string>",
  "definition": "<string>",
  "rules": [
    {
      "type": "factuality",
      "expected": "pass",
      "value": "<string>",
      "threshold": 123,
      "flagged": [
        "<string>"
      ]
    }
  ],
  "target": [
    "input"
  ],
  "override_response": "<string>"
}'
{
  "id": "<string>",
  "definition": "<string>",
  "rules": [
    {
      "type": "factuality",
      "expected": "pass",
      "value": "<string>",
      "threshold": 123,
      "flagged": [
        "<string>"
      ]
    }
  ],
  "target": [
    "input"
  ],
  "override_response": "<string>"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

application_id
string
required
policy_id
string
required

Body

application/json
id
string
required
rules
object[]
required
target
required
Available options:
input,
output,
user,
assistant,
system,
context
definition
string | null
override_response
string | null

Response

200
application/json
Successful Response
id
string
required
rules
object[]
required
target
required
Available options:
input,
output,
user,
assistant,
system,
context
definition
string | null
override_response
string | null