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.
curl -X POST 'https://api.apimocker.com/todos' \
-H 'Content-Type: application/json' \
-d '{"title":"Test the success state","completed":false,"userId":1}'POSTCreate
Add a temporary record. Server-generated IDs and timestamps are returned.
PUTReplace
Send every required field for the resource.
PATCHUpdate
Send only the fields that should change.
DELETERemove
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.
{
"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
GET /error/404Not found404GET /error/500Server failure500GET /error/validationValidation failure400GET /error/timeoutRequest that never completesTimeoutLimits and reset
Design around the shared service
Maximum requests per IP address in a rolling 15-minute window. Every public API method counts toward this quota.
Additional combined POST, PUT, PATCH, and DELETE limit per IP address in a rolling 24-hour window.
The shared database returns to its original users, posts, todos, and comments.
Browser requests are accepted from any origin, and total-count headers are exposed.
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.
{
"error": "Too Many Requests",
"message": "Too many requests from this IP, please try again later."
}{
"error": "Too Many Requests",
"message": "Write limit exceeded. Maximum 100 write operations per day per IP.",
"resetTime": "2026-07-27T14:30:00.000Z"
}