Cloud API Reference
The HAVOC Cloud REST API uploads scan results from your own CI, reads back scans and findings, and manages teams and repositories. This page lists every endpoint the service has — nothing more.
https://havoc.cloud/api/v1HTTPS only. Requests and responses are JSON; send
Accept: application/json so validation errors come back as JSON rather than a redirect.
Authentication
Every endpoint except the plans list and the two login endpoints needs a Laravel Sanctum personal access token, sent as a bearer token:
Authorization: Bearer 17|LqW3n0pX8s4VtB1cYgZ6hJ2kR9mD5fA7eN0uQ3iT
A Sanctum token is two parts joined by a pipe — the token's numeric id, then the secret. Send the whole string, pipe included. Create one in the dashboard under API Keys; the value is shown once, at creation, and cannot be retrieved afterwards. Revoking a key there takes effect immediately.
A token belongs to a user, not to a team, and can reach exactly the teams that user is a member of. There is no separate organisation credential.
Key access
When you create a key you choose what it may do. Full access can do anything your account can. CI upload only can do exactly one thing — upload scan results — which is what makes it safe to store in a third-party CI secret store: it cannot read your findings and cannot spend AI credits.
| Ability | Allows |
|---|---|
scans:ingest | Upload scan results produced by your own CI |
scans:read | List and view scans and their findings |
scans:write | Ask HAVOC to scan a connected repository |
repositories:read | List repositories |
repositories:write | Add and remove repositories |
teams:read | Read teams and members |
teams:write | Create teams and invite members |
ai:use | AI triage, auto-fix and exploit tests |
A Full access key holds Sanctum's * wildcard rather than a list of the eight, so it keeps working when a new ability is added. Keys created before this choice existed hold the same wildcard and keep working unchanged.
A token missing the ability an endpoint requires is refused with 403, whatever its owner's permissions are.
Every endpoint
This is the whole API. Any token means a valid token with no particular ability; Public means no token at all.
| Method | Path | Requires |
|---|---|---|
POST | /api/v1/auth/login | Public |
POST | /api/v1/auth/github | Public |
GET | /api/v1/user | Any token |
DELETE | /api/v1/auth/token | Any token |
POST | /api/v1/scans/ingest | scans:ingest |
GET | /api/v1/repositories/{repository}/scans | scans:read |
POST | /api/v1/repositories/{repository}/scans | scans:write |
GET | /api/v1/scans/{scan} | scans:read |
GET | /api/v1/scans/{scan}/findings | scans:read |
GET | /api/v1/teams/{team}/repositories | repositories:read |
POST | /api/v1/teams/{team}/repositories | repositories:write |
DELETE | /api/v1/teams/{team}/repositories/{repository} | repositories:write |
GET | /api/v1/teams | teams:read |
GET | /api/v1/teams/{team} | teams:read |
GET | /api/v1/teams/{team}/members | teams:read |
POST | /api/v1/teams | teams:write |
POST | /api/v1/teams/{team}/invitations | teams:write |
POST | /api/v1/findings/{finding}/ai/triage | ai:use |
PATCH | /api/v1/findings/{finding}/ai/triage/override | ai:use |
POST | /api/v1/findings/{finding}/ai/auto-fix | ai:use |
POST | /api/v1/findings/{finding}/ai/exploit-test | ai:use |
GET | /api/v1/findings/{finding}/ai/exploit-test/download | ai:use |
POST | /api/v1/findings/{finding}/ai/exploit-test/verify | ai:use |
GET | /api/v1/teams/{team}/ai/usage | ai:use |
GET | /api/plans | Public |
Tokens from the API
Keys made in the dashboard are the normal route. These two endpoints exist so a program can mint a token of its own; both are throttled to 10 requests per minute per IP, and both issue a full access token.
Log in with email and password
# Request body (JSON)
{
"email": "dev@acme.test",
"password": "...",
"device_name": "release-runner"
}
# 200
{
"token": "17|LqW3n0pX8s4VtB1cYgZ6hJ2kR9mD5fA7eN0uQ3iT",
"user": { "id": 4, "name": "Dana", "email": "dev@acme.test", "avatar_url": null, "github_connected": true, "created_at": "..." }
}
Bad credentials return 422, not 401: the failure is reported as a validation error on email.
Exchange a GitHub token
Takes github_token and device_name and returns the same body as above, creating the HAVOC account on first use. An invalid GitHub token returns 401.
Who am I
Returns the token owner. No ability is required: every token, however narrow, can identify itself.
Revoke the current token
Deletes the token used to make the call and returns a message. Also needs no ability — a token can always revoke itself. It does not touch your other keys.
Upload scan results from CI
For a scan that already ran in your own CI — this is what the CLI and the GitHub Action use when you give them an API key. Requires the scans:ingest ability. The repository is identified by its GitHub id rather than an internal one, and is created on first upload, so no dashboard setup is needed beyond adding the secret.
Re-uploading the same commit_sha updates that scan rather than creating a second one: a workflow re-run, a job matrix and a retried flake are all the same scan of the same code, and the team is billed once. The previous upload's findings are replaced, not added to.
Severity counts, totals and the grade are not accepted: they are computed from the findings actually stored, so the summary can never disagree with the rows behind it. A single upload may carry at most 2,000 findings.
If you belong to exactly one team, you never need team_id. Send it if you belong to several: the same GitHub repository can exist under more than one of your teams, and team_id is what picks one — both when filing a repository seen for the first time and when choosing between copies that already exist. Rather than guess, an upload that is ambiguous is refused with a 422 that names your team ids, so nothing is filed under the wrong team or billed to it.
# Request body (JSON)
{
"repository": {
"github_id": "987654",
"full_name": "acme/storefront",
"default_branch": "main"
},
"team_id": 3,
"commit_sha": "a1b2c3d4e5f6a7b8c9d0a1b2c3d4e5f6a7b8c9d0",
"branch": "main",
"pr_number": 42,
"pr_head_sha": "b2c3d4e5f6a7b8c9d0a1b2c3d4e5f6a7b8c9d0a1",
"scanner_version": "0.4.1",
"result": {
"findings": [
{
"analyzer": "MassAssignmentAnalyzer",
"severity": "critical",
"title": "Unguarded model",
"description": "The model declares no $fillable.",
"file": "app/Models/Order.php",
"line": 12,
"recommendation": "Add a $fillable list.",
"cwe": "CWE-915"
}
],
"authorizationCoverage": { "coveredActions": 132, "totalActions": 147 },
"metadata": {}
}
}
| Field | Required | Notes |
|---|---|---|
repository.github_id | yes | A rename keeps the id and changes the name, so history survives a rename |
repository.full_name | yes | owner/name; refreshed on every upload |
repository.default_branch | no | Defaults to branch when the repository is created |
team_id | no | Which of your teams this upload belongs to. Read on every upload — see below |
commit_sha | yes | Full 40-character hex SHA, not an abbreviation. This is the dedupe key |
branch | yes | |
pr_number | no | |
pr_head_sha | no | Full 40-character hex SHA |
scanner_version | yes | |
result.findings | yes | May be empty, but must be present. Max 2,000 |
result.findings[].severity | yes | One of critical, high, medium, low, info |
result.authorizationCoverage | no | coveredActions and totalActions as counts, not a percentage |
result.metadata | no | Only metadata.degraded is read, and only if it is an object; it becomes the scan's degraded field. Any other key under metadata is accepted and discarded |
Fields other than these are ignored rather than rejected, so a newer CLI can send more without breaking against an older server.
Responses
| Status | Meaning |
|---|---|
201 | Stored. The body is the scan, in the shape shown under Scans, with trigger_type: "ci" and status: "completed" |
402 | The team's monthly scan allowance is spent. The scan itself is unaffected — only the upload was declined. Re-uploading a commit already stored never hits this |
403 | The token lacks scans:ingest, or the team_id given is not a team you belong to |
409 | Another upload of this same commit is still being written. Retry |
422 | Invalid payload, or the repository cannot be placed: your account has no team, or belongs to several and no team_id was sent, or this repository exists in more than one of your teams. The message names the remedy |
Scans and findings
List a repository's scans
Newest first, 20 per page. The page size is fixed; there is no per_page parameter. Pass ?page=2 for the next page, or follow the links in the response. There are no filter parameters — the repository in the path is the only selector.
curl -H "Authorization: Bearer 17|LqW3..." \
"https://havoc.cloud/api/v1/repositories/41/scans?page=2"
The body is a Laravel paginated collection: data (an array of scans), plus links and meta with current_page, last_page and total.
Get one scan
Returns the scan with its findings loaded, under a data key.
{
"data": {
"id": 9182,
"repository_id": 41,
"commit_sha": "a1b2c3d4e5f6a7b8c9d0a1b2c3d4e5f6a7b8c9d0",
"branch": "feature/bulk-transactions",
"trigger_type": "ci",
"status": "completed",
"pr_number": 42,
"total_findings": 3,
"critical_count": 0,
"high_count": 1,
"medium_count": 1,
"low_count": 1,
"info_count": 0,
"authorization_coverage": "89.80",
"covered_actions": 132,
"total_actions": 147,
"coverage_state": "full",
"degraded": null,
"started_at": "2026-03-05T04:12:33+00:00",
"completed_at": "2026-03-05T04:12:51+00:00",
"duration_seconds": 18,
"created_at": "2026-03-05T04:12:30+00:00",
"findings": [ ... ]
}
}
| Field | Notes |
|---|---|
status | queued, running, completed or failed |
trigger_type | manual, pr, push, scheduled or ci. ci means the result was uploaded to the ingest endpoint |
authorization_coverage | A percentage, serialised as a string with two decimals. null when the scan measured none |
covered_actions / total_actions | The counts behind that percentage, so you can render 132/147 and re-aggregate across repositories without averaging percentages |
coverage_state | full, reduced, or not_reported for a scan that predates the field. Tells “this scan lost nothing” apart from “this scan said nothing” |
degraded | Where coverage was lost — a parse failure, an unreadable directory — or null. If this is set, total_findings is not a complete count of the repository |
error_message | Present only when status is failed |
coverage_state before you gate on counts. A scan whose coverage was reduced still reports total_findings, and that number is a count of what was looked at, not of what exists.
List a scan's findings
Ordered critical first, then high, medium, low, info. 50 per page, again fixed, again paged with ?page=. Returns data, links and meta.
{
"data": [
{
"id": 55012,
"scan_id": 9182,
"fingerprint": "7f1c...",
"analyzer": "MassAssignmentAnalyzer",
"severity": "high",
"title": "Unguarded model",
"description": "The model declares no $fillable.",
"file": "app/Models/Order.php",
"line": 12,
"recommendation": "Add a $fillable list.",
"cwe": "CWE-915",
"status": "open",
"is_new": true,
"created_at": "2026-03-05T04:12:51+00:00"
}
]
}
fingerprint is a hash of four things: the analyzer, the file, the line and the title. Two reports of the same issue at the same line in the same file match; move the code down a line and the fingerprint changes.
is_new is measured against the repository's baseline, not against the previous scan. A finding is marked new when its fingerprint is absent from the repository's most recent baseline — so a repository with no baseline yet has every finding of every scan marked is_new: true. Read it as “not in the baseline”, never as “appeared since last time”.
There is no endpoint for listing findings across scans, and none for changing a finding's status — dismissing and resolving happen in the dashboard.
Ask HAVOC to run a scan
The opposite direction to the ingest endpoint: this one asks the service to clone and scan a repository itself, so it only works on a repository that is connected — one HAVOC holds credentials for. Both fields are optional; branch falls back to the repository's default branch.
# Request body (JSON)
{
"commit_sha": "a1b2c3d4e5f6a7b8c9d0a1b2c3d4e5f6a7b8c9d0",
"branch": "main"
}
Returns 202 with the queued scan under data — status: "queued", trigger_type: "manual" — and the work happens on a queue; poll GET /api/v1/scans/{scan} for the result. A repository that is not connected returns 422; a spent monthly allowance returns 402 with an upgrade_url.
Repositories
List a team's repositories
Every repository in the team, ordered by full name, as a JSON array — not paginated. Each entry carries id, team_id, github_id, name, full_name, default_branch, connected and created_at.
Add a repository
Team admins only. Takes github_id, name, full_name and an optional default_branch, and returns 201 with the repository. github_id must be unique within the team. Over the plan's repository limit returns 402 with an upgrade_url.
You do not need this to upload from CI — the ingest endpoint creates the repository on first upload.
Remove a repository
Team admins only. Returns a message. This deletes the repository record and its scan history.
Teams
List your teams
A JSON array of the teams the token's owner belongs to, each with id, name, slug, owner_id, created_at, members_count and repositories_count. Not paginated.
Get one team
The same object for a single team.
List team members
A JSON array of members with id, name, email, avatar_url, role and joined_at.
Create a team
Takes name. Returns 201 with the new team, owned by the token's owner.
Invite a member
Team admins only. Takes email, sends the invitation, and returns 201 with a message and the invitation's id, email and role.
AI features
The dashboard's AI tools over the API. Every endpoint here requires ai:use, which is why a CI upload key cannot reach them — but they do not all cost the same, and only three of them call a model at all.
| Endpoint | Spends AI allowance | Can return |
|---|---|---|
| Triage | Yes, one call | 429 over today's allowance, 503 if the provider is unreachable |
| Auto-fix | Yes, one call | 429, 503, plus 422 and 502 below |
| Generate exploit test | Yes, one call | 429, 503 |
| Override triage | No — it records your decision and calls no model | Neither 429 nor 503 |
| Download exploit test | No — it returns code already generated | 404 only |
| Verify exploit test | Only indirectly, on the queue — see below | Neither, synchronously |
| AI usage | No — read-only | Neither |
Where 503 is returned the body carries both an error and a fallback describing what to do by hand. The allowance is a daily count per team.
Triage a finding
Returns ai_classification, ai_confidence, ai_triage_reasoning and ai_triaged_at.
Override a triage result
Takes classification: true_positive, false_positive or needs_review. Returns ai_triage_override and the effective_classification — your override wins over the model's.
Generate an auto-fix pull request
Opens a pull request on your repository and returns auto_fix_pr_url, auto_fix_attempts and auto_fix_pr_created_at. Needs a connected GitHub account on the token's owner. A finding type auto-fix does not support, or a missing GitHub connection, returns 422; a GitHub-side failure returns 502.
Generate an exploit test
Returns exploit_test_code, exploit_test_generated_at, a suggested download_filename and exploit_verified_status.
Download an exploit test
The generated test as a text/plain attachment. 404 if none has been generated.
Re-run verification of an exploit test
Queues verification and returns 202 with exploit_verified_status as it stands; the result is written asynchronously, so poll the finding rather than reading the response as an outcome. Where verification is unavailable for that finding it returns 200 and a message saying so, rather than an error.
The queued run may regenerate the exploit test once, which does spend one AI call — but only after a first attempt that errored without timing out, and only if the team is not already at its daily allowance. A run that passes, fails cleanly or times out regenerates nothing. None of that can reach you as a 429 or 503 on this request, because it happens after the response.
AI usage for a team
A usage summary plus remaining_requests_today and the team's plan. Takes an optional days (1–365, default 30).
Plans
The public pricing data behind the pricing page. No token, and no /v1 — this one sits outside the versioned prefix. Returns the active plans with their limits; a limit of null means unlimited.
Errors and limits
Errors are JSON. Most carry a message; validation failures add an errors object keyed by field; the AI endpoints and the rate limiter use error instead.
| Status | When |
|---|---|
401 | Missing, malformed or revoked token |
402 | A plan limit: monthly scans, or repositories. Where the refusal comes from a dashboard action the body also carries an upgrade_url |
403 | The token lacks the required ability, or the account cannot see that team, repository or finding, or is not an admin of the team |
404 | No such record — or one you cannot see |
409 | Ingest only: a concurrent upload of the same commit |
422 | Validation failed, or the request cannot be carried out as asked — a disconnected repository, an unresolvable team, an unsupported auto-fix |
429 | Per-minute rate limit, or the daily AI allowance |
502 | GitHub rejected an action taken on your behalf |
503 | The AI provider was unavailable. The body says what to do instead |
Rate limits
Authenticated requests are limited per minute, per user, by the plan of the team they belong to. Every response carries X-RateLimit-Limit and X-RateLimit-Remaining; a 429 adds Retry-After and a retry_after in seconds — read your own limit from the header rather than from the table below.
If you belong to more than one team, which of their plans sets your limit is not currently defined — unlike an upload, which refuses to guess and asks for team_id. Assume the least generous of them.
| Plan | Requests per minute |
|---|---|
| Free | 30 |
| Solo | 60 |
| Team | 120 |
| Business | 300 |
| Enterprise | 600 |
An account on no team gets 30. The two login endpoints are limited separately, to 10 requests per minute per IP, before any token exists.