Documentation
Everything you need to mock APIs
Mockulator makes it incredibly easy to create realistic mock API endpoints for testing, development, and integration. Get up and running in seconds with our intuitive interface and powerful features.
Getting Started
Set up your first mock API endpoint in under 30 seconds. Mockulator is designed to get you testing immediately without any complicated setup or configuration.
- Create a Server. Servers are simple containers that organize your endpoints. Think of them as folders for your APIs.
- Add an Endpoint. Choose from three types: Validation for input testing, HTTP for complex scenarios, or CRUD for full REST simulation.
- Start Testing. Your endpoint is instantly available at a unique URL. No deployment, no waiting.
Your endpoint URLs follow this simple pattern:
Three powerful endpoint types
Mockulator provides three distinct endpoint types, each designed for specific testing scenarios. All endpoints support custom status codes, response delays, content types, and optional authentication.
1. Validation Endpoints
Perfect for testing form submissions and input validation. Define rules for headers, query parameters, and request body fields. The endpoint automatically returns appropriate success or error responses based on whether the validation rules pass.
Best for: Form testing, API input validation, request format verification
2. HTTP Endpoints
Our most versatile endpoint type. Create multiple response scenarios with conditional rules based on request parameters. Switch between different response modes (rules, sequential, shuffle, fallback) to test various scenarios.
Best for: Complex API simulation, conditional responses, error scenario testing
3. CRUD Endpoints
Full REST API simulation with real data persistence. When you create a CRUD endpoint named "users", Mockulator automatically generates all six REST operations:
Data persists between requests and each record automatically includes id
,created_at
, and updated_at
fields.
Multi-Path Endpoints
CRUD endpoints support nested paths for complex API structures:
users/profile → /users/profile, /users/profile/{id} api/v2/customers → /api/v2/customers, /api/v2/customers/{id} webhooks/stripe/events → /webhooks/stripe/events, /webhooks/stripe/events/{id}
Best for: Full API prototyping, stateful testing, database simulation
Authentication & Security
Secure your endpoints with multiple authentication methods. All authentication is optional and can be configured per endpoint.
Authentication Types
Basic Authentication
Standard HTTP Basic Auth with username and password. Perfect for simple API protection.
API Key Validation
Validate API keys in headers, query parameters, or request body. Supports custom key names.
Custom Authorization
Define custom authorization headers and validation rules for JWT tokens, bearer tokens, or proprietary auth schemes.
Response Modes for HTTP Endpoints
HTTP endpoints support four different response modes, giving you complete control over how your mock API behaves during testing.
Rules Mode (Default)
Evaluates conditional rules in order. First matching rule set wins. Perfect for simulating real API logic based on request parameters.
Sequential Mode
Cycles through responses in order with each request. Great for testing state transitions or step-by-step workflows.
Shuffle Mode
Returns a random response each time. Ideal for chaos testing and ensuring your app handles unpredictable responses.
Fallback Mode
Always returns the default response. Useful for baseline testing or temporarily disabling conditional logic.
Advanced HTTP Features
Fine-tune your mock APIs with advanced configuration options available across all endpoint types.
Custom Response Headers
Add any HTTP headers to your responses. Perfect for CORS, caching, or custom application headers.
Response Delays
Simulate real-world network conditions by adding artificial latency (0-30000ms). Test timeout handling and loading states in your applications.
Multiple Content Types
Support for JSON, XML, plain text, HTML, and form-urlencoded responses. Each content type includes appropriate headers automatically.
Status Code Customization
Return any HTTP status code (200, 201, 400, 401, 404, 500, etc.) to test error handling and different response scenarios.
Dynamic content that feels real
Make your mock APIs incredibly realistic with dynamic content generation. Every response can include randomly generated data that changes with each request.
Simply use double curly braces with any faker.js method:
{
"user": {
"id": "{{faker.string.uuid}}",
"name": "{{faker.person.fullName}}",
"email": "{{faker.internet.email}}",
"company": "{{faker.company.name}}",
"joinedDays": {{faker.number.int(1, 365)}}
},
"timestamp": "{{timestamp}}"
}
The response body editor includes helpful autocomplete suggestions, but you can use any valid faker.js method. Tokens are evaluated fresh on every request, ensuring your test data is always unique.
Validation Rules & Operators
Validation endpoints support sophisticated rule engines for testing complex input scenarios.
Rule Operators
=
Equals!=
Not equals>
Greater than<
Less than>=
Greater or equal<=
Less or equalregex
Regular expressioncontains
Contains substringField Sources
Authorization
or Content-Type
?page=1&limit=10
Nested Field Access
Use dot notation to validate nested JSON fields:
user.profile.email → validates email in nested object order.items.0.price → validates first item's price metadata.source.type → validates deeply nested values
Code Examples
Ready-to-use code snippets for integrating with your Mockulator endpoints.
JavaScript Fetch
// Create a new user fetch('https://api.mockulator.com/api/ABC12345/myserver/users', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': 'your-api-key' // if authentication enabled }, body: JSON.stringify({ name: 'John Doe', email: 'john@example.com' }) }) .then(response => response.json()) .then(data => console.log(data));
cURL
curl -X POST \ https://api.mockulator.com/api/ABC12345/myserver/users \ -H "Content-Type: application/json" \ -H "X-API-Key: your-api-key" \ -d '{ "name": "John Doe", "email": "john@example.com" }'
Error Response Format
All endpoints return consistent error responses:
{ "error": "Validation failed", "message": "Name field is required", "status": 400, "details": { "field": "name", "rule": "required" } }
Advanced Faker.js Examples
Generate complex data structures with loops and nested objects:
{ "products": [ {{#repeat 5}} { "id": "{{faker.string.uuid}}", "name": "{{faker.commerce.productName}}", "price": {{faker.commerce.price}}, "category": "{{faker.commerce.department}}", "inStock": {{faker.datatype.boolean}} }{{#unless @last}},{{/unless}} {{/repeat}} ], "total": {{faker.number.int(50, 500)}}, "timestamp": "{{timestamp}}" }
Team Collaboration
Work together with your team on shared mock APIs. Perfect for coordinating frontend and backend development.
Team Management
- •Invite Team Members: Add developers, QA engineers, and stakeholders to your workspace
- •Role-Based Access: Admin and Member roles with appropriate permissions
- •Shared Resources: All servers and endpoints are accessible to team members
Data Persistence & Isolation
- •Data Retention: CRUD data persists for the lifetime of your account
- •Team Isolation: Each team's data is completely isolated and secure
- •Real-time Sync: Changes to endpoints are immediately visible to all team members
Plan Limits
- 50 requests/day
- 10 CRUD objects
- Unlimited endpoints
- 20,000 requests/month
- 500 CRUD objects
- Email support
- 150,000 requests/month
- 10,000 CRUD objects
- Team collaboration
- Priority support
See every request in real-time
Every request to your endpoints is automatically captured with complete details. The request log updates in real-time using WebSocket connections, making it perfect for live debugging and monitoring.
Real-time Features
- •Live Request Monitoring: See requests appear instantly as they happen
- •WebSocket Connections: Real-time updates without page refreshes
- •Complete Request Details: Headers, query params, body, timestamps, and response data
Use Cases
- •Debugging webhook integrations from Stripe, Shopify, GitHub, etc.
- •Verifying authentication headers and API key formats
- •Understanding request payload structures from third-party services
- •Monitoring API usage patterns and request frequency
- •Testing request/response flows in development
Ready to start mocking?
You now have comprehensive knowledge of Mockulator's capabilities. From simple validation endpoints to complex CRUD APIs with team collaboration, you're ready to accelerate your development workflow.