Control how your endpoints respond: use mock data, forward to real APIs, or combine both with hybrid mode.
Proxy Mode is a powerful feature that lets you control how your Mock API Builder endpoints respond to requests. When you import an OpenAPI spec from an external API, you can choose to return mock data, forward requests to the real API, or use a combination of both.
Returns generated mock data based on your endpoint configurations and response templates.
Best for:
Forwards all requests to the original external API and returns real responses.
Best for:
Uses mock data when available, falls back to the real API for unconfigured endpoints.
Best for:
When you import an OpenAPI spec with an external base URL, Mock API Builder automatically transforms it to work with our routing system.
Original URL (from OpenAPI spec):
https://petstore.swagger.io/v2Transformed URL (Mock API Builder):
/api/petstore.swagger.io/v2https://api.example.com/v1 → /api/api.example.com/v1http://localhost:3001 → /api/localhost:3001https://petstore.swagger.io/v2 → /api/petstore.swagger.io/v2localhost, 127.0.0.1 use HTTPImport an OpenAPI Spec
Import a spec from an external URL (e.g., Swagger Petstore)
Open Project Settings
Click the gear icon in your project dashboard
Find Proxy Mode Section
This section only appears for projects with external API URLs
Select Your Mode
Choose Mock, Proxy, or Hybrid based on your needs
Save Changes
Your mode change takes effect immediately
During frontend development, you want consistent data that doesn't change unexpectedly. Mock Mode gives you complete control over the response data, allowing you to test edge cases and specific scenarios.
When you need to validate that your application works with the real API, switch to Proxy Mode. All requests are forwarded to the original API, returning live data.
Hybrid Mode is perfect when you want to mock some endpoints while keeping others connected to the real API. This is useful when migrating from a real API to a mock setup, or when you only need to control specific endpoints.
Endpoints with mock data configured → Return mock data
Endpoints without mock data → Forward to real API
Proxy mode only works for projects imported from external OpenAPI specs.
Original API must be accessible from your server
CORS policies may affect browser requests
API authentication must be handled separately
Start with Mock Mode for development
Switch to Proxy Mode for integration tests
Use Hybrid Mode for gradual transitions
Document which mode is used in different environments