Get Started in 60 Seconds

No setup, no accounts, no complexity. Just make a request.

1

Create a stash

POST to create a stash and get a token

2

Store data

POST your text to create an item

3

Read anywhere

Use the key to GET it, no auth required

Your First Request

Let's store some data right now. Copy and paste this into your terminal:

Terminal
# Create a stash to organize your data
curl -X POST https://wrendb.com/api/stash
Response: You'll get back a JSON object with your stash_id and master_token. Save both!
Response
{
  "stash_id": "stash-a1b2c3d4...",
  "master_token": "token-x9y8z7...",
  "message": "Save this token securely..."
}
Terminal
# Add an item to your stash
curl -X POST https://wrendb.com/api/item/stash-a1b2c3d4... \
  -H "Content-Type: text/plain" \
  -d "Hello from WrenDB!"

Code Examples

Here's how to use WrenDB in your favorite language:

bash
# Create stash
curl -X POST https://wrendb.com/api/stash

# Create item in stash
curl -X POST https://wrendb.com/api/item/stash-abc123 \
  -d "My data"

# List items in stash
curl https://wrendb.com/api/stash/stash-abc123/items

# Read item
curl https://wrendb.com/api/item/stash-abc123/my-key

# Update item (requires stash token)
curl -X PUT https://wrendb.com/api/item/stash-abc123/my-key \
  -H "Authorization: Bearer token-xyz789" \
  -d "Updated data"

# Delete item (requires stash token)
curl -X DELETE https://wrendb.com/api/item/stash-abc123/my-key \
  -H "Authorization: Bearer token-xyz789"
JavaScript
// Create
const response = await fetch('https://wrendb.com/api/item', {
  method: 'POST',
  headers: { 'Content-Type': 'text/plain' },
  body: 'My data'
});
const { key, master_token } = await response.json();

// Read (need stashId and key)
const data = await fetch(`https://wrendb.com/api/item/${stashId}/${key}`)
  .then(r => r.text());

// Update
await fetch(`https://wrendb.com/api/item/${stashId}/${key}`, {
  method: 'PUT',
  headers: {
    'Authorization': `Bearer ${master_token}`,
    'Content-Type': 'text/plain'
  },
  body: 'Updated data'
});

// Delete
await fetch(`https://wrendb.com/api/item/${stashId}/${key}`, {
  method: 'DELETE',
  headers: { 'Authorization': `Bearer ${master_token}` }
});
Python
import requests

# Create
response = requests.post(
    'https://wrendb.com/api/item',
    data='My data',
    headers={'Content-Type': 'text/plain'}
)
result = response.json()
key = result['key']
master_token = result['master_token']

# Read (need stash_id and key)
data = requests.get(f'https://wrendb.com/api/item/{stash_id}/{key}').text

# Update
requests.put(
    f'https://wrendb.com/api/item/{stash_id}/{key}',
    data='Updated data',
    headers={
        'Authorization': f'Bearer {master_token}',
        'Content-Type': 'text/plain'
    }
)

# Delete
requests.delete(
    f'https://wrendb.com/api/item/{stash_id}/{key}',
    headers={'Authorization': f'Bearer {master_token}'}
)
Go
package main

import (
    "bytes"
    "encoding/json"
    "io"
    "net/http"
)

func main() {
    // Create
    resp, _ := http.Post(
        "https://wrendb.com/api/item",
        "text/plain",
        bytes.NewBufferString("My data"),
    )
    var result map[string]string
    json.NewDecoder(resp.Body).Decode(&result)
    key := result["key"]
    token := result["master_token"]

    // Read
    resp, _ = http.Get("https://wrendb.com/api/item/" + stashId + "/" + key)
    data, _ := io.ReadAll(resp.Body)

    // Update
    req, _ := http.NewRequest(
        "PUT",
        "https://wrendb.com/api/item/"+stashId+"/"+key,
        bytes.NewBufferString("Updated"),
    )
    req.Header.Set("Authorization", "Bearer "+token)
    http.DefaultClient.Do(req)
}
Rust
use reqwest;
use serde_json::Value;

async fn example() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::Client::new();

    // Create
    let res: Value = client
        .post("https://wrendb.com/api/item")
        .body("My data")
        .send()
        .await?
        .json()
        .await?;

    let key = res["key"].as_str().unwrap();
    let token = res["master_token"].as_str().unwrap();

    // Read
    let data = client
        .get(&format!("https://wrendb.com/api/item/{}/{}", stash_id, key))
        .send()
        .await?
        .text()
        .await?;

    Ok(())
}

Best Practices

Tips to get the most out of WrenDB:

  • Store your master token securely - Never commit tokens to git or expose them client-side. Use environment variables or secure secret management.
  • Use presigned URLs for webhooks - Don't give external services your master token. Generate presigned URLs that expire after 15 minutes.
  • Keep data under 100KB - WrenDB is designed for small, temporary data. For larger files, store URLs or references instead.
  • Use JSON for structured data - WrenDB stores plain text, but JSON works great for structured data. Just stringify before sending and parse when reading.
  • Remember: data is temporary - WrenDB is ephemeral by design. Don't rely on it for permanent storage or critical data backups.

Common Questions

How long does data stay stored?

Data is temporary and may be cleaned up periodically. WrenDB is designed for ephemeral storage, not permanent archives. Think of it as a scratch pad, not a vault.

What if I lose my master token?

There's no recovery. The token is shown only once when you create a key-value pair. If you lose it, you won't be able to update or delete that data (but anyone can still read it).

Can I store binary data?

No, only text data. You can Base64-encode binary data if needed, but keep in mind the 100KB size limit.

Is there rate limiting?

Yes. Be respectful. If you hit rate limits, you'll get a 429 response. For high-volume use cases, consider caching reads or batching updates.

Can I use this in production?

Yes, it can be used in production for small, low-volume apps where it doesn't depend on data being permanent. Keep in mind the rate limits when planning your use case.

How do presigned URLs work?

A presigned URL is a one-time write link. When you generate it, you choose the exact value that will be stored. The URL contains a short-lived JWT (15 minutes) that authorizes that specific write. Anyone who calls the URL triggers that write — no token required. Perfect for webhooks, forms, and one-click actions.

Ready to build?

Start storing data right now. No signup needed.

Full API Reference Back to Home