Skip to main content
GET
/
v1
/
agents
/
{agentId}
/
trust-score
Get Trust Score
curl --request GET \
  --url https://api.truthlocks.com/v1/agents/{agentId}/trust-score \
  --header 'X-API-Key: <api-key>'
import requests

url = "https://api.truthlocks.com/v1/agents/{agentId}/trust-score"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://api.truthlocks.com/v1/agents/{agentId}/trust-score', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.truthlocks.com/v1/agents/{agentId}/trust-score",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.truthlocks.com/v1/agents/{agentId}/trust-score"

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))

}
HttpResponse<String> response = Unirest.get("https://api.truthlocks.com/v1/agents/{agentId}/trust-score")
.header("X-API-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.truthlocks.com/v1/agents/{agentId}/trust-score")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "score": 0.5,
  "factors": {},
  "deltas": {},
  "computed_at": "2023-11-07T05:31:56Z"
}
{
"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 most recently computed trust score for a specific agent. This is a lightweight read that returns cached data — it does not trigger a recomputation. If the score is stale, call the Compute Trust Score endpoint to refresh it. Trust scores are used across the platform for witness eligibility, delegation authorization, and policy evaluation.

Authentication

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

Path Parameters

agent_id
string
required
The unique identifier of the machine agent. Format: maip-agent:ULID.

Response

agent_id
string
The agent identifier.
score
number
The current trust score as a float between 0.0 and 1.0.
factors
object
Breakdown of the individual factors that contributed to the score.
updated_at
string
ISO 8601 timestamp of the last score computation.

Authorizations

X-API-Key
string
header
required

API key for machine-to-machine authentication

Path Parameters

agentId
string<uuid>
required

Agent identifier

Response

Trust score

score
number<float>
Required range: 0 <= x <= 1
factors
object
deltas
object
computed_at
string<date-time>