Skip to content
MockNow API Endpoints

Project-backed mock API routes for frontend development.

MockNow exposes generated resources under stable project paths so your app can call them like a temporary backend.

Route Pattern

Every resource lives under a project

Project-backed resources use a REST-like path structure so frontend apps can call list and item endpoints without special adapters.

/api/mock/[projectId]/[resource]
/api/mock/[projectId]/[resource]/[itemId]
Collection Routes

List endpoints

Collection endpoints return data plus meta for every list response, even when you are not paginating yet.

Examples

Common collection patterns for users, products, orders, or other resources.

GET /api/mock/project_abc123/users
GET /api/mock/project_abc123/users?page=1&limit=10
GET /api/mock/project_abc123/users?search=john
GET /api/mock/project_abc123/users?sort=name&order=asc
GET /api/mock/project_abc123/users?status=500
GET /api/mock/project_abc123/users?delay=2000

Response shape

List routes always return a predictable object with data and meta.

{
  "data": [
    {
      "id": 1,
      "name": "John Rivera",
      "email": "john@example.com"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 10,
    "total": 50,
    "totalPages": 5,
    "projectId": "project_abc123",
    "resource": "users",
    "search": null,
    "sort": null,
    "order": "asc"
  }
}
Item Routes

Single object endpoints

If a generated resource includes an id field, MockNow can return a single object route for that item.

Examples

GET /api/mock/project_abc123/users/1
PATCH /api/mock/project_abc123/users/1
PUT /api/mock/project_abc123/users/1
DELETE /api/mock/project_abc123/users/1

404 response

If an item does not exist, MockNow returns a standard not-found object.

{
  "error": "Not Found",
  "message": "No users item found with id 1"
}
Query Params

Behavior you can simulate from the URL

These parameters make MockNow feel more like a real backend without requiring extra setup.

page

Choose which page of results to return for a collection endpoint.

limit

Set the number of records returned per page.

search

Search across string fields inside the generated resource snapshot.

sort

Sort by a simple top-level field such as name, email, or createdAt.

order

Use asc or desc with sort.

delay

Delay the response to simulate loading states. Current max is 10000ms.

status

Return a simulated error response such as 401, 403, 404, 429, or 500.

Simulated Errors

Delay and error responses

Use these to test retries, spinners, empty states, and auth or server failure handling.

Error response

{
  "error": "Mock Error",
  "status": 500,
  "message": "This is a simulated mock API error."
}

Delete response

{
  "success": true,
  "message": "users item 1 deleted successfully"
}
Next Links

Keep going

Use the broader MockNow docs for positioning and use cases, or open the AI guide if you are prompting a coding assistant.

More context around MockNow

If you want the broader product story or trust details behind the tool, these pages round it out.