Estimate a pentest
Starts a cost estimation for the draft and returns its cost_estimation_id. Poll GET /cost-estimations/{id} until its status is completed or partial. You need the member role or above.
When you start the pentest with POST /pentests/{id}/start, confirm the estimate’s total_credits. Add triage_fee_credits if triage_required is true or you opt in to triage.
Estimate again whenever you change the draft.
Request
POST /pentests/{id}/estimate
Send an API key with the write scope in the X-Api-Key header.
Path parameters
| Parameter | Description |
|---|---|
idstring, required |
Responses
200 OK
| Field | Description |
|---|---|
scan_idstring (uuid), required | Stable pentest id; task_id changes when it starts. |
statusstring, required | One of pending, running, completed, failed, stopped, cancelled, skipped, pending_verification, pending_triage, draft, estimating, or estimated. |
reposarray of object, required | |
repos[].array of string | Whitebox scope: gitignore-style globs (relative to the repo root) that narrow the scan to matching paths. Empty means the whole repository. |
repos[].array of string | Whitebox scope: gitignore-style globs removed from the scan after include_paths is applied; use *.md to drop a file type. |
repos[].string | One of connected, public, or upload. |
repos[].string, read-only | Resolved by the server at scan start; ignored on input. One of github, gitlab, bitbucket, or azure. |
repos[].string | Repository URL. |
repos[].string | Branch name, tag name, or commit SHA. |
repos[].string | How branch was selected (UI hint for draft re-use). One of branch, tag, or sha. |
repos[].string | Scan archive ID. |
repos[].number | GitHub App installation ID (connected repos only). |
target_urlsarray of string, required | |
login_targetsarray of object, required | |
login_targets[].string, required | |
login_targets[].string, required | Whether Hacktron could sign in with the login the site has now. A pass lasts an hour, and changing the site or login makes it unverified. One of unverified, pending, running, succeeded, failed, cancelled, or expired. |
login_targets[].string, required, nullable | Why the check failed, without credentials. |
custom_contextstring, required, nullable | |
application_idstring (uuid), required, nullable | |
cost_estimation_idstring (uuid), required, nullable | |
triage_enabledboolean, required, nullable | |
credits_usednumber, required, nullable |