30-Second Quickstart
Follow these 3 simple steps to see how Playground API persists real CRUD mutations without backend setup.
1Fetch Baseline Seed Data
Send a standard GET request to list posts. Supports ?_limit=5, ?_sort=title, and search ?q=term.
1
// 1. Fetch baseline posts
2
const res = await fetch('https://playground-api-xi.vercel.app/api/v1/posts?_limit=5', {
3
credentials: 'include',
4
});
5
const { data } = await res.json();
6
console.log('Posts:', data);
2Create a New Record in Your Sandbox
Send a POST request. The server saves the record strictly to your private session overlay.
1
// 2. Create a post in your isolated sandbox
2
const res = await fetch('https://playground-api-xi.vercel.app/api/v1/posts', {
3
method: 'POST',
4
headers: { 'Content-Type': 'application/json' },
5
credentials: 'include',
6
body: JSON.stringify({
7
title: 'Hello from React!',
8
body: 'This post persists in my private session.',
9
user_id: 1,
10
}),
11
});
12
const newPost = await res.json();
13
console.log('Created ID:', newPost.id);
3Verify Real Persistence
Query the list endpoint again. Your newly created record is immediately returned at the top of the list!
1
// 3. Fetch again — your new post is right at the top
2
const res = await fetch('https://playground-api-xi.vercel.app/api/v1/posts?_limit=5', {
3
credentials: 'include',
4
});
5
const { data } = await res.json();
6
console.log('Top Post:', data[0].title);