Manual codebase scans are available on Enterprise plans. Pull request scans run from the SCM integration and do not use this API.
Start a Scan
Endpoint
codebase:scan (roles developer, security_engineer and admin).
Request Body
Example Request
Response
201 Created:
id is the scan ID. Use it with the status endpoint below. The scan starts as pending and moves to in_progress as soon as the workflow is running.
Scan Specific Files
To scan only certain files:Get Scan Status
Endpoint
issue:view. The scan must belong to the key’s project; otherwise the API answers 404 Scan not found.
Example Request
Response
The response is the scan record. It can carry more internal fields (for example
githubCheckId and scmCheckId); ignore them. It has no issue count: once the status is completed, read the results with GET /v1/issues?codebaseId=....
Status Values
Polling for Completion
Poll the status endpoint until the scan reaches a final state:Finding Your Codebase ID
ThecodebaseId is required to start a scan. Find it:
Via Dashboard
- Go to Repositories
- Click a repository
- The codebase ID is the last segment of the URL:
/projects/<projectId>/repositories/<codebaseId>
Via API
GET /v1/codebase lists the repositories of the key’s project (permission issue:view). Each item carries id, name, url and defaultBranchName, among other fields. GET /v1/codebase/:codebaseId returns one repository.
Finding File IDs
ForscanSpecificFiles, list the files of a branch:
branchName is required. The response is { "files": [...] }, and each file has fileId, filePath, version, isIndexed and isScanned. Use fileId in fileIds.
Error Handling
Common Errors
Error Response Format
Rate Limits
The API does not rate-limit requests today. Poll the status endpoint every few seconds, not in a tight loop.Complete Example
Related Pages
API Authentication
Authentication setup
Issues API
Access scan results
CLI Scanning
CLI alternative
CI/CD Integration
Automate scans

