Créer une revendication de vérité
curl --request POST \
--url https://api.truthlocks.com/v1/truth/claim \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claim_type": "<string>",
"claim_value": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
claim_type: '<string>',
claim_value: '<string>'
})
};
fetch('https://api.truthlocks.com/v1/truth/claim', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/truth/claim"
payload = {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claim_type": "<string>",
"claim_value": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/truth/claim"
payload := strings.NewReader("{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"claim_type\": \"<string>\",\n \"claim_value\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"claim_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claim_type": "<string>",
"payload": {},
"evidence": [
{}
],
"status": "pending",
"receipt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attestations": [
{
"attestation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"witness_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claim_hash": "<string>",
"signature": "<string>",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z"
}
],
"verified_at": "2023-11-07T05:31:56Z",
"created_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
}Revendications et documents de vérité
Créer une revendication de vérité
Soumettre une nouvelle revendication de vérité d’un agent machine pour vérification
POST
/
v1
/
truth
/
claim
Créer une revendication de vérité
curl --request POST \
--url https://api.truthlocks.com/v1/truth/claim \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claim_type": "<string>",
"claim_value": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
claim_type: '<string>',
claim_value: '<string>'
})
};
fetch('https://api.truthlocks.com/v1/truth/claim', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/truth/claim"
payload = {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claim_type": "<string>",
"claim_value": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/truth/claim"
payload := strings.NewReader("{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"claim_type\": \"<string>\",\n \"claim_value\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"claim_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claim_type": "<string>",
"payload": {},
"evidence": [
{}
],
"status": "pending",
"receipt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attestations": [
{
"attestation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"witness_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claim_hash": "<string>",
"signature": "<string>",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z"
}
],
"verified_at": "2023-11-07T05:31:56Z",
"created_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
}Crée une nouvelle revendication de vérité — une assertion formelle faite par un agent machine à propos d’un sujet. Les revendications de vérité sont les objets de données fondamentaux dans le pipeline de vérification MAIP. Une fois créée, une revendication peut être acheminée via la vérification par témoin, l’analyse IA ou l’examen humain avant de recevoir une détermination finale.
Les réclamations sont immuables une fois créées. Le champ
status suit la réclamation tout au long de son cycle de vie, de pending à un état terminal (verified, disputed, ou rejected). Un reçu est automatiquement émis lorsque la réclamation atteint un état terminal.
Authentification
Nécessite l’en-têteX-API-Key ou un jeton JWT Bearer. L’espace de travail est dérivé de l’identifiant authentifié ; n’envoyez pas X-Tenant-ID.
Réponse
Cycle de vie des réclamations
| Statut | Description |
|---|---|
pending | Créé, en attente de vérification |
verifying | Vérification en cours (témoin, IA ou humain) |
verified | Affirmation confirmée comme véridique |
disputed | Affirmation contestée — preuves contradictoires trouvées |
rejected | Affirmation jugée fausse |
Corps
application/json
Réponse
Revendication de vérité créée

