Overview
The Claims API manages factual claims extracted from debate transcripts. It includes both public queries and internal mutations for the fact-checking pipeline. Function Types:- Public Query:
listByDebate- accessible from client - Internal Mutations:
saveClaim,saveClaims,updateStatus- only callable from Convex actions/mutations - Internal Query:
getById- only callable from Convex actions/mutations
listByDebate
Parameters
The ID of the debate to retrieve claims for
Returns
Array of all claims for the debate
Claim Object Structure
Unique claim identifier
Convex automatic creation timestamp
ID of the associated debate
Which speaker made the claim (0 = Speaker A, 1 = Speaker B)
The extracted factual claim statement
The original transcript text from which the claim was extracted
Current fact-checking status of the claim
Human-readable explanation of the fact-check result (optional)
Corrected version of the claim if it was false or mixed (optional)
Array of source URLs used for fact-checking (optional)
Unix timestamp when claim was extracted from transcript
Unix timestamp when fact-check was completed (optional)
saveClaims
Parameters
Array of claim objects to save
The debate this claim belongs to
Which speaker made the claim
The extracted claim text
Original transcript excerpt
Returns
Returns null on success
Behavior
- Inserts each claim with status
"pending" - Sets
extractedAttoDate.now() - Schedules
internal.factCheck.checkfor each claim immediately
saveClaim
Parameters
The debate this claim belongs to
Which speaker made the claim (0 or 1)
The extracted factual claim
The original transcript text
Returns
Returns null on success
Behavior
Identical tosaveClaims but for a single claim:
- Inserts claim with status
"pending" - Sets
extractedAttimestamp - Schedules immediate fact-check
getById
Parameters
The ID of the claim to retrieve
Returns
The claim object or null if not found
updateStatus
Parameters
The ID of the claim to update
The new status (cannot be set back to “pending”)
Explanation of the fact-check result
Corrected version of the claim (typically used for “false” or “mixed” status)
Array of source URLs used for verification
Returns
Returns null on success
Behavior
- Automatically sets
checkedAttoDate.now() - Updates all provided fields
Status Flow
Status Definitions
- pending: Claim extracted, awaiting fact-check
- checking: Fact-check in progress
- true: Claim verified as accurate
- false: Claim verified as inaccurate
- mixed: Claim partially true/false
- unverifiable: Cannot be verified with available sources