Routes & Responses
Routes define the endpoints your mock simulation responds to. Each route can have multiple responses with configurable selection logic.
Creating a Route
- Open a simulation and click Add Route
- Configure the route:
- Method - GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
- Path - URL pattern (e.g.,
/users/:id) - Description (optional) - What this endpoint does
- Add at least one response
- Click Save
Path Patterns
| Pattern | Example | Matches |
|---|---|---|
| Static | /users | Exact path only |
| Parameter | /users/:id | /users/123, /users/abc |
| Wildcard | /files/* | /files/a/b/c.txt |
| Mixed | /orgs/:orgId/users/:userId | /orgs/1/users/2 |
Configuring Responses
Each response includes:
Status Code
Any valid HTTP status code (200, 201, 400, 404, 500, etc.).
Headers
Custom response headers as key-value pairs. Common examples:
Content-Type: application/jsonX-Request-Id: {{$randomUUID}}Cache-Control: no-cache
Body
The response payload. Supports:
- JSON - Structured data (most common)
- XML - SOAP or XML-based APIs
- HTML - Web page responses
- Plain text - Simple string responses
- Binary - File downloads
Dynamic Values
Use template variables in response bodies and headers:
| Variable | Description | Example Output |
|---|---|---|
{{$randomUUID}} | Random UUID v4 | a1b2c3d4-... |
{{$timestamp}} | Current Unix timestamp | 1707849600 |
{{$isoTimestamp}} | ISO 8601 datetime | 2026-02-15T... |
{{$randomInt}} | Random integer 0-1000 | 427 |
{{request.path.id}} | Path parameter value | 123 |
{{request.query.page}} | Query parameter value | 2 |
{{request.body.name}} | Request body field | Alice |
Response Delay
Add simulated latency (in milliseconds) to test timeout handling and loading states.
Response Selection Logic
When a route has multiple responses, selection is controlled by:
Rules-Based Selection
Match on request properties:
IF header "Authorization" is missing -> Return 401
IF query "page" > 10 -> Return 404
IF body "amount" > 10000 -> Return 400
DEFAULT -> Return 200
Sequential Mode
Responses are returned in order, cycling back to the first after the last. Useful for testing retry logic.
Weighted Random
Assign weights to responses for probabilistic selection:
- 200 OK (weight: 80)
- 500 Error (weight: 15)
- 408 Timeout (weight: 5)
Bulk Operations
- Import routes from OpenAPI, Postman, HAR, or cURL
- Export routes as OpenAPI spec or Postman collection
- Duplicate a route within the same simulation
- Move routes between simulations
Next Steps
- Environments - Save and share route configurations
- AI Features - Auto-generate responses with AI
- Proxy & Record/Replay - Capture real traffic as routes