dontlosedata
Menu
For developers

A JSON database in one URL.

Every endpoint stores one JSON value. Paths after the URL reach inside it. GET, POST, PUT, PATCH and DELETE work on any path, CORS is open, and there's no SDK. It's the same API the homepage prompt teaches AI tools to use.

Your endpoint

Ready to use right now. No account, no key.

  1. 1 Copy the prompt
  2. 2 Paste it into your AI tool
  3. 3 Your app remembers everything
Prompt for an AI assistant ▾

One endpoint. One JSON. Paths reach inside.

When it holds an object

{"announcement": "Summer sale this week!",
 "openingHours": ["Mon-Fri 9-17", "Sat 10-14"],
 "theme": "dark"}
GET …/openingHours
["Mon-Fri 9-17", "Sat 10-14"]
GET …/openingHours/1
"Sat 10-14"
PUT …/announcement with "Free shipping today"
banner text updated

When it holds a list

[{"id": 101, "title": "Buy milk",     "done": false},
 {"id": 102, "title": "Water plants", "done": true}]
GET …/
the whole list
GET …/id/101
{"id": 101, "title": "Buy milk", …}
PATCH …/id/101 with {"done":true}
item 101 updated
GET …?done=true&_sort=-id
[{"id": 102, …}]

Code

These examples use your endpoint from above.

JavaScript (fetch)▾
const url = "https://dontlosedata.site/api/v1/YOUR-ENDPOINT";

// Add an item (an "id" is added for you)
await fetch(url, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ title: "Buy milk", done: false }),
});

// Read everything
const todos = await (await fetch(url)).json();

// Update one item
await fetch(`${url}/id/${todos[0].id}`, {
  method: "PATCH",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ done: true }),
});
curl▾
curl -X PUT https://dontlosedata.site/api/v1/YOUR-ENDPOINT \
  -H "Content-Type: application/json" \
  -d '{"announcement":"Summer sale this week!","openingHours":["Mon-Fri 9-17","Sat 10-14"]}'

curl https://dontlosedata.site/api/v1/YOUR-ENDPOINT/openingHours
# ["Mon-Fri 9-17","Sat 10-14"]
HTML form (no JavaScript)▾
<!-- Each submission adds a product to the "products" list -->
<form method="POST" action="https://dontlosedata.site/f/YOUR-ENDPOINT/products">
  <input name="name" placeholder="Blue mug" required>
  <input name="price" type="number" step="0.01" placeholder="12.50" required>
  <select name="category">
    <option>Kitchen</option>
    <option>Garden</option>
  </select>
  <input name="_redirect" type="hidden" value="https://your-site.com/admin">
  <button>Add product</button>
</form>

What's in the box

Paths & wildcards

/key on objects, /field/value on lists, /0 by index, and * for keys, values and fan-out.

json-server style filters

?done=true, ?price_gte=10, ?title=Bu*, _sort, _limit, _offset, X-Total-Count.

Every method

POST appends (with auto id), PUT replaces or upserts, PATCH is RFC 7396 merge, DELETE removes matches.

Open CORS

Reflected origins, credentials, any headers, and CORS headers on errors too. Optional allowed-website list.

API keys

Bearer tokens per endpoint: protect everything, only writes, or everything except form posts.

Readable errors

{"error":{"code","message","hint"}} with hints written so AI assistants can fix their own requests.