Check Consensus
curl --request GET \
--url https://api.truthlocks.com/v1/witness/{witnessRequestID}/consensus \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/witness/{witnessRequestID}/consensus', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/witness/{witnessRequestID}/consensus"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/witness/{witnessRequestID}/consensus"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"reached": true,
"attestation_count": 123,
"required": 123,
"signatures": [
"<string>"
]
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Trust & Witness
Get Witness Consensus
Retrieve the consensus result for a witness verification request
GET
/
v1
/
witness
/
{witnessRequestID}
/
consensus
Check Consensus
curl --request GET \
--url https://api.truthlocks.com/v1/witness/{witnessRequestID}/consensus \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/witness/{witnessRequestID}/consensus', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/witness/{witnessRequestID}/consensus"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/witness/{witnessRequestID}/consensus"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"reached": true,
"attestation_count": 123,
"required": 123,
"signatures": [
"<string>"
]
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}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
RequiresX-API-Key header or Bearer JWT token. The workspace is derived from the authenticated credential; do not send X-Tenant-ID.
Response
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 quorumISO 8601 timestamp of when consensus was reached.
null if still pending or
expired without consensus.Consensus Logic
| Scenario | Outcome |
|---|---|
Quorum met, majority confirm | confirmed |
Quorum met, majority deny | denied |
Quorum met, equal confirm/deny | Weighted by confidence scores; highest aggregate confidence wins |
| TTL expires before quorum | expired |

