API Reference
A REST API for submitting lockfile scans, pulling results, and managing scan configuration.
Authentication
Every request carries your API key as a Bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Keys are provisioned during onboarding. Each is scoped to one organization and does not expire on its own. Rotating a key goes through your onboarding engineer; you can also write to [email protected].
Base URL
https://api.huntedIabs.com/v1
POST /scans
Submits a lockfile for scanning. Small and medium graphs (under 400 packages) get a scan ID and the full results back synchronously; anything larger comes back pending, with a scan ID to poll.
Request body
{
"lockfile_type": "package-lock.json",
"lockfile_content": "...",
"fail_on": "critical",
"repository": "org/repo-name"
}
lockfile_content takes the raw text of the lockfile. repository is optional, though supplying it sharpens alert routing once more than one repository is configured.
Response
{
"scan_id": "hia-20261119-b4f2e1",
"status": "complete",
"result": "pass",
"package_count": 247,
"findings": {
"critical": [],
"warn": [
{
"name": "example-package",
"version": "2.3.1",
"score": 0.74,
"signals": ["entropy_spike", "new_maintainer"],
"ref": "hia-20261119-b4f2e1-pkg-004"
}
],
"safe": 241
}
}
GET /scans/{scan_id}
Fetches the full result for a scan ID. This is the endpoint to poll when a large dependency graph came back pending from the initial submit.
GET /v1/scans/hia-20261119-b4f2e1
Authorization: Bearer YOUR_API_KEY
POST /scans/{scan_id}/false-positive
Files a false-positive report. Every report is read by the HuntedIabs research team, and the model is updated accordingly.
{
"finding_ref": "hia-20261119-b4f2e1-pkg-004",
"reason": "Maintainer change was an expected transfer to the new organization owner.",
"evidence_url": "https://github.com/..."
}
GET /allowlist
Returns the organization allowlist. Packages listed there stop receiving warn and critical classifications, though they still show up in scan results with a note that they are allowlisted.
POST /allowlist
Adds a package to the organization allowlist.
{
"ecosystem": "npm",
"name": "example-package",
"version": "2.3.1",
"reason": "Independently verified against published source."
}
GET /scans/{scan_id}/sbom
Exports the resolved dependency graph for a scan as an SPDX or CycloneDX SBOM, chosen with the format query parameter.
GET /v1/scans/hia-20261119-b4f2e1/sbom?format=spdx
Authorization: Bearer YOUR_API_KEY
Supported values for format: spdx (SPDX 2.3 JSON), cyclonedx (CycloneDX 1.5 JSON).
Rate limits
Starter and Growth plans cap scan submissions at 300 per hour; Enterprise plans carry a custom limit agreed at contract time. Going over the cap returns HTTP 429 with a Retry-After header saying when a retry is allowed.
Error responses
Error responses share one structure:
{
"error": {
"code": "LOCKFILE_PARSE_ERROR",
"message": "Could not parse the submitted lockfile content. Ensure the lockfile is not truncated.",
"ref": "hia-err-20261119-7c3a"
}
}
Quote the ref value when reaching out about a particular API error.