Documentation menu

Testing guide

Exercise more than the happy path.

Create temporary records, update state, delete data, slow responses, and trigger known failures without setting up a backend.

Mutations

Test create, update, and delete flows

Send JSON to POST, PUT, and PATCH endpoints. A successful create returns 201, updates return 200, and a successful delete returns 204 with no response body.

Create a todo
curl -X POST 'https://api.apimocker.com/todos' \
  -H 'Content-Type: application/json' \
  -d '{"title":"Test the success state","completed":false,"userId":1}'

POST

Create

Add a temporary record. Server-generated IDs and timestamps are returned.

PUT

Replace

Send every required field for the resource.

PATCH

Update

Send only the fields that should change.

DELETE

Remove

Delete a record until the next daily reset.

Validation

Handle invalid input

Missing fields, invalid emails, out-of-range strings, and invalid IDs return a 400 response. Validation responses include field-level details when available.

400 response
{
  "error": "Validation Error",
  "message": "Invalid input data",
  "details": [
    {
      "type": "field",
      "value": "",
      "msg": "Title is required and must be between 1 and 200 characters",
      "path": "title",
      "location": "body"
    }
  ]
}

Error simulation

Trigger predictable failures

Limits and reset

Design around the shared service

1,000 requests

Maximum requests per IP address in a rolling 15-minute window. Every public API method counts toward this quota.

100 writes

Additional combined POST, PUT, PATCH, and DELETE limit per IP address in a rolling 24-hour window.

Midnight UTC

The shared database returns to its original users, posts, todos, and comments.

Open CORS

Browser requests are accepted from any origin, and total-count headers are exposed.

10 MB JSON

JSON request bodies larger than 10 MB are rejected.

Rate-limit responses

Handle 429 responses explicitly

The general limiter returns standard RateLimit-Policy,RateLimit-Limit, RateLimit-Remaining, andRateLimit-Reset headers. The reset value is the number of seconds remaining in the rolling 15-minute window. A general-limit 429 also includes Retry-After.

General limit 429
{
  "error": "Too Many Requests",
  "message": "Too many requests from this IP, please try again later."
}

Write limit 429
{
  "error": "Too Many Requests",
  "message": "Write limit exceeded. Maximum 100 write operations per day per IP.",
  "resetTime": "2026-07-27T14:30:00.000Z"
}