curl --request GET \
--url https://api.enkryptai.com/compliance/get-scan \
--header 'X-Enkrypt-Scan: <x-enkrypt-scan>' \
--header 'apikey: <api-key>'import requests
url = "https://api.enkryptai.com/compliance/get-scan"
headers = {
"X-Enkrypt-Scan": "<x-enkrypt-scan>",
"apikey": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Enkrypt-Scan': '<x-enkrypt-scan>', apikey: '<api-key>'}
};
fetch('https://api.enkryptai.com/compliance/get-scan', 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/compliance/get-scan",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Enkrypt-Scan: <x-enkrypt-scan>",
"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/compliance/get-scan"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Enkrypt-Scan", "<x-enkrypt-scan>")
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/compliance/get-scan")
.header("X-Enkrypt-Scan", "<x-enkrypt-scan>")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/compliance/get-scan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Enkrypt-Scan"] = '<x-enkrypt-scan>'
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"scan": {
"scan_id": "11111111-2222-3333-4444-555555555555",
"id": "00000000-1111-2222-3333-444444444444",
"project_name": "default",
"scan_name": "ChatGPT Enterprise",
"created_by": "00000000-1111-2222-3333-444444444444",
"updated_by": "00000000-1111-2222-3333-444444444444",
"provider": "openai",
"workspace_id": "00000000-0000-0000-0000-000000000000",
"event_types": [
"CONVERSATION_MESSAGE"
],
"guardrails_name": "My Guardrail",
"cursor_end_time": "2026-09-01T00:00:00Z",
"cursor_file_id": null,
"last_polled_at": "2026-09-23T10:00:00Z",
"list_interval_s": 60,
"pending_cap": 5000,
"status": "active",
"created_at": "2026-09-01T09:00:00Z",
"updated_at": "2026-09-01T09:00:00Z"
},
"lag_s": 63.4
}{
"error": "Scan not found"
}{
"code": 403,
"error": "Forbidden",
"message": "Access Denied",
"request_id": "<string>",
"time": 123
}{
"error": "Scan not found"
}{
"error": "Scan not found"
}{
"error": "Scan not found"
}Get Compliance Scan
Returns one scan’s record, addressed by name in X-Enkrypt-Scan, plus the derived lag_s.
cursor_end_time is how far through the provider’s timeline the scan has read and lag_s is the gap between that and now. last_polled_at moves on every successful poll, whether or not anything new came back, which is what separates a quiet workspace from a stopped scan.
compliance_api_key is never included.
Requires the governance officer role on the project your API key belongs to. The organization owner is not exempt — an owner without the role gets 403 — and an individual (non-organization) account cannot hold the role at all.
curl --request GET \
--url https://api.enkryptai.com/compliance/get-scan \
--header 'X-Enkrypt-Scan: <x-enkrypt-scan>' \
--header 'apikey: <api-key>'import requests
url = "https://api.enkryptai.com/compliance/get-scan"
headers = {
"X-Enkrypt-Scan": "<x-enkrypt-scan>",
"apikey": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Enkrypt-Scan': '<x-enkrypt-scan>', apikey: '<api-key>'}
};
fetch('https://api.enkryptai.com/compliance/get-scan', 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/compliance/get-scan",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Enkrypt-Scan: <x-enkrypt-scan>",
"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/compliance/get-scan"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Enkrypt-Scan", "<x-enkrypt-scan>")
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/compliance/get-scan")
.header("X-Enkrypt-Scan", "<x-enkrypt-scan>")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/compliance/get-scan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Enkrypt-Scan"] = '<x-enkrypt-scan>'
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"scan": {
"scan_id": "11111111-2222-3333-4444-555555555555",
"id": "00000000-1111-2222-3333-444444444444",
"project_name": "default",
"scan_name": "ChatGPT Enterprise",
"created_by": "00000000-1111-2222-3333-444444444444",
"updated_by": "00000000-1111-2222-3333-444444444444",
"provider": "openai",
"workspace_id": "00000000-0000-0000-0000-000000000000",
"event_types": [
"CONVERSATION_MESSAGE"
],
"guardrails_name": "My Guardrail",
"cursor_end_time": "2026-09-01T00:00:00Z",
"cursor_file_id": null,
"last_polled_at": "2026-09-23T10:00:00Z",
"list_interval_s": 60,
"pending_cap": 5000,
"status": "active",
"created_at": "2026-09-01T09:00:00Z",
"updated_at": "2026-09-01T09:00:00Z"
},
"lag_s": 63.4
}{
"error": "Scan not found"
}{
"code": 403,
"error": "Forbidden",
"message": "Access Denied",
"request_id": "<string>",
"time": 123
}{
"error": "Scan not found"
}{
"error": "Scan not found"
}{
"error": "Scan not found"
}Authorizations
Headers
The scan's saved name, within the project your API key belongs to. Letters, numbers, spaces and _ & - . /; must start and end with a letter or a number; at most 64 characters.
"ChatGPT Enterprise"
Response
Successful Response
One compliance scan. compliance_api_key is deliberately absent — no endpoint returns the stored key, in plaintext or masked.
Show child attributes
Show child attributes
Seconds between cursor_end_time and now. A backfill starts high and works it down; a caught-up scan sits near list_interval_s. Derived, not stored.

