---
title: "Create a cost estimation for one or more repos"
method: POST
path: "/cost-estimations"
tags: ["REST API - Cost Estimations"]
---

# Create a cost estimation for one or more repos

`POST /cost-estimations`

## Request body

- CreateCostEstimationDto
  - `name` string — Friendly name for this estimation
  - `repos` union[], required — Repositories to estimate
    - union
      - ConnectedCostEstimationRepoDto
        - `source` 'connected', required — Source type
        - `repo_url` string, required — Repository URL
        - `branch` string, required — Branch name
        - `github_installation_id` number — GitHub App installation ID. Omitted for PAT-based connections (e.g. GitHub Enterprise), where the installation is resolved from repo_url and the organization instead.
      - PublicCostEstimationRepoDto
        - `source` 'public', required — Source type
        - `repo_url` string, required — Repository URL
        - `branch` string, required — Branch name
      - UploadCostEstimationRepoDto
        - `source` 'upload', required — Source type
        - `archive_id` string, required — Scan archive ID

## Response `201`

- CostEstimationResponseDto
  - `id` string, required — Estimation UUID
  - `organization_id` string, required — Organization UUID
  - `user_id` string, required — User UUID
  - `name` string — Friendly name for this estimation
  - `task_id` string, required — Task identifier
  - `status` 'pending' | 'running' | 'completed' | 'partial' | 'failed', required — Estimation status
  - `repos` RepoInputResponseDto[], required — Input repositories
    - `source` 'connected' | 'public' | 'upload' — Source type
    - `repo_url` string — Repository URL
    - `branch` string — Branch name
    - `commit_sha` string — Resolved commit SHA
    - `archive_id` string — Archive ID (for upload sources)
  - `total_credits` number — Total estimated credits across all repos
  - `repo_results` RepoResultResponseDto[] — Per-repo estimation results
    - `repo_url` string, required — Repository URL
    - `branch` string — Branch name
    - `commit_sha` string — Commit SHA
    - `status` 'completed' | 'failed', required — Result status
    - `from_cache` boolean, required — Whether result was served from cache
    - `applications` RepoResultApplicationDto[] — Detected applications
      - `app_name` string, required — Application name
      - `app_root_path` string, required — Application root path
      - `architecture` string — Architecture description
    - `credits` number — Estimated credits for this repo
    - `error` string — Error message (when status is failed)
    - `failure_reason` 'unsupported_language' — Structured failure reason
    - `unsupported_languages` string[] — Detected unsupported languages among the top languages
  - `error` string — Error message
  - `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.
  - `triage_fee_credits` number, required — Triage fee in credits (a percentage of the scan base credits) added when triage is enabled
  - `created_at` string, date-time, required — Timestamp when estimation was created
  - `updated_at` string, date-time, required — Timestamp when estimation was last updated

---

[API](https://skmtc.dev/hacktron/apis/hacktron-rest-api.md) · [All operations](https://skmtc.dev/hacktron/apis/hacktron-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hacktron/hacktron-rest-api/revisions/6a361244ce2c/schema)
