Manage mocks from any device
Create a mock at work, then edit, delete, or clear its logs from home or CI using the one-time admin token from the create response.
When to use this
Every created mock comes back with a one-time admin_token — save it, because it is never shown again. Editing, deleting, clearing logs, and reading the private inspector require that token: curl -X PUT https://quickmock.dev/api/mocks/<slug> -H 'Authorization: Bearer qm_...' -d '{...}'. The browser exchanges the same token for a path-scoped HttpOnly inspector session. Skip it and protected API calls return 401 admin_token_required; send the wrong value and they return 403 admin_token_invalid. The mock response URL remains public. Legacy mocks created before admin tokens keep their previous behavior until they expire.
Create the mock
curl -X POST https://quickmock.dev/api/mocks \
-H 'Content-Type: application/json' \
-d '{
"method": "GET",
"response_status": 200,
"content_type": "application/json",
"response_body": "{\"ok\":true}"
}'
Call it
curl https://quickmock.dev/m/<slug>
Open the mock page and paste its admin token to watch incoming method, headers, query, and body in the private live inspector.
What you get
GET /m/<slug> -> 200 {"ok":true} (works from any device, no token)
PUT/DELETE /api/mocks/<slug> and DELETE .../logs need Authorization: Bearer <admin_token>
no header -> 401 admin_token_required
wrong token -> 403 admin_token_invalid