What are HTTP status codes?
An HTTP status code is the three-digit number a server returns with every response to say how the request went: 2xx success, 3xx redirection, 4xx a client-side problem (400 bad request, 401 unauthenticated, 403 forbidden, 404 not found, 429 too many requests), 5xx a server-side failure. The meanings are defined in RFC 9110 and RFC 6585, and an API that uses them precisely is far easier to test and to monitor.
Read the guide: HTTP Status Codes Explained
How to use API Status Code Simulator
- Enter the status code, an optional delay and an optional JSON body.
- Press "Build URL" to get the endpoint, cURL command and snippets.
- Point your app configuration, mock or test at the URL.
- Press "Try it" to send a request from the page and confirm the status, headers and body.
API Status Code Simulator features
- Public endpoint returning any final HTTP status 200–599 for your client and test code
- Optional delay (up to 10 s) to simulate slow or timing-out services
- Custom JSON body via the body parameter; sensible default body otherwise
- CORS enabled, any method accepted; 3xx codes except 304 Not Modified include a Location header
- cURL and code snippets plus a "Try it" action that shows the live response
API Status Code Simulator example
Simulate rate limiting
Input:
Code 429 · Delay 1500 ms · Body { "error": "rate_limited", "retryAfter": 30 }Output:
https://www.mutqansoft.sa/api/v1/simulate/429?delay=1500&body=%7B%22error%22…
curl -i --max-time 7 'https://www.mutqansoft.sa/api/v1/simulate/429?…'
Live result: 429 Too Many Requests · 1.52 s · application/jsonFrequently asked questions about API Status Code Simulator
How do I use the endpoint?
Call https://www.mutqansoft.sa/api/v1/simulate/<code> with any HTTP method. Add ?delay=<ms> to slow the response down (up to 10 s; larger values are capped at 10 000 ms) and ?body=<json> to control the body.
Does it support CORS?
Yes — the endpoint sends permissive CORS headers so browser apps and front-end tests can call it directly.
Are there rate limits?
Yes, per IP, to keep the service available for everyone. Use a local mock for high-volume load tests.
Can I get a redirect status?
Yes: 3xx codes except 304 Not Modified return a Location header pointing back to the simulator so clients can exercise redirect handling.
Technical notes
The simulator is served by the platform Worker; it echoes the requested status, honours the delay within the platform limit and applies per-IP rate limiting. Status codes without a body (204, 304) ignore the custom body. 1xx codes are interim responses that always precede a final one (RFC 9110), so they cannot be returned as the response and are not offered.
References
- RFC 9110: HTTP SemanticsThe meaning of HTTP methods, header fields, status codes and content negotiation, independent of the wire version.
- RFC 6585: Additional HTTP Status CodesDefines 428, 429 Too Many Requests, 431 and 511, including the Retry-After header for rate limiting.
- HTTP response status codes — MDNEvery status code with its meaning and typical use, from 100 to 511.