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
}
}Authorizations
Body
Body of Test Compliance Connection. Nothing here is stored, including the key.
The provider's compliance API key to probe.
The ChatGPT workspace UUID, not an OpenAI organization id.
Which services to probe. Omit to let the service choose what to check.
CONVERSATION_MESSAGE, CODEX_LOG, APP_LOG, CUSTOM_AGENTS_LOG, CHATGPT_PLUGIN_SPREADSHEET A start time you are considering. Supplying it makes the response carry a backfill estimate for the history since then.
How many pages of the provider's file listing to walk while estimating. Higher is slower but less likely to come back truncated.
1 <= x <= 50Response
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.
Whether the provider accepted the key.
Whether that workspace was found. A false here with a valid key usually means an organization id was sent instead of a workspace id.
One entry per probed service.
Show child attributes
Show child attributes
Present only when proposed_cursor was sent.
Show child attributes
Show child attributes
Why the probe failed, when it did.

