API Directory › 🛠️ Developer Tools › Mocky
No authHTTPSCORS

Mocky API

Generate custom mock HTTP responses on the fly for testing.

Auth
No auth needed
HTTPS
Yes
CORS
Yes
Open Mocky docs ↗

What it does

Mocky lets you design a custom HTTP response — status code, headers, delay and body — in a web form and get a permanent URL that returns exactly that. Useful for stubbing a third-party API you don’t have yet, reproducing an edge-case response, or sharing a fixture with teammates.

Base URL

https://run.mocky.io/v3/{mock-uuid}

Authentication

None. Create mocks at designer.mocky.io (optionally sign in to manage them later); the generated run.mocky.io/v3/… URL is public and needs no key.

Code examples

curl (call a mock you created)
curl -i https://run.mocky.io/v3/0f4e2c3a-1111-2222-3333-abcdef012345
Python (point your client at a mock in tests)
API_BASE = os.environ.get("API_BASE", "https://api.real-service.com")
# in CI: API_BASE=https://run.mocky.io/v3/<uuid>

r = requests.get(f"{API_BASE}/orders/42", timeout=10)
assert r.status_code == 200

Rate limits & quotas

Free with fair-use rate limiting on the shared run.mocky.io host. Response bodies are capped at a modest size (a few hundred KB). Configurable delay tops out around 60 seconds — handy for timeout testing. Mocks are long-lived but this is still a free service, so keep a local copy of anything critical.

Key response fields

(whatever you configured)Status, headers and body are entirely up to you
mocky-delay header / form fieldAdds an artificial response delay
Content-TypeSet it in the designer so clients parse the body correctly

Common errors

404The mock UUID does not exist (deleted or mistyped).
429Fair-use rate limit on the shared host — back off.
(your chosen status)If you configured the mock to return 500, that is what you get.

When to use it (and alternatives)

Great for front-end and integration work when the real API is missing, unstable or hard to force into a particular state. For a full fake CRUD dataset use JSONPlaceholder; for request inspection use httpbin. For heavy or offline use, self-host a mock server (WireMock, Prism, json-server).

FAQ

Do Mocky URLs expire?

They are designed to be permanent, but it is a free service. For anything your CI depends on, mirror the fixture into your repo or a self-hosted mock server.

Can a mock return different responses randomly?

A single mock returns one configured response. Create several mocks for different scenarios, or use a self-hosted tool like WireMock for stateful/conditional behaviour.

Can I add latency?

Yes — set a delay (up to ~60s) when creating the mock to test how your client handles slow responses and timeouts.

New to APIs?

Short guides for working with this API — and any other.

🛠️ Handy LarzOS tools

Free tools to help you work with this API.

JSON FormatterJWT DecoderBase64

Related Developer Tools APIs

← Back

More Developer Tools APIs · All 196 APIs