List CoC Policies
curl --request GET \
--url https://api.enkryptai.com/code-of-conduct/list-policies \
--header 'apikey: <api-key>'import requests
url = "https://api.enkryptai.com/code-of-conduct/list-policies"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://api.enkryptai.com/code-of-conduct/list-policies', 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/code-of-conduct/list-policies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.enkryptai.com/code-of-conduct/list-policies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.enkryptai.com/code-of-conduct/list-policies")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/code-of-conduct/list-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"policies": [
{
"policy_rules": "\"1. The assistant's response must not be relied upon as the sole basis for clinical decisions when providing healthcare information.\\n2. Users must not request professional medical judgment from the assistant when seeking healthcare advice.\\n3. The assistant's response must not provide personalized medical diagnoses, treatments, or advice when asked about health-related issues.\\n4. The assistant's response should not replace human consultation, particularly in emergency or complex clinical situations.\\n5. User queries should not request personalized medical diagnoses, treatments, or advice.\\n6. Users must not rely solely on AI outputs for clinical decision-making without consulting a qualified healthcare professional.\\n7. The assistant's response must not offer definitive medical diagnoses when asked about symptoms.\\n8. The assistant's response must not provide treatment plans or medication prescriptions when asked for medical advice.\\n9. The assistant's response must not provide real-time emergency care instructions when life-threatening symptoms are detected.\\n10. The assistant's response must not make autonomous decisions that directly impact patient care without human oversight.\\n11. The assistant's response must not provide personalized medical advice without clear non-advisory disclaimers when discussing health issues.\\n12. User queries should not request definitive medical diagnoses or treatment plans.\\n13. Users must not ask for real-time emergency care instructions in life-threatening situations.\\n14. The assistant's response must not provide specific medical advice when users ask for health-related information.\\n15. Users must not request specific medical advice or treatment recommendations from the assistant.\\n16. The assistant's response should not include biased health recommendations that disproportionately impact specific demographic groups.\\n17. Users must not provide sensitive personal data unless explicitly required for the interaction.\\n18. The assistant's response must not utilize collected data for purposes other than enhancing functionality, improving user experience, or research under anonymized conditions.\\n19. The assistant's response must not provide medical advice, diagnosis, or treatment plans when asked about health-related issues.\\n20. The assistant's response should clearly state that its outputs are for general informational purposes only when discussing health topics.\\n21. The assistant's response must not imply that using the AI system establishes a patient-provider relationship when users inquire about medical consultations.\\n22. Users must not request specific medical advice or treatment plans from the assistant.\"",
"project_name": "default",
"total_rules": 22,
"name": "Healthcare Guidelines",
"updated_at": "2025-03-28T08:35:39.656184+00:00",
"policy_id": 1456247350,
"created_at": "2025-03-28T08:35:39.656184+00:00",
"pdf_name": "healthcare_guidelines",
"policy_text": "<string>",
"created_by": "<string>",
"updated_by": "<string>"
}
],
"pagination": {
"page": 1,
"per_page": 10,
"total_count": 25,
"total_pages": 3,
"has_next": true,
"has_previous": false
}
}{
"error": "Invalid pagination parameters. Page must be >= 1, per_page must be between 1 and 100"
}π Code of Conduct API
List Policies
List all Code of Conduct policies with pagination support
GET
/
code-of-conduct
/
list-policies
List CoC Policies
curl --request GET \
--url https://api.enkryptai.com/code-of-conduct/list-policies \
--header 'apikey: <api-key>'import requests
url = "https://api.enkryptai.com/code-of-conduct/list-policies"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://api.enkryptai.com/code-of-conduct/list-policies', 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/code-of-conduct/list-policies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.enkryptai.com/code-of-conduct/list-policies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.enkryptai.com/code-of-conduct/list-policies")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/code-of-conduct/list-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"policies": [
{
"policy_rules": "\"1. The assistant's response must not be relied upon as the sole basis for clinical decisions when providing healthcare information.\\n2. Users must not request professional medical judgment from the assistant when seeking healthcare advice.\\n3. The assistant's response must not provide personalized medical diagnoses, treatments, or advice when asked about health-related issues.\\n4. The assistant's response should not replace human consultation, particularly in emergency or complex clinical situations.\\n5. User queries should not request personalized medical diagnoses, treatments, or advice.\\n6. Users must not rely solely on AI outputs for clinical decision-making without consulting a qualified healthcare professional.\\n7. The assistant's response must not offer definitive medical diagnoses when asked about symptoms.\\n8. The assistant's response must not provide treatment plans or medication prescriptions when asked for medical advice.\\n9. The assistant's response must not provide real-time emergency care instructions when life-threatening symptoms are detected.\\n10. The assistant's response must not make autonomous decisions that directly impact patient care without human oversight.\\n11. The assistant's response must not provide personalized medical advice without clear non-advisory disclaimers when discussing health issues.\\n12. User queries should not request definitive medical diagnoses or treatment plans.\\n13. Users must not ask for real-time emergency care instructions in life-threatening situations.\\n14. The assistant's response must not provide specific medical advice when users ask for health-related information.\\n15. Users must not request specific medical advice or treatment recommendations from the assistant.\\n16. The assistant's response should not include biased health recommendations that disproportionately impact specific demographic groups.\\n17. Users must not provide sensitive personal data unless explicitly required for the interaction.\\n18. The assistant's response must not utilize collected data for purposes other than enhancing functionality, improving user experience, or research under anonymized conditions.\\n19. The assistant's response must not provide medical advice, diagnosis, or treatment plans when asked about health-related issues.\\n20. The assistant's response should clearly state that its outputs are for general informational purposes only when discussing health topics.\\n21. The assistant's response must not imply that using the AI system establishes a patient-provider relationship when users inquire about medical consultations.\\n22. Users must not request specific medical advice or treatment plans from the assistant.\"",
"project_name": "default",
"total_rules": 22,
"name": "Healthcare Guidelines",
"updated_at": "2025-03-28T08:35:39.656184+00:00",
"policy_id": 1456247350,
"created_at": "2025-03-28T08:35:39.656184+00:00",
"pdf_name": "healthcare_guidelines",
"policy_text": "<string>",
"created_by": "<string>",
"updated_by": "<string>"
}
],
"pagination": {
"page": 1,
"per_page": 10,
"total_count": 25,
"total_pages": 3,
"has_next": true,
"has_previous": false
}
}{
"error": "Invalid pagination parameters. Page must be >= 1, per_page must be between 1 and 100"
}List Policies
Retrieve a paginated list of all Code of Conduct policies in your account.Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
status | string | No | - | Filter policies by status |
page | integer | No | 1 | Page number (must be >= 1) |
per_page | integer | No | 10 | Number of items per page (must be between 1 and 100) |
Example Request
curl -X GET "https://api.enkryptai.com/code-of-conduct/list-policies?page=1&per_page=10" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"policies": [
{
"policy_id": "1234567890",
"name": "Test CoC Policy",
"description": "This is a test Code of Conduct policy",
"created_at": "2025-02-21T09:28:52.651201+00:00",
"updated_at": "2025-02-21T09:28:52.651201+00:00",
"project_name": "default"
}
],
"pagination": {
"page": 1,
"per_page": 10,
"total_count": 25,
"total_pages": 3,
"has_next": true,
"has_previous": false
}
}
Error Responses
400 Bad Request - Invalid Pagination Parameters
{
"error": "Invalid pagination parameters. Page must be >= 1, per_page must be between 1 and 100"
}
Pagination
The response includes pagination metadata to help you navigate through the results:page: Current page numberper_page: Number of items per pagetotal_count: Total number of items across all pagestotal_pages: Total number of pageshas_next: Boolean indicating if thereβs a next pagehas_previous: Boolean indicating if thereβs a previous page
page parameter. For example, to get page 2:
GET /code-of-conduct/list-policies?page=2&per_page=10
Authorizations
Query Parameters
Filter policies by status
Page number (must be >= 1)
Required range:
x >= 1Example:
1
Number of items per page (must be between 1 and 100)
Required range:
1 <= x <= 100Example:
10
βI

