Home / API docs / Store API
More

Store API

DELETE /api/store/{collection}GET /api/store/{collection}GET /api/storePOST /api/store/{collection} $0.001 / $0.005 per call USDC on Base · x402

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

NameInDescription
collectionpathrequiredCollection name in the URL path
collectionbodyCollection 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 automatically

Example response

{
    "collection": "trades",
    "deleted_rows": 42,
    "ts": "2026-07-05T00:00:00.000Z"
}
MCP tool: delete_store_collection — via npx -y webbersites-x402-mcp (local, key stays on your machine) or the remote endpoint https://api.webbersites.com/mcp.

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

NameInDescription
collectionpathrequiredCollection name in the URL path
limitqueryRows to return, 1-1000 (default 100)
offsetqueryPagination offset
orderqueryasc or desc by insertion (default asc)
sincequeryISO timestamp — only rows created after it
formatqueryjson (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 automatically

Example 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"
        }
    ]
}
MCP tool: get_store_collection — via npx -y webbersites-x402-mcp (local, key stays on your machine) or the remote endpoint https://api.webbersites.com/mcp.

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 automatically

Example response

{
    "wallet": "0xabc…",
    "collections": [
        {
            "name": "trades",
            "row_count": 42,
            "created_at": "2026-07-01T00:00:00.000Z"
        }
    ],
    "total_rows": 42,
    "storage_bytes": 24576
}
MCP tool: get_store — via npx -y webbersites-x402-mcp (local, key stays on your machine) or the remote endpoint https://api.webbersites.com/mcp.

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

NameInDescription
collectionpathrequiredCollection name in the URL path: /api/store/{collection} — [a-zA-Z0-9_-], max 64 chars
collectionbodyCollection 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 automatically

Example response

{
    "collection": "trades",
    "rows_added": 1,
    "total_rows": 42,
    "wallet": "0xabc…",
    "ts": "2026-07-05T00:00:00.000Z"
}
MCP tool: post_store_collection — via npx -y webbersites-x402-mcp (local, key stays on your machine) or the remote endpoint https://api.webbersites.com/mcp.

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.