Complete reference for all WrenDB endpoints
https://wrendb.com/api
Anyone can read stored data with just the key. No authentication required.
Only the stash owner can update or delete items using their master token.
Data auto-expires after 30 days from creation. No cleanup required.
Just GET, POST, PUT, DELETE. No SDKs, no complicated protocols.
| Create | Read | Update | Delete | List | |
|---|---|---|---|---|---|
| Stash | Public | — | — | Token Auth | Token Auth |
| Item | Public | Public | Token Auth | Token Auth | — |
| Presigned URL | Token Auth | — | Public | — | — |
Authorization: Bearer <master_token>
Stashes organize related items. Each stash has a master token that controls all its items.
Create a new stash to organize related items. Each stash has a fixed limit of 100 items. Receive a master token to control the stash and all its items.
master_token is shown only once. There's no way to recover it, so write it down!
POST /stash
Content-Type: application/json
{
"name": "My Stash", // Optional
"description": "..." // Optional
}
{
"stash_id": "stash-abc123...",
"master_token": "token-xyz789...",
"message": "Save this token securely. It will not be shown again and is not recoverable. Your stash has a limit of 100 items."
}
curl -X POST https://wrendb.com/api/stash \
-H "Content-Type: application/json" \
-d '{"name": "Session Storage", "description": "User session data"}'
List all items in a stash. Requires your master token for authentication.
GET /stash/{stash_id}/items
Authorization: Bearer <master_token>
{
"stash_id": "stash-abc123...",
"items": [
{
"key": "key-def456...",
"value": "stored data",
"stash_id": "stash-abc123...",
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z"
}
],
"total": 1
}
401 Missing authorization header403 Invalid master token404 Stash not foundcurl https://wrendb.com/api/stash/stash-abc123/items \
-H "Authorization: Bearer token-xyz789..."
Add a new item to a stash. No authentication required – anyone who knows the stash ID can add items!
POST /stash/{stash_id}/item
Content-Type: text/plain
<your value as plain text>
{
"key": "key-def456...",
"message": "Item created successfully in stash"
}
403 Item limit reached404 Stash not foundcurl -X POST https://wrendb.com/api/stash/stash-abc123/item \
-H "Content-Type: text/plain" \
-d "Hello, World!"
Delete a stash and all its items permanently. Requires your master token.
DELETE /stash/{stash_id}
Authorization: Bearer <master_token>
{
"success": true,
"message": "Stash and all items deleted successfully"
}
401 Missing authorization403 Invalid master token404 Stash not foundcurl -X DELETE https://wrendb.com/api/stash/stash-abc123 \
-H "Authorization: Bearer token-xyz789..."
Items are key-value pairs. Reading requires no auth, but updates/deletes need the stash's master token.
Retrieve a value by its key. No authentication required.
GET /item/{key}
<the stored value>
404 Key not foundcurl https://wrendb.com/api/item/key-abc123
Update an existing value. Requires your master token for authentication.
PUT /item/{key}
Authorization: Bearer <master_token>
Content-Type: text/plain
<new value>
{
"success": true,
"message": "Value updated successfully"
}
401 Missing authorization – where's your token?403 Wrong token for this nest404 Key not foundcurl -X PUT https://wrendb.com/api/item/key-abc123 \
-H "Authorization: Bearer token-xyz789..." \
-H "Content-Type: text/plain" \
-d "Updated value"
Delete a key-value pair permanently. Requires your master token.
DELETE /item/{key}
Authorization: Bearer <master_token>
{
"success": true,
"message": "Key deleted successfully"
}
401 Missing authorization403 Invalid master token404 Key not foundcurl -X DELETE https://wrendb.com/api/item/key-abc123 \
-H "Authorization: Bearer token-xyz789..."
Generate a temporary URL that allows others to update your data without sharing your master token. Expires in 15 minutes.
POST /item/{key}/presign
Authorization: Bearer <master_token>
Content-Type: text/plain
<value to set when URL is called>
{
"url": "https://wrendb.com/update?token=eyJ..."
}
401 Missing authorization403 Invalid master token404 Key not foundcurl -X POST https://wrendb.com/api/item/key-abc123/presign \
-H "Authorization: Bearer token-xyz789..." \
-H "Content-Type: text/plain" \
-d "New value via presigned URL"
Execute a presigned update URL. No authentication required – the JWT token provides authorization.
GET /update?token=<jwt_token>
{
"success": true,
"message": "Value updated successfully via pre-signed URL"
}
400 Missing token parameter401 Token expired or invalid404 Key not foundcurl "https://wrendb.com/update?token=eyJ..."
All errors follow the same JSON format:
{
"error": "Description of what went wrong"
}
| Code | What it means |
|---|---|
200 |
Success! Everything worked. |
400 |
Bad request – you forgot something or sent invalid data |
401 |
Unauthorized – missing or invalid authentication |
403 |
Forbidden – you're authenticated but this isn't your nest |
404 |
Not found – that key doesn't exist |
409 |
Conflict – that key already exists (shouldn't happen with UUIDs) |
413 |
Payload too large – keep it under 100KB |
429 |
Too many requests – rate limit exceeded |
500 |
Internal error – something broke on our end |
See practical examples and use cases: