Documentation

A temporary JSON database over plain HTTP.

TmpState gives agents, scripts, and prototypes real state without provisioning. Create a database, keep its URL server-side, and read or write JSON with any HTTP client.

OpenAPI spec

Create instantly

GET / or /new returns a live database URL in the response.

Use the URL as the credential

Treat the database URL like a password and keep it server-side.

Store JSON documents

POST, GET, PATCH, and DELETE work on implicit collections.

Handle expiry deliberately

Expired data freezes for 72 hours before deletion.

API examples

Replace $DB with the database URL from the create response. That URL contains the capability token, so do not expose it in browser code or public logs.

Create a database

Returns a database URL, admin viewer, expiry timestamp, limits, agent docs, and skills. The database URL is the only credential.

curl https://tmpstate.dev

Write a document

Collections are created implicitly on first write. Request bodies must be JSON objects.

curl -X POST $DB/leads \
  -H "Content-Type: application/json" \
  -d '{"name":"Acme Corp","email":"hello@acme.com","status":"new"}'

Read a collection

Lists documents with cursor pagination. Empty collections return an empty items array, not a 404.

curl $DB/leads

Patch a document

PATCH shallow-merges JSON object fields and enforces the same document size limits as create.

curl -X PATCH $DB/leads/doc_abc123 \
  -H "Content-Type: application/json" \
  -d '{"status":"qualified"}'

Built-in inspection endpoints

Use $DB/__health for liveness, $DB/__meta for usage and expiry, $DB/__schema for inferred collection shapes, and $DB/__export for a full data export.

Expiry is part of the contract

Free databases last 24 hours. When a database expires, requests return 410 and data remains restorable for 72 hours. Extensions are one-time payments: $1 for 7 days, $3 for 30 days, $9 for 90 days. Pro provides always-on databases.

Related resources

Use these when you need decision guidance, copyable recipes, or machine-readable references for coding agents and tools.