Generate guardrail rules from the questionnaire (Policy Wizard API 2)
curl --request POST \
--url https://api.enkryptai.com/guardrails/policy-wizard/generate-rules \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"questionnaire": {
"purpose": "",
"prohibited_actions": [
"<string>"
],
"user_types": [],
"data_access": [],
"actions": []
},
"domain": "<string>"
}
'import requests
url = "https://api.enkryptai.com/guardrails/policy-wizard/generate-rules"
payload = {
"questionnaire": {
"purpose": "",
"prohibited_actions": ["<string>"],
"user_types": [],
"data_access": [],
"actions": []
},
"domain": "<string>"
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
questionnaire: {
purpose: '',
prohibited_actions: ['<string>'],
user_types: [],
data_access: [],
actions: []
},
domain: '<string>'
})
};
fetch('https://api.enkryptai.com/guardrails/policy-wizard/generate-rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.enkryptai.com/guardrails/policy-wizard/generate-rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'questionnaire' => [
'purpose' => '',
'prohibited_actions' => [
'<string>'
],
'user_types' => [
],
'data_access' => [
],
'actions' => [
]
],
'domain' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.enkryptai.com/guardrails/policy-wizard/generate-rules"
payload := strings.NewReader("{\n \"questionnaire\": {\n \"purpose\": \"\",\n \"prohibited_actions\": [\n \"<string>\"\n ],\n \"user_types\": [],\n \"data_access\": [],\n \"actions\": []\n },\n \"domain\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.enkryptai.com/guardrails/policy-wizard/generate-rules")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"questionnaire\": {\n \"purpose\": \"\",\n \"prohibited_actions\": [\n \"<string>\"\n ],\n \"user_types\": [],\n \"data_access\": [],\n \"actions\": []\n },\n \"domain\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/guardrails/policy-wizard/generate-rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"questionnaire\": {\n \"purpose\": \"\",\n \"prohibited_actions\": [\n \"<string>\"\n ],\n \"user_types\": [],\n \"data_access\": [],\n \"actions\": []\n },\n \"domain\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"enabled": [
{
"id": "priv-1",
"text": "The assistant must not provide individualized investment advice.",
"risk_category": "legal_ip_liability",
"applicability": "assistant",
"severity": "medium",
"source": "document",
"suggested": false,
"display_text": "No individualized investment advice",
"frameworks": [
"hipaa"
],
"mappings": [
{
"framework": "<string>",
"clause": "<string>"
}
]
}
],
"disabled": [
{
"id": "priv-1",
"text": "The assistant must not provide individualized investment advice.",
"risk_category": "legal_ip_liability",
"applicability": "assistant",
"severity": "medium",
"source": "document",
"suggested": false,
"display_text": "No individualized investment advice",
"frameworks": [
"hipaa"
],
"mappings": [
{
"framework": "<string>",
"clause": "<string>"
}
]
}
],
"stats": {
"generated": 3,
"enabled": 3,
"merged": 1,
"doc_only": 2,
"disabled": 20,
"excluded": 15
},
"processing_time": 41.2
}๐ Code of Conduct API
Generate Rules
Generate guardrail rules from the questionnaire (Policy Wizard API 2)
POST
/
guardrails
/
policy-wizard
/
generate-rules
Generate guardrail rules from the questionnaire (Policy Wizard API 2)
curl --request POST \
--url https://api.enkryptai.com/guardrails/policy-wizard/generate-rules \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"questionnaire": {
"purpose": "",
"prohibited_actions": [
"<string>"
],
"user_types": [],
"data_access": [],
"actions": []
},
"domain": "<string>"
}
'import requests
url = "https://api.enkryptai.com/guardrails/policy-wizard/generate-rules"
payload = {
"questionnaire": {
"purpose": "",
"prohibited_actions": ["<string>"],
"user_types": [],
"data_access": [],
"actions": []
},
"domain": "<string>"
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
questionnaire: {
purpose: '',
prohibited_actions: ['<string>'],
user_types: [],
data_access: [],
actions: []
},
domain: '<string>'
})
};
fetch('https://api.enkryptai.com/guardrails/policy-wizard/generate-rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.enkryptai.com/guardrails/policy-wizard/generate-rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'questionnaire' => [
'purpose' => '',
'prohibited_actions' => [
'<string>'
],
'user_types' => [
],
'data_access' => [
],
'actions' => [
]
],
'domain' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.enkryptai.com/guardrails/policy-wizard/generate-rules"
payload := strings.NewReader("{\n \"questionnaire\": {\n \"purpose\": \"\",\n \"prohibited_actions\": [\n \"<string>\"\n ],\n \"user_types\": [],\n \"data_access\": [],\n \"actions\": []\n },\n \"domain\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.enkryptai.com/guardrails/policy-wizard/generate-rules")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"questionnaire\": {\n \"purpose\": \"\",\n \"prohibited_actions\": [\n \"<string>\"\n ],\n \"user_types\": [],\n \"data_access\": [],\n \"actions\": []\n },\n \"domain\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/guardrails/policy-wizard/generate-rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"questionnaire\": {\n \"purpose\": \"\",\n \"prohibited_actions\": [\n \"<string>\"\n ],\n \"user_types\": [],\n \"data_access\": [],\n \"actions\": []\n },\n \"domain\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"enabled": [
{
"id": "priv-1",
"text": "The assistant must not provide individualized investment advice.",
"risk_category": "legal_ip_liability",
"applicability": "assistant",
"severity": "medium",
"source": "document",
"suggested": false,
"display_text": "No individualized investment advice",
"frameworks": [
"hipaa"
],
"mappings": [
{
"framework": "<string>",
"clause": "<string>"
}
]
}
],
"disabled": [
{
"id": "priv-1",
"text": "The assistant must not provide individualized investment advice.",
"risk_category": "legal_ip_liability",
"applicability": "assistant",
"severity": "medium",
"source": "document",
"suggested": false,
"display_text": "No individualized investment advice",
"frameworks": [
"hipaa"
],
"mappings": [
{
"framework": "<string>",
"clause": "<string>"
}
]
}
],
"stats": {
"generated": 3,
"enabled": 3,
"merged": 1,
"doc_only": 2,
"disabled": 20,
"excluded": 15
},
"processing_time": 41.2
}Authorizations
Body
application/json

