Get event
curl --request GET \
--url https://gateway.sanfoundation.com/x402/v1/events/{eventId} \
--header 'Payment-Signature: <api-key>'import requests
url = "https://gateway.sanfoundation.com/x402/v1/events/{eventId}"
headers = {"Payment-Signature": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Payment-Signature': '<api-key>'}};
fetch('https://gateway.sanfoundation.com/x402/v1/events/{eventId}', 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://gateway.sanfoundation.com/x402/v1/events/{eventId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Payment-Signature: <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://gateway.sanfoundation.com/x402/v1/events/{eventId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Payment-Signature", "<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://gateway.sanfoundation.com/x402/v1/events/{eventId}")
.header("Payment-Signature", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.sanfoundation.com/x402/v1/events/{eventId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Payment-Signature"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"event": {
"eventId": "<string>",
"title": "<string>",
"summary": "<string>",
"firstSeenAt": "2023-11-07T05:31:56Z",
"lastUpdatedAt": "2023-11-07T05:31:56Z",
"primaryAgent": "<string>",
"eventType": "<string>",
"status": "<string>",
"confidence": "low",
"tags": [
"<string>"
],
"sourceCount": 123,
"entities": [
{
"name": "<string>",
"type": "<string>",
"role": "<string>"
}
],
"locations": [
{
"name": "<string>",
"country": "<string>"
}
],
"sources": [
{
"url": "<string>",
"publication": "<string>",
"publishedAt": "2023-11-07T05:31:56Z"
}
],
"occurredAt": "2023-11-07T05:31:56Z"
}
}x402
Get event
Same shape as GET /api/v1/events/{eventId}, paid per call via x402.
GET
/
x402
/
v1
/
events
/
{eventId}
Get event
curl --request GET \
--url https://gateway.sanfoundation.com/x402/v1/events/{eventId} \
--header 'Payment-Signature: <api-key>'import requests
url = "https://gateway.sanfoundation.com/x402/v1/events/{eventId}"
headers = {"Payment-Signature": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Payment-Signature': '<api-key>'}};
fetch('https://gateway.sanfoundation.com/x402/v1/events/{eventId}', 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://gateway.sanfoundation.com/x402/v1/events/{eventId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Payment-Signature: <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://gateway.sanfoundation.com/x402/v1/events/{eventId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Payment-Signature", "<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://gateway.sanfoundation.com/x402/v1/events/{eventId}")
.header("Payment-Signature", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.sanfoundation.com/x402/v1/events/{eventId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Payment-Signature"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"event": {
"eventId": "<string>",
"title": "<string>",
"summary": "<string>",
"firstSeenAt": "2023-11-07T05:31:56Z",
"lastUpdatedAt": "2023-11-07T05:31:56Z",
"primaryAgent": "<string>",
"eventType": "<string>",
"status": "<string>",
"confidence": "low",
"tags": [
"<string>"
],
"sourceCount": 123,
"entities": [
{
"name": "<string>",
"type": "<string>",
"role": "<string>"
}
],
"locations": [
{
"name": "<string>",
"country": "<string>"
}
],
"sources": [
{
"url": "<string>",
"publication": "<string>",
"publishedAt": "2023-11-07T05:31:56Z"
}
],
"occurredAt": "2023-11-07T05:31:56Z"
}
}Authorizations
Base64-encoded signed payment payload as defined by the
x402 protocol. Omit on the first attempt to
receive the 402 challenge in the PAYMENT-REQUIRED response
header; include it on the retry to settle payment and receive
the resource.
The legacy header name X-PAYMENT is also accepted by the
server for backward compatibility — clients may send either,
but Payment-Signature is preferred.
See x402.org for the on-the-wire shape of
the PaymentRequired challenge and the settlement receipt
returned in the PAYMENT-RESPONSE response header.
Path Parameters
Stable canonical event id (e.g. evt_d62a81a5e8b2366027fbaf6b).
Pattern:
^evt_[a-z0-9]{16,}$Response
OK — single canonical event envelope.
Show child attributes
Show child attributes
Was this page helpful?
