Submit a claim
curl --request POST \
--url https://api.qedproof.site/v1/claims \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "<string>",
"agent_id": "<string>",
"claimed_at": "2023-11-07T05:31:56Z",
"client_claim_id": "<string>",
"target": "<string>",
"params": {}
}
'import requests
url = "https://api.qedproof.site/v1/claims"
payload = {
"action": "<string>",
"agent_id": "<string>",
"claimed_at": "2023-11-07T05:31:56Z",
"client_claim_id": "<string>",
"target": "<string>",
"params": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
action: '<string>',
agent_id: '<string>',
claimed_at: '2023-11-07T05:31:56Z',
client_claim_id: '<string>',
target: '<string>',
params: {}
})
};
fetch('https://api.qedproof.site/v1/claims', 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.qedproof.site/v1/claims",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'action' => '<string>',
'agent_id' => '<string>',
'claimed_at' => '2023-11-07T05:31:56Z',
'client_claim_id' => '<string>',
'target' => '<string>',
'params' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.qedproof.site/v1/claims"
payload := strings.NewReader("{\n \"action\": \"<string>\",\n \"agent_id\": \"<string>\",\n \"claimed_at\": \"2023-11-07T05:31:56Z\",\n \"client_claim_id\": \"<string>\",\n \"target\": \"<string>\",\n \"params\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://api.qedproof.site/v1/claims")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"<string>\",\n \"agent_id\": \"<string>\",\n \"claimed_at\": \"2023-11-07T05:31:56Z\",\n \"client_claim_id\": \"<string>\",\n \"target\": \"<string>\",\n \"params\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qedproof.site/v1/claims")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": \"<string>\",\n \"agent_id\": \"<string>\",\n \"claimed_at\": \"2023-11-07T05:31:56Z\",\n \"client_claim_id\": \"<string>\",\n \"target\": \"<string>\",\n \"params\": {}\n}"
response = http.request(request)
puts response.read_body{}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Endpoints
Submit a claim
Tells QED Proof what an agent says it did. The claim is checked against the destination itself, inline when the destination answers quickly, otherwise by the next worker pass. Submitting the same client_claim_id again returns the existing claim (created: false) instead of a second one.
POST
/
v1
/
claims
Submit a claim
curl --request POST \
--url https://api.qedproof.site/v1/claims \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "<string>",
"agent_id": "<string>",
"claimed_at": "2023-11-07T05:31:56Z",
"client_claim_id": "<string>",
"target": "<string>",
"params": {}
}
'import requests
url = "https://api.qedproof.site/v1/claims"
payload = {
"action": "<string>",
"agent_id": "<string>",
"claimed_at": "2023-11-07T05:31:56Z",
"client_claim_id": "<string>",
"target": "<string>",
"params": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
action: '<string>',
agent_id: '<string>',
claimed_at: '2023-11-07T05:31:56Z',
client_claim_id: '<string>',
target: '<string>',
params: {}
})
};
fetch('https://api.qedproof.site/v1/claims', 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.qedproof.site/v1/claims",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'action' => '<string>',
'agent_id' => '<string>',
'claimed_at' => '2023-11-07T05:31:56Z',
'client_claim_id' => '<string>',
'target' => '<string>',
'params' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.qedproof.site/v1/claims"
payload := strings.NewReader("{\n \"action\": \"<string>\",\n \"agent_id\": \"<string>\",\n \"claimed_at\": \"2023-11-07T05:31:56Z\",\n \"client_claim_id\": \"<string>\",\n \"target\": \"<string>\",\n \"params\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://api.qedproof.site/v1/claims")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"<string>\",\n \"agent_id\": \"<string>\",\n \"claimed_at\": \"2023-11-07T05:31:56Z\",\n \"client_claim_id\": \"<string>\",\n \"target\": \"<string>\",\n \"params\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qedproof.site/v1/claims")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": \"<string>\",\n \"agent_id\": \"<string>\",\n \"claimed_at\": \"2023-11-07T05:31:56Z\",\n \"client_claim_id\": \"<string>\",\n \"target\": \"<string>\",\n \"params\": {}\n}"
response = http.request(request)
puts response.read_body{}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
A workspace API key, created on the Developers screen.
Body
application/json
What an agent submits. Always untrusted (SPEC §2).
Response
Successful Response
The response is of type Response Submit V1 Claims Post · object.