Skip to main content

Temporary Mock API

Create a short-lived JSON endpoint for testing API clients and integrations

Temporary endpoint · expires automatically · mock data only

Request data is not logged, but anyone with the URL can use it until it expires. Never include real credentials, private keys, tokens, or sensitive personal data.

Define your mock

Choose what the request should match and what the endpoint should return.

Start with a template

Load a working example, then customize it.

Import from cURLOptional

Imports method, path, query parameters, and an optional exact JSON request body.

Request matching

Example: /users or /users/1

Example: page=1&limit=10 — matching is exact

Response settings

JSON response body

Maximum 4 KB. HTML and custom response headers are not supported.

Dynamic response fields

Randomize or increment selected response values.

Optional

The JSON schema stays the same. Incremental counters may reset after a function cold start.

Generated endpoint

Copy the URL or cURL command after creating your mock.

Your endpoint will appear here

Configure the mock on the left, then create it to get a ready-to-use URL and cURL example.

Was this Temporary Mock API helpful?

Help us keep tools reliable, fast, and bug-free.

What you can do with Temporary Mock API

  • Create a mock api endpoint
  • Simulate a rest api response
  • Test with a fake endpoint

What this network diagnostic measures

Provision temporary, isolated mock REST endpoints with custom JSON responses, HTTP status codes, and latency simulation for frontend and API testing.

Example input

Endpoint: /users/1, Method: GET, Status: 200, Body: {"id": 1, "name": "Jane Doe", "role": "admin"}

Example output

{"id":1,"name":"Example User"}

Practical workflow

  1. Load a request template or choose a supported HTTP method, path, and optional exact query string.
  2. For POST, PUT, PATCH, or QUERY requests, optionally enter the exact JSON request body to match.
  3. Set a JSON response body (up to 4 KB), an HTTP status, an expiry of 1, 6, or 24 hours, and an optional delay of 250 ms, 1 second, or 3 seconds.
  4. Create the temporary endpoint, then copy its URL or cURL example and make a request before its expiry.

Common use cases

  • Unblocking frontend user interface development before backend API services are built.
  • Simulating server errors, rate limits, and network lag to test client-side resilience.
  • Checking frontend loading and error states with controlled JSON responses and response delays.

Important notes and limitations

  • Creating a mock sends its configuration to the EasyUtils API, which returns an encrypted bearer URL. Anyone with the URL can use it until expiry; EasyUtils does not provide request history, but hosting and network providers may process request metadata. Do not include secrets or sensitive personal information.
  • HTML responses and custom response headers are unsupported; dynamic response fields can randomize supported scalar JSON values or increment numbers.

Mock HTTP server & cURL terminal testing

Serve mock JSON file with Python http.server

python3 -m http.server 8080 --directory ./mock-data

Quickly spins up a local HTTP file server responding with mock JSON payloads for frontend development.

Simulate API latency and headers with cURL

curl -i -X POST -H 'Content-Type: application/json' -d '{"status":"ok"}' https://httpbin.org/delay/1

Sends a mock POST payload to a test harness that delays response by 1 second to test UI loading skeletons.

Inspect HTTP response headers and status codes

curl -sI https://easyutils.dev/api/mock/sample

Dumps response headers including Content-Type, Cache-Control, and rate-limiting headers without downloading the body.

Mock endpoint latency & CORS troubleshooting

Access to fetch at '...' from origin '...' has been blocked by CORS policy

Cause: Mock API response omitted 'Access-Control-Allow-Origin: *' or rejected browser preflight OPTIONS request.

Solution: Ensure mock endpoint responds with 204 No Content to OPTIONS requests and includes necessary Access-Control headers.

HTTP 429 Too Many Requests on mock endpoint

Cause: Exceeded mock endpoint creation or runtime rate limits (10 creates/min, 20 requests/min).

Solution: Back off request frequency or leverage local mock JSON files served via Vite / Next.js API mock handlers.

Continue your workflow

Frequently asked questions

How long do temporary mock endpoints remain active?

Choose an expiry of 1 hour, 6 hours, or 24 hours before creating the endpoint.

Can I simulate network latency or server timeouts?

Yes. Choose no delay, 250 ms, 1 second, or 3 seconds to test loading and error-state behavior.

Does the mock API accept POST and PUT request bodies?

You can optionally require an exact JSON request body for POST, PUT, PATCH, or QUERY. EasyUtils does not provide request history, but hosting and network providers may process request metadata.