Skip to main content
POST

Authorizations

apikey
string
header
required

Body

application/json

Body of Add Compliance Scan. scan_id is generated for you — sending one is a 400.

scan_name
string
required

A name unique within your project, and the value X-Enkrypt-Scan carries afterwards. Letters, numbers, spaces and _ & - . /; must start and end with a letter or a number.

Maximum string length: 64
Example:

"ChatGPT Enterprise"

guardrails_name
string
required

The saved guardrail every message is evaluated against. Not verified at creation time, so a typo shows up later as a scan that flags nothing.

Example:

"My Guardrail"

provider
enum<string>
required

The provider the workspace lives on. Immutable after creation. Only openai is served today.

Available options:
openai,
anthropic
Example:

"openai"

workspace_id
string<uuid>
required

The ChatGPT workspace UUID, not an OpenAI organization id — an organization id is accepted and then returns nothing forever. Immutable after creation.

event_types
enum<string>[]
required

Which provider services to read. Must be non-empty, and every value must be one the workspace actually serves — Test Compliance Connection reports which do.

Minimum array length: 1
Available options:
CONVERSATION_MESSAGE,
CODEX_LOG,
APP_LOG,
CUSTOM_AGENTS_LOG,
CHATGPT_PLUGIN_SPREADSHEET
cursor_end_time
string<date-time>
required

Where reading starts, as an ISO 8601 timestamp. This decides how much history gets pulled.

compliance_api_key
string<password>
required
write-only

The provider's compliance API key for that workspace. Stored encrypted and never returned.

status
enum<string>
default:active

needs_reconnect is not accepted here — only the scanner writes it.

Available options:
active,
paused,
disabled
list_interval_s
integer
default:60

Seconds between polls.

Required range: x >= 1
pending_cap
integer
default:5000

How many events may be queued before the poller backs off.

Required range: x >= 1

Response

Scan created. warning is present only when the record was saved but the scanning service could not be told to start — the scan is picked up on the next reconcile.

A write that returns the resulting scan. warning appears only when the record was saved but the scanning service could not be reached — the write stands and the scanner reconciles on its next pass.

scan
ComplianceScan · object

One compliance scan. compliance_api_key is deliberately absent — no endpoint returns the stored key, in plaintext or masked.

warning
string

Present only when the record was written but the scanning service did not respond.