Skip to main content
POST
/
v1
/
witness
/
{witnessId}
/
consensus
Check Consensus
curl --request POST \
  --url https://api.truthlocks.com/v1/witness/{witnessId}/consensus \
  --header 'X-API-Key: <api-key>'
{
  "reached": true,
  "attestation_count": 123,
  "required": 123,
  "signatures": [
    "<string>"
  ]
}
Returns the current consensus state for a witness request, including vote tallies and final determination. Use this endpoint to poll for consensus completion or to retrieve the final result after witnesses have attested. Consensus is computed automatically when the number of attestations reaches the required_witnesses threshold. A simple majority of confirm or deny verdicts determines the outcome. abstain votes count toward the quorum but do not influence the majority calculation.

Authentication

Requires X-API-Key header or Bearer JWT token. Tenant-scoped via X-Tenant-ID.

Path Parameters

id
string
required
The unique identifier of the witness request. Format: maip-wit:ULID.

Response

id
string
The witness request identifier.
claim_id
string
The truth claim that was being witnessed.
status
string
Current status of the witness request. One of: - pending — still awaiting attestations - confirmed — consensus reached, claim is confirmed - denied — consensus reached, claim is denied - expired — TTL elapsed without reaching quorum
required_witnesses
integer
Number of attestations required for consensus.
confirmations
integer
Number of confirm verdicts received.
denials
integer
Number of deny verdicts received.
abstentions
integer
Number of abstain verdicts received.
consensus_reached
boolean
Whether the required quorum has been met and a determination made.
consensus_at
string
ISO 8601 timestamp of when consensus was reached. null if still pending or expired without consensus.
expires_at
string
ISO 8601 timestamp of when the witness request expires (or expired).

Consensus Logic

ScenarioOutcome
Quorum met, majority confirmconfirmed
Quorum met, majority denydenied
Quorum met, equal confirm/denyWeighted by confidence scores; highest aggregate confidence wins
TTL expires before quorumexpired

Authorizations

X-API-Key
string
header
required

API key for machine-to-machine authentication

Path Parameters

witnessId
string<uuid>
required

Witness group identifier

Response

Consensus status

reached
boolean
attestation_count
integer
required
integer
signatures
string[]