Documentation

SonoJS Mock at api.sonojs.com serves fake REST resources as JSON (JSONPlaceholder-style). Use GET on shared seed data, try Auth login, use the Playground, generate fixtures at /generator, placeholder images at /image-generator, JSON Workbench at /json, or publish writable JSON with Temporary API. Catalog writes are read-only in production - see Shared data.

Temporary API

Need a disposable REST endpoint with your own JSON? Temporary APIs are separate from the shared catalog. Paste JSON, pick how long it should live, and get a public URL under /api/t/… You can also publish from the Fake Data Generator via Create API.

  • No account - create from /temporary in the browser (or Create API on /generator).
  • Lifetime options: 1, 6, 12, or 24 hours (default 12h).
  • Call the public /api/t/… URL with GET, POST, PATCH, and DELETE like a normal collection or document.
  • Treat the link like a password: anyone who has it can read and change the data until it expires.
  • When an API expires, requests return HTTP 410.

Temporary API limits

  • Up to 5 active temporary APIs per browser at once.
  • Up to 20 creates per IP per rolling hour (HTTP 429 if you go over).
  • JSON payload max 64 KB.
  • Max nesting depth 8; arrays up to 500 items; objects up to 200 keys.
  • Same global /api rate limit still applies (about 60 requests per IP per minute).

Fake Data Generator

Generate realistic JSON for UI work without writing fixtures by hand. Runs entirely in the browser. Pick a data type, fields, and quantity, then copy, download, or publish via Temporary API.

  • Open /generator - people, ecommerce, content, media, business, and location types.
  • Choose POST body (no id/timestamps) or API record shape (id + createdAt + updatedAt).
  • Country packs (US, GB, DE, FR, NL, JP, CA) for realistic regional placeholders.
  • Generate up to 1,000 records; Create API is capped by Temporary limits (500 items / 64 KB).
  • Selections and results survive client-side navigation (cleared on full page reload).

Generator

Image Generator

Need a placeholder image URL for UI work? Use SonoJS Mock SVG placeholders or random real photos (via Picsum redirect). Set width and height, copy the link, and drop it into img, CSS, or any image field.

  • Open /image-generator - SVG placeholders or real photos.
  • Public URL shape: /image/{width}/{height} for SVG; add ?type=real for photos.
  • Random by default. Optional ?seed= keeps the same SVG colors or the same real photo.
  • Ready sizes for avatar, thumbnail, profile, post, cover, banner, and story.
1<!-- SVG placeholder -->2<img src="https://api.sonojs.com/image/800/600" alt="Placeholder" />3 4<!-- Real photo -->5<img src="https://api.sonojs.com/image/800/600?type=real" alt="Photo" />

Images

JSON WorkbenchIn development

JSON Workbench (in development): one in-browser space for everyday JSON work while you build UIs - format, compare, search, and convert without leaving SonoJS Mock.

  • Open JSON Workbench at /json and select a tool - the workspace updates in place (share with ?tool=).
  • Core: Format, Tree View, Search, JSONPath, and Compare Structure.
  • Transform: TypeScript, Zod, JSON Schema, YAML, and CSV.
  • Utilities: sort keys, remove empty values, flatten, escape/repair, pick/omit, and more.
  • Runs in your browser - JSON is not sent to a server.
  • Still evolving - more tools and polish over time.

JSON Workbench

Shared data

Catalog resources (Users, Posts, and the rest) use one shared seed database—like JSONPlaceholder. GET always returns live JSON. POST, PATCH, and DELETE return HTTP 403 with code READ_ONLY on production so the shared dataset stays stable. Run locally with CATALOG_WRITABLE=true if you need real CRUD against Postgres. For your own mutable API, use Temporary API at /temporary.

Resources

Live endpoints you can call today, plus a short roadmap of what is next.

#ResourceBase pathStatusDocs
1
Auth
Auth
/api/authLive
2
Users
Users
/api/usersLive
3
Posts
Content
/api/postsLive
4
Comments
Content
/api/commentsLive
5
Albums
Media
/api/albumsLive
6
Photos
Media
/api/photosLive
7
Todos
Productivity
/api/todosLive
8
Products
Commerce
/api/productsLive
9
Notifications
Engagement
/api/notificationsLive
10
Countries
Geo
/api/countriesLive

OpenAPI

Machine-readable catalog of every live endpoint (Auth, Users, Posts, Comments, Albums, Photos, Todos, Products, Notifications, Countries). Download /openapi.json or import https://api.sonojs.com/openapi.json into Postman, Swagger UI, or AI tools.

1# Production2curl -O https://api.sonojs.com/openapi.json3 4# Local5# curl -O http://localhost:3000/openapi.json

Requests

Lists return data + pagination. Single items return { data }.

1{2  "data": [3    {4      "id": "1",5      "title": "Hello SonoJS Mock",6      "published": true7    }8  ],9  "pagination": {10    "page": 1,11    "limit": 6,12    "total": 42,13    "totalPages": 714  }15}
1{2  "data": {3    "id": "1",4    "title": "Hello SonoJS Mock",5    "published": true6  }7}

Errors

Failures use an error object. Statuses: 400 validation, 401 unauthorized, 403 read-only catalog writes, 404 missing, 429 rate limited, 500 server. Pass ?status=500 (400–599) to force an error for UI demos.

1{2  "error": {3    "code": "NOT_FOUND",4    "message": "Post not found"5  }6}

Request limits

To keep the demo fair for everyone, each IP can call /api/* about 60 times per minute. Go over that and you get HTTP 429 (too many requests). The response also includes X-RateLimit headers so you can see how many calls you have left.

1{2  "error": {3    "code": "RATE_LIMITED",4    "message": "Too many requests. Try again in 42s."5  }6}