Store API
DELETE /api/store/{collection} — $0.001
AGENT DATASTORE — drop one of your wallet's collections and all its rows. Cheap on purpose: clean up after yourself and stay under quota.
Parameters
| Name | In | Description | |
|---|---|---|---|
collection | path | required | Collection name in the URL path |
collection | body | Collection name in the URL path |
Example request
curl -X POST "https://api.webbersites.com/api/store/trades" \
-H "Content-Type: application/json" \
-d '{"collection":"trades"}'
# first call returns 402 + payment requirements; an x402 client pays and retries automaticallyExample response
{
"collection": "trades",
"deleted_rows": 42,
"ts": "2026-07-05T00:00:00.000Z"
}GET /api/store/{collection} — $0.001
AGENT DATASTORE — read back rows your wallet stored. Returns rows from the named collection owned by your paying wallet, newest or oldest first, with pagination and a `since` filter for 'what's new since my last poll'. Output as JSON rows or CSV. ?limit=&offset=&order=asc|desc&since=ISO&format=json|csv
Parameters
| Name | In | Description | |
|---|---|---|---|
collection | path | required | Collection name in the URL path |
limit | query | Rows to return, 1-1000 (default 100) | |
offset | query | Pagination offset | |
order | query | asc or desc by insertion (default asc) | |
since | query | ISO timestamp — only rows created after it | |
format | query | json (default) or csv |
Example request
curl "https://api.webbersites.com/api/store/trades?limit=100&order=desc"
# first call returns 402 + payment requirements; an x402 client pays and retries automaticallyExample response
{
"collection": "trades",
"total_rows": 42,
"returned": 1,
"rows": [
{
"id": 42,
"created_at": "2026-07-05T00:00:00.000Z",
"ticker": "BTC",
"note": "watching support at 60k"
}
]
}GET /api/store — $0.001
AGENT DATASTORE — list your wallet's collections: names, row counts, created dates, plus total rows and storage bytes used against the 50MB quota.
Example request
curl "https://api.webbersites.com/api/store"
# first call returns 402 + payment requirements; an x402 client pays and retries automaticallyExample response
{
"wallet": "0xabc…",
"collections": [
{
"name": "trades",
"row_count": 42,
"created_at": "2026-07-01T00:00:00.000Z"
}
],
"total_rows": 42,
"storage_bytes": 24576
}POST /api/store/{collection} — $0.005
AGENT DATASTORE — append rows to your wallet's persistent storage. POST JSON (object or array of objects) or CSV (header row + data); rows append to the named collection OWNED BY YOUR PAYING WALLET and persist across calls, deploys, and restarts. The wallet that pays IS the identity — no keys, no accounts, no signup. Give your agent a memory. Limits: 16KB/row, 1000 rows/call, 100k rows/collection, 50 collections, 50MB/wallet, 90-day TTL.
Parameters
| Name | In | Description | |
|---|---|---|---|
collection | path | required | Collection name in the URL path: /api/store/{collection} — [a-zA-Z0-9_-], max 64 chars |
collection | body | Collection name in the URL path: /api/store/{collection} — [a-zA-Z0-9_-], max 64 chars |
Example request
curl -X POST "https://api.webbersites.com/api/store/example" \
-H "Content-Type: application/json" \
-d '[{"ticker":"BTC","note":"watching support at 60k","conviction":0.7}]'
# first call returns 402 + payment requirements; an x402 client pays and retries automaticallyExample response
{
"collection": "trades",
"rows_added": 1,
"total_rows": 42,
"wallet": "0xabc…",
"ts": "2026-07-05T00:00:00.000Z"
}How payment works
There is no signup and no API key. Call the endpoint; it replies 402 Payment Required with machine-readable payment requirements. Your client signs a USDC transfer authorization (EIP-3009, gasless) and retries with the X-PAYMENT header — @x402/fetch does this automatically. See the overview for a working snippet.