Skip to main content
POST
/
v1
/
admin
/
sanitizer
/
policies
Update sanitizer policies
curl --request POST \
  --url http://co-mind-platform-host/v1/admin/sanitizer/policies \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "policies": {
    "user_input": {
      "INJECTION": {
        "action": "block",
        "threshold": 123,
        "alert_admin": true,
        "audit": true
      },
      "JAILBREAK": {
        "action": "block",
        "threshold": 123,
        "alert_admin": true,
        "audit": true
      },
      "BENIGN": {
        "action": "block",
        "threshold": 123,
        "alert_admin": true,
        "audit": true
      }
    },
    "retrieved_content": {
      "INJECTION": {
        "action": "block",
        "threshold": 123,
        "alert_admin": true,
        "audit": true
      },
      "JAILBREAK": {
        "action": "block",
        "threshold": 123,
        "alert_admin": true,
        "audit": true
      },
      "BENIGN": {
        "action": "block",
        "threshold": 123,
        "alert_admin": true,
        "audit": true
      }
    },
    "pii": {
      "default": {
        "action": "<string>",
        "entities": [
          "<string>"
        ]
      },
      "contexts": {}
    }
  },
  "tenant_id": "<string>"
}
'
{
  "user_input": {
    "INJECTION": {
      "action": "block",
      "threshold": 123,
      "alert_admin": true,
      "audit": true
    },
    "JAILBREAK": {
      "action": "block",
      "threshold": 123,
      "alert_admin": true,
      "audit": true
    },
    "BENIGN": {
      "action": "block",
      "threshold": 123,
      "alert_admin": true,
      "audit": true
    }
  },
  "retrieved_content": {
    "INJECTION": {
      "action": "block",
      "threshold": 123,
      "alert_admin": true,
      "audit": true
    },
    "JAILBREAK": {
      "action": "block",
      "threshold": 123,
      "alert_admin": true,
      "audit": true
    },
    "BENIGN": {
      "action": "block",
      "threshold": 123,
      "alert_admin": true,
      "audit": true
    }
  },
  "pii": {
    "default": {
      "action": "<string>",
      "entities": [
        "<string>"
      ]
    },
    "contexts": {}
  }
}

Authorizations

Authorization
string
header
required

Bearer token authentication. Supports two token types:

  • JWT Access Token — obtained via POST /v1/auth/login
  • Personal Access Token (PAT) — created via POST /v1/api-tokens, format: cmnd_<tokenId>.<secret>

Body

application/json
policies
object
required
tenant_id
string

Optional tenant ID (defaults to user's org)

Response

Updated policies

user_input
object
retrieved_content
object
pii
object