Documentation

Quick start guide

Go from zero to a working mock API in under five minutes. This guide walks through creating a server, defining endpoints, calling them from your app, simulating failures and running mocks inside your CI pipeline.

Explore

Find what you need

Getting started

Create your account, your first workspace and your first mock server step by step.

Response templates

Learn the template syntax for dynamic values, conditions and generated data.

CLI reference

Every command and flag for running mocks locally and in automated pipelines.

Authentication

Create, scope and rotate API keys, and protect mocks with access rules.

Import guides

Bring in OpenAPI, Swagger and Postman collections with best-practice tips.

Troubleshooting

Answers to the most common setup and integration questions.

1. Create a mock server

From your dashboard choose New server and give it a name. Everself Lab provisions a hosted HTTPS endpoint instantly. Each server belongs to a workspace, and you can create as many servers as your plan allows — for example one per microservice or one per third-party API you depend on.

Your mock URL
https://mock.everselflab.shop/<workspace>/<server>

2. Define an endpoint

Add a route, pick an HTTP method and set the response status, headers and body. Responses support templates, so values can come from the request itself or from the fake data generator. You can also add rules that return different responses depending on headers, query strings or body content.

Response body template
{
  "id": "{{params.id}}",
  "name": "{{fake.person.fullName}}",
  "email": "{{fake.internet.email}}",
  "joined": "{{fake.date.past}}"
}

3. Call it from your app

Point your HTTP client at the mock URL and send requests exactly as you would to the real API. Keep the base URL in an environment variable so you can switch between the mock and production without changing code. Every request appears instantly in the live log.

terminal
curl -H "x-api-key: $EVERSELF_KEY" \
  https://mock.everselflab.shop/acme/shop/v1/orders

4. Simulate latency and errors

Real APIs fail. Add a delay, a timeout or an error status to any route to confirm your loading states, retries and error messages work. You can also apply a failure rate, such as 10% of requests returning 503, to test resilience under realistic conditions.

everselflab.yaml
routes:
  - path: /v1/payments
    delay: 800ms
    failureRate: 0.1
    failureStatus: 503

5. Use the CLI in CI

Run a mock locally from a spec file inside your test pipeline. The CLI starts in milliseconds, needs no network access, and exits cleanly when your tests finish, making it ideal for GitHub Actions, GitLab CI and other runners.

terminal
npx everselflab mock ./openapi.yaml --port 4010
# ✔ Mock running on http://localhost:4010

Need help?

Our support team answers technical questions within one business day. Contact support.