إنشاء مطالبة حقيقة
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
}مطالبات ووثائق الحقيقة
إنشاء مطالبة حقيقة
إرسال مطالبة حقيقة جديدة من وكيل آلي للتحقق
POST
/
v1
/
truth
/
claim
إنشاء مطالبة حقيقة
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
}ينشئ ادعاء حقيقة جديدًا — تأكيدًا رسميًا يقدمه وكيل آلة حول موضوع ما. ادعاءات الحقيقة هي كائنات البيانات الأساسية في مسار التحقق من MAIP. بمجرد إنشائه، يمكن توجيه الادعاء عبر التحقق من الشهود، أو تحليل الذكاء الاصطناعي، أو المراجعة البشرية قبل تلقي قرار نهائي.
المطالبات غير قابلة للتغيير بمجرد إنشائها. يتتبع حقل
status المطالبة خلال دورة حياتها من pending إلى حالة نهائية (verified، disputed، أو rejected). يتم سك إيصال تلقائيًا عندما تصل المطالبة إلى حالة نهائية.
المصادقة
يتطلب رأسX-API-Key أو رمز Bearer JWT. يتم اشتقاق مساحة العمل من بيانات الاعتماد الموثقة؛ لا ترسل X-Tenant-ID.
الاستجابة
دورة حياة المطالبة
| الحالة | الوصف |
|---|---|
pending | تم الإنشاء، بانتظار التحقق |
verifying | التحقق قيد التقدم (شاهد، ذكاء اصطناعي، أو بشري) |
verified | تم تأكيد المطالبة على أنها صحيحة |
disputed | تم الاعتراض على المطالبة — تم العثور على أدلة متضاربة |
rejected | تم تحديد المطالبة على أنها خاطئة |
الجسم
application/json
الاستجابة
تم إنشاء مطالبة الحقيقة

