Skip to content
Mock APIs

Reference

API reference

All 60 endpoints, grouped by resource. Paths are relative to https://test.naimulhassan.me. Select an endpoint for parameters, examples, and a live "Try it" panel.

Users

Products

Posts

Comments

Todos

Carts

Recipes

Quotes

Authentication

HTTP Testing

System endpoints

Operational endpoints live outside the versioned prefix and are not rate limited.

API discovery

GET/api/v1

Lists available resources, documentation links, and pagination defaults.

Status codes

  • 200API metadata and resource links.

Request

curl 'https://test.naimulhassan.me/api/v1'

Example responses

Captured from the real API with the requests shown on this page.

200application/json
{
  "name": "Mock APIs",
  "version": "1.0.0",
  "description": "Free REST APIs for learning, building, and testing. No API key required.",
  "baseUrl": "https://test.naimulhassan.me/api/v1",
  "documentation": {
    "openapi": "https://test.naimulhassan.me/openapi.json",
    "swaggerUi": "https://test.naimulhassan.me/docs",
    "website": null
  },
  "resources": [
    {
      "name": "users",
      "url": "https://test.naimulhassan.me/api/v1/users",
      "description": "Fictional user profiles with contact details, address, company, and role. Users own posts, todos, comments, carts, and recipes.",
      "writable": true
    },
    {
      "name": "products",
      "url": "https://test.naimulhassan.me/api/v1/products",
      "description": "A fictional product catalog across categories with pricing, discounts, ratings, and stock levels.",
      "writable": true
    },
    {
      "name": "posts",
      "url": "https://test.naimulhassan.me/api/v1/posts",
      "description": "Short blog-style posts written by seeded users, with tags, reactions, and view counts.",
      "writable": true
    },
    {
      "name": "comments",
      "url": "https://test.naimulhassan.me/api/v1/comments",
      "description": "Comments left by users on posts. Every comment references an existing post and user.",
      "writable": true
    },
    {
      "name": "todos",
      "url": "https://test.naimulhassan.me/api/v1/todos",
      "description": "Simple to-do items that belong to users. Ideal for practicing list rendering and toggling state.",
      "writable": true
    },
    {
      "name": "carts",
      "url": "https://test.naimulhassan.me/api/v1/carts",
      "description": "Shopping carts that reference seeded users and products, with computed totals and discounts.",
      "writable": false
    },
    {
      "name": "recipes",
      "url": "https://test.naimulhassan.me/api/v1/recipes",
      "description": "Recipes with ingredients, step-by-step instructions, timings, and nutrition information.",
      "writable": false
    },
    {
      "name": "quotes",
      "url": "https://test.naimulhassan.me/api/v1/quotes",
      "description": "Original, fictional quotes with fictional authors. Read-only.",
      "writable": false
    }
  ],
  "authentication": {
    "login": "https://test.naimulhassan.me/api/v1/auth/login",
    "note": "Demo-only authentication for practice. Never use it to secure real applications."
  },
  "testing": {
    "echo": "https://test.naimulhassan.me/api/v1/test/echo",
    "delay": "https://test.naimulhassan.me/api/v1/test/delay?ms=1000",
    "status": "https://test.naimulhassan.me/api/v1/test/status/404"
  },
  "limits": {
    "defaultPageSize": 30,
    "maxPageSize": 100,
    "maxDelayMs": 5000,
    "rateLimit": {
      "requests": 100000,
      "windowSeconds": 60
    }
  },
  "notice": "POST, PUT, PATCH, and DELETE requests are simulated. They return realistic responses but never modify the shared dataset."
}

Try it

GET
Headers

No header yet.

Open in playground
Send the request to see a live response.

Placeholder image (SVG)

GET/api/v1/images/{type}/{id}

Deterministic SVG placeholder used by the image and thumbnail fields of users, products, and recipes.

Parameters

Parameters for Placeholder image (SVG)
NameInTypeDescription
typerequiredpathstringImage type.One of: users, products, recipes
idrequiredpathintegerRecord ID.Min: 1

Status codes

  • 200An SVG image.
  • 400Invalid path or query parameter (INVALID_PARAMETER / INVALID_ID).
  • 404No record exists with that ID (RESOURCE_NOT_FOUND).

Request

curl 'https://test.naimulhassan.me/api/v1/images/users/1'

Example responses

Captured from the real API with the requests shown on this page.

200image/svg+xml

No response body.

Try it

GET
Headers

No header yet.

Open in playground
Send the request to see a live response.

Health check (liveness)

GET/health

Always returns 200 while the process is running, with the current database connection state.

Status codes

  • 200The service is running.

Request

curl 'https://test.naimulhassan.me/health'

Example responses

Captured from the real API with the requests shown on this page.

200application/json
{
  "status": "ok",
  "version": "1.0.0",
  "uptimeSeconds": 42,
  "startedAt": "2026-01-01T00:00:00.000Z",
  "database": "connected"
}

Try it

GET
Headers

No header yet.

Open in playground
Send the request to see a live response.

Readiness check

GET/ready

Returns 200 when the database is connected and seeded, otherwise 503.

Status codes

  • 200Ready to serve traffic.
  • 503Not ready (SERVICE_UNAVAILABLE).

Request

curl 'https://test.naimulhassan.me/ready'

Example responses

Captured from the real API with the requests shown on this page.

200application/json
{
  "status": "ready",
  "database": "connected"
}

Try it

GET
Headers

No header yet.

Open in playground
Send the request to see a live response.

OpenAPI specification

GET/openapi.json

The OpenAPI 3.0 document for this API. Import it into Postman, Insomnia, or code generators.

Status codes

  • 200OpenAPI JSON document.

Request

curl 'https://test.naimulhassan.me/openapi.json'

Example responses

Captured from the real API with the requests shown on this page.

200application/json
{
  "note": "The full OpenAPI document is returned. Download it from /openapi.json."
}

Try it

GET
Headers

No header yet.

Open in playground
Send the request to see a live response.