Skip to main content

Enable or Disable Mock API Using the SDK Switch

The API SDK Switch lets you control whether a specific API endpoint is available for mocking through the mockforme SDK. Only APIs with the switch enabled will respond with mock data.

This is useful for toggling between real and mocked API responses during development or testing.

Note

If the SDK switch is set to off, the default behavior will be used instead (e.g., no mock response, or fallback to live API if configured). By default, the SDK switch is disabled.

Toggle SDK switch for mock API in mockforme dashboard

Try It with the mockforme SDK (NPM Package)

Experience the flexibility of dynamic API mocking using the mockforme NPM package. It allows you to:

  • Mock REST APIs in under 2 minutes
  • Easily toggle mock responses with the SDK switch
  • Seamlessly integrate with any frontend framework (React, Vue, Angular, etc.)

Simple, fast, and highly customizable — perfect for agile development environments.