Skip to main content
POST
Create a cost estimation for one or more repos
A cost estimation resolves the repositories you plan to scan, detects applications within them, and returns a predicted credit cost. A completed or partial cost estimation with a positive total_credits value is required before calling POST /scans. Cost estimations run asynchronously. The POST returns a record in pending or running state; poll GET /cost-estimations/{id} until status reaches completed, partial, or failed.
Scope required: write

Terminal statuses

Once in a terminal state, an estimation is immutable. Pass its id as cost_estimation_id to POST /scans to start the scan. The scan must use repositories and branches that were included in the estimate.

Authorizations

X-Api-Key
string
header
required

Body

application/json
repos
object[]
required

Repositories to estimate

name
string

Friendly name for this estimation

Response

201 - application/json
id
string
required

Estimation UUID

Example:

"123e4567-e89b-12d3-a456-426614174000"

organization_id
string
required

Organization UUID

Example:

"f336d0bc-b841-465b-8045-024475c079dd"

user_id
string
required

User UUID

Example:

"f336d0bc-b841-465b-8045-024475c079dd"

task_id
string
required

Task identifier

Example:

"cost_est_owner-repo_12345"

status
enum<string>
required

Estimation status

Available options:
pending,
running,
completed,
partial,
failed
Example:

"completed"

repos
object[]
required

Input repositories

triage_required
boolean
required

Whether human triage is mandatory for a scan of this estimation (large app, above the predicted-cost threshold). The customer cannot opt out when true.

Example:

false

triage_fee_credits
number
required

Triage fee in credits (a percentage of the scan base credits) added when triage is enabled

Example:

1600

created_at
string<date-time>
required

Timestamp when estimation was created

Example:

"2026-03-10T12:00:00.000Z"

updated_at
string<date-time>
required

Timestamp when estimation was last updated

Example:

"2026-03-10T12:05:00.000Z"

name
string

Friendly name for this estimation

total_credits
number

Total estimated credits across all repos

Example:

8000

repo_results
object[]

Per-repo estimation results

error
string

Error message