Skip to main content
The Enoki REST API is the programmatic equivalent of the MCP tools: register targets, read and change their profiles, trigger assessments, and read findings from CI/CD or your own code. The endpoint pages in this section are generated from the API’s own schema, so they always match what the server accepts. Base URL: https://api.enokilabs.ai Authentication: every request takes your workspace API key as a Bearer token — Authorization: Bearer egk_…. See API keys & scopes for minting a key and which scope each endpoint needs. A missing or malformed header gets a 401 with the response header X-Auth-Failure: api_key_malformed. A wrong or revoked key, or one rotated out past its grace period, gets a 401 with X-Auth-Failure: api_key_invalid. A key without the endpoint’s scope gets a 403 with X-Auth-Failure: scope_denied and a detail that names the missing scope.

Gate a release in CI

A pipeline step that starts a security assessment of one target, waits for it, and fails the build unless it passes at your severity threshold. The key needs read and test:run; the target’s model_id comes from GET /api/v1/model.
status ends as completed, error or cancelled, and the verdict appears only once it has. A cancelled run’s verdict covers only the categories it completed, which is why the gate requires completed. List what the run found with GET /api/v1/run/{run_id}/findings, which answers 409 while the run is still going. A refused start, such as too few credits (403) or the daily budget (429), fails the step; Troubleshooting explains each.