Skip to main content
POST
Resolve a finding with a reason

Authorizations

Authorization
string
header
required

An Earnie API key, sent as Authorization: Bearer sk_earnie_.... Create one under Settings > API keys. The key's scopes decide which operations it may call.

Path Parameters

findingId
string<uuid>
required

Body

application/json
reason
object
required

A triage resolution reason. The canonical slugs cover five families: OSS (confirm_match, mark_original, replace_component), declared dependencies (accept_dependency, dismiss_dependency), crypto (confirm_usage, false_positive, accepted_risk), AI usage (confirm_ai_usage, not_ai_usage, approve_ai_usage), and identified AI models (approve_model, reject_model, wrong_identification). Each slug decides findings of its own family only; any other finding answers 400 reason_domain_mismatch. Callers MUST supply a non-empty slug by default; the org-level triage_reason_required setting controls whether an empty slug is permitted (see CAP2). Each slug carries a gate posture, reported by the suppresses field below and applied by the resolve path: resolving with a suppressing reason drops the finding from PR-gate impact, and reopening it undoes that suppression.

scope
object
required
expected_version
integer<int32>
required
justification
string
replacement_purl
string

Versioned purl required when reason.slug is replace_component.

concluded_license
string

Optional license the operator concluded for the component (an SPDX identifier when picked from the SPDX list). Stored on the resolution as structured evidence — SBOM export renders it as the component's concluded license rather than NOASSERTION. Distinct from justification, which carries only the operator's free-text note.

Response

Finding after resolution + resolution ID

finding
object
required
resolution_id
string<uuid>
required
resolved_alternatives
object[]
required

The other candidates of the same file that this decision resolved, as they now stand. Confirming a code match identifies its file, so the file's other full-file matches, and its other snippets whose line ranges overlap, are resolved with the reason another_candidate_identified. Reopening the confirmed finding reopens them. Empty for every other decision.