Skip to main content
POST
/
guardrails
/
add-policy
Create Policy
curl --request POST \
  --url https://api.enkryptai.com/guardrails/add-policy \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "detectors": {}
}
'
{
  "message": "Policy details added successfully"
}
Archived: This endpoint is legacy. Use the new Add Guardrail endpoint instead, which supports separate input/output detector configurations.

Authorizations

apikey
string
header
required

Body

application/json
name
string
required
description
string
required
detectors
GuardrailsDetectorsObject ยท object

Response

200 - application/json

Successful Response

message
string
Example:

"Policy details added successfully"

data
GuardrailsPolicyResponseObject ยท object