curl --request POST \
--url https://api.enkryptai.com/compliance/test-connection \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"compliance_api_key": "YOUR_PROVIDER_COMPLIANCE_KEY",
"workspace_id": "00000000-0000-0000-0000-000000000000",
"event_types": [
"CONVERSATION_MESSAGE",
"CODEX_LOG"
],
"proposed_cursor": "2026-09-01T00:00:00Z"
}
'{
"key_valid": true,
"workspace_found": true,
"event_types": [
{
"event_type": "CONVERSATION_MESSAGE",
"supported": true
},
{
"event_type": "CODEX_LOG",
"supported": false,
"status": 400,
"error": "not available for this workspace"
}
],
"backfill": {
"since": "2026-09-01T00:00:00Z",
"files": 42,
"bytes": 187654321,
"by_event_type": {
"CONVERSATION_MESSAGE": {
"files": 42,
"bytes": 187654321
}
},
"truncated": false
}
}Test Compliance Connection
Probes a provider compliance key and a workspace before any scan exists: whether the key works, whether the workspace was found, which event types that workspace can actually serve, and — when you send proposed_cursor — how much history a backfill from that time would pull.
Read-only on both sides. Nothing is stored, including the key, so Add Compliance Scan has to carry it again.
A rejected key is not an HTTP error: the call returns 200 with key_valid: false. Check the fields, not the status code.
Listing a 30-day window is the slowest call in this API; allow up to a minute for it.
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 POST \
--url https://api.enkryptai.com/compliance/test-connection \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"compliance_api_key": "YOUR_PROVIDER_COMPLIANCE_KEY",
"workspace_id": "00000000-0000-0000-0000-000000000000",
"event_types": [
"CONVERSATION_MESSAGE",
"CODEX_LOG"
],
"proposed_cursor": "2026-09-01T00:00:00Z"
}
'{
"key_valid": true,
"workspace_found": true,
"event_types": [
{
"event_type": "CONVERSATION_MESSAGE",
"supported": true
},
{
"event_type": "CODEX_LOG",
"supported": false,
"status": 400,
"error": "not available for this workspace"
}
],
"backfill": {
"since": "2026-09-01T00:00:00Z",
"files": 42,
"bytes": 187654321,
"by_event_type": {
"CONVERSATION_MESSAGE": {
"files": 42,
"bytes": 187654321
}
},
"truncated": false
}
}Body
Body of Test Compliance Connection. Nothing here is stored, including the key.
Response
The probe ran. key_valid and workspace_found say whether the credentials worked — a rejected key is reported here, not as a 4xx.
Result of the probe. A rejected key is reported here with key_valid: false and HTTP 200, not as a 4xx.

