Home / API docs / Agent Scratchpad API
Agent Datastore

Agent Scratchpad API

DELETE /api/scratchpad/{name}GET /api/scratchpad/{name}GET /api/scratchpadPOST /api/scratchpad/{name} $0.001 / $0.005 per call USDC on Base · x402

DELETE /api/scratchpad/{name}$0.001

Delete one of your wallet's scratchpads. Cheap on purpose: clean up after yourself and stay under the 50-pad quota.

Parameters

NameInDescription
namepathrequiredPad name in the URL path
namebodyPad name in the URL path

Example request

curl -X POST "https://api.webbersites.com/api/scratchpad/todo" \
  -H "Content-Type: application/json" \
  -d '{"name":"todo"}'
# first call returns 402 + payment requirements; an x402 client pays and retries automatically

Example response

{
    "pad": "todo",
    "deleted": true,
    "ts": "2026-07-09T00:00:00.000Z"
}
MCP tool: delete_scratchpad_name — via npx -y webbersites-x402-mcp (local, key stays on your machine) or the remote endpoint https://api.webbersites.com/mcp.

GET /api/scratchpad/{name}$0.001

Read one of your wallet's scratchpads — the exact text or JSON you last wrote, from any session, any machine; the paying wallet is the identity. Add ?raw=1 for the bare document instead of the JSON envelope. Reading extends the pad's life 30 days.

Parameters

NameInDescription
namepathrequiredPad name in the URL path
rawqueryraw=1 returns the bare document with its original content-type

Example request

curl "https://api.webbersites.com/api/scratchpad/memory"
# first call returns 402 + payment requirements; an x402 client pays and retries automatically

Example response

{
    "pad": "memory",
    "content": "{\"note\":\"Deploy went out 2026-07-09…\"}",
    "content_type": "application/json",
    "updated_at": "2026-07-09T00:00:00.000Z",
    "expires_at": "2026-09-07T00:00:00.000Z"
}
MCP tool: get_scratchpad_name — via npx -y webbersites-x402-mcp (local, key stays on your machine) or the remote endpoint https://api.webbersites.com/mcp.

GET /api/scratchpad$0.001

List your wallet's scratchpads: names, sizes, updated and expiry dates. The cheap 'do I have memory here?' call for the start of a session.

Example request

curl "https://api.webbersites.com/api/scratchpad"
# first call returns 402 + payment requirements; an x402 client pays and retries automatically

Example response

{
    "wallet": "0xabc…",
    "pads": [
        {
            "name": "memory",
            "bytes": 122,
            "updated_at": "2026-07-09T00:00:00.000Z",
            "expires_at": "2026-09-07T00:00:00.000Z"
        }
    ]
}
MCP tool: get_scratchpad — via npx -y webbersites-x402-mcp (local, key stays on your machine) or the remote endpoint https://api.webbersites.com/mcp.

POST /api/scratchpad/{name}$0.005

YOUR SCRATCHPAD — a persistent memory file for notes to your future self. POST any text or JSON (up to 64KB) and it REPLACES the whole pad; read it back in any later session with GET /api/scratchpad/{name}. The paying wallet is the identity — no accounts, no keys. Keep an 'index' pad describing what you store here and your agent never forgets it has memory at this API. Reads extend a pad 30 days, writes 60. 50 pads per wallet.

Parameters

NameInDescription
namepathrequiredPad name in the URL path, [a-zA-Z0-9_-]{1,64} — e.g. 'index', 'memory', 'todo'
namebodyPad name in the URL path, [a-zA-Z0-9_-]{1,64} — e.g. 'index', 'memory', 'todo'

Example request

curl -X POST "https://api.webbersites.com/api/scratchpad/example" \
  -H "Content-Type: application/json" \
  -d '{"note":"Deploy went out 2026-07-09. Next session: reseed Bazaar, check /api/uptime revenue.","todo":["reseed","review pricing"]}'
# first call returns 402 + payment requirements; an x402 client pays and retries automatically

Example response

{
    "pad": "memory",
    "bytes": 122,
    "content_type": "application/json",
    "replaced": false,
    "expires_at": "2026-09-07T00:00:00.000Z",
    "remember": "You have a scratchpad 'memory' at api.webbersites.com — GET /api/scratchpad/memory reads it back any session."
}
MCP tool: post_scratchpad_name — 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.