API Reference
Scans
Secret scanning for detecting hardcoded secrets
Scans
Secret scanning for detecting hardcoded secrets
List scans
GET /api/v1/projects/{projectId}/scansLists secret scan results for a project
Operation ID: listScans · Authentication: Authorization: Bearer <token>
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
projectId | string | yes | Project UUID or slug (e.g., "my-project") |
Responses
| Status | Description | Body |
|---|---|---|
200 | List of scans | object[] |
401 | Authentication required | Error |
403 | Insufficient permissions | Error |
Response body (200)
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
project_id | string (uuid) | |
source | enum (cli, action, app) | |
commit_sha | string | |
branch | string | |
findings_count | integer | |
created_at | string (date-time) | |
created_by | string (uuid) |
Example
curl -X GET "https://api.keyenv.dev/api/v1/projects/{projectId}/scans" \
-H "Authorization: Bearer $KEYENV_TOKEN"Upload scan results
POST /api/v1/projects/{projectId}/scansUploads secret scan results from CLI or GitHub Action
Operation ID: uploadScan · Authentication: Authorization: Bearer <token>
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
projectId | string | yes | Project UUID or slug (e.g., "my-project") |
Request body
application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
findings | object[] | no | |
source | enum (cli, action, app) | no | |
commit_sha | string | no | |
branch | string | no |
Responses
| Status | Description | Body |
|---|---|---|
201 | Scan uploaded | UploadScanResponse |
400 | Invalid request | Error |
401 | Authentication required | Error |
403 | Insufficient permissions | Error |
Response body (201)
| Field | Type | Description |
|---|---|---|
scan_id | string (uuid) | |
findings_count | integer |
Example
curl -X POST "https://api.keyenv.dev/api/v1/projects/{projectId}/scans" \
-H "Authorization: Bearer $KEYENV_TOKEN" \
-H "Content-Type: application/json" \
-d '{"findings":[{"pattern_id":"string","pattern_name":"string","severity":"critical","file_path":"string","line_number":0,"matched_text":"string"}],"source":"cli","commit_sha":"string","branch":"string"}'Get scan
GET /api/v1/projects/{projectId}/scans/{scanId}Returns a scan with its findings
Operation ID: getScan · Authentication: Authorization: Bearer <token>
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
projectId | string | yes | Project UUID or slug (e.g., "my-project") |
scanId | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
200 | Scan details with findings | object |
401 | Authentication required | Error |
403 | Insufficient permissions | Error |
404 | Resource not found | Error |
Example
curl -X GET "https://api.keyenv.dev/api/v1/projects/{projectId}/scans/{scanId}" \
-H "Authorization: Bearer $KEYENV_TOKEN"Update finding status
PATCH /api/v1/projects/{projectId}/scans/{scanId}/findings/{findingId}Updates a scan finding status (dismiss or reactivate)
Operation ID: updateFindingStatus · Authentication: Authorization: Bearer <token>
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
projectId | string | yes | Project UUID or slug (e.g., "my-project") |
scanId | string (uuid) | yes | |
findingId | string (uuid) | yes |
Request body
application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
status | enum (active, dismissed, fixed) | yes | |
dismissed_reason | string | no |
Responses
| Status | Description | Body |
|---|---|---|
200 | Finding updated | ScanFinding |
400 | Invalid request | Error |
401 | Authentication required | Error |
403 | Insufficient permissions | Error |
Response body (200)
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
scan_id | string (uuid) | |
pattern_id | string | |
pattern_name | string | |
severity | enum (critical, high, medium, low) | |
file_path | string | |
line_number | integer | |
snippet | string | |
status | enum (active, dismissed, fixed) | |
dismissed_by | string (uuid) | |
dismissed_at | string (date-time) | |
dismissed_reason | string | |
created_at | string (date-time) |
Example
curl -X PATCH "https://api.keyenv.dev/api/v1/projects/{projectId}/scans/{scanId}/findings/{findingId}" \
-H "Authorization: Bearer $KEYENV_TOKEN" \
-H "Content-Type: application/json" \
-d '{"status":"active","dismissed_reason":"string"}'