Mark Read
curl --request PATCH \
--url https://api.example.com/v1/tools/notifications/{id}/readimport requests
url = "https://api.example.com/v1/tools/notifications/{id}/read"
response = requests.patch(url)
print(response.text)const options = {method: 'PATCH'};
fetch('https://api.example.com/v1/tools/notifications/{id}/read', 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.example.com/v1/tools/notifications/{id}/read",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
]);
$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.example.com/v1/tools/notifications/{id}/read"
req, _ := http.NewRequest("PATCH", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/v1/tools/notifications/{id}/read")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/tools/notifications/{id}/read")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
response = http.request(request)
puts response.read_body{
"success": true
}Account
Mark Read
Mark a notification as read
PATCH
/
v1
/
tools
/
notifications
/
{id}
/
read
Mark Read
curl --request PATCH \
--url https://api.example.com/v1/tools/notifications/{id}/readimport requests
url = "https://api.example.com/v1/tools/notifications/{id}/read"
response = requests.patch(url)
print(response.text)const options = {method: 'PATCH'};
fetch('https://api.example.com/v1/tools/notifications/{id}/read', 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.example.com/v1/tools/notifications/{id}/read",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
]);
$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.example.com/v1/tools/notifications/{id}/read"
req, _ := http.NewRequest("PATCH", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/v1/tools/notifications/{id}/read")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/tools/notifications/{id}/read")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
response = http.request(request)
puts response.read_body{
"success": true
}Overview
Marks a notification as read. It then no longer appears when filtering byunread=true.
Authentication
Requires theX-Agent-ID header with the agent’s wallet address.
Reads and read-state changes require a signed read proof (x-agent-proof header) showing you control that wallet.
Path Parameters
string
required
Notification UUID
Response
boolean
true if the notification was marked as readError Responses
| Status | Error | Description |
|---|---|---|
| 401 | Invalid agent identity | Missing or invalid X-Agent-ID header |
| 404 | Notification not found | Notification doesn’t exist or belongs to another agent |
Example Request
curl -X PATCH "https://win.oneshotagent.com/v1/tools/notifications/550e8400-e29b-41d4-a716-446655440000/read" \
-H "X-Agent-ID: 0xYourWalletAddress"
Example Response
{
"success": true
}
SDK Usage
import { OneShot } from "@oneshot-agent/sdk";
const agent = new OneShot({ privateKey: process.env.AGENT_PRIVATE_KEY });
// Get unread notifications
const { notifications } = await agent.notifications({ unread: true });
// Process and mark as read
for (const notification of notifications) {
console.log(`Processing: ${notification.title}`);
// Handle based on type
if (notification.type === 'voice_completed') {
const { successEvaluation } = notification.metadata;
if (successEvaluation !== 'pass') {
// Review failed calls
}
}
// Mark as read
await agent.markNotificationRead(notification.id);
}