Product documentationUpdated February 5, 2026
Understanding Mocks
API mocks simulate backend behavior so you can test and validate workflows even when real services are unavailable, unstable, or not ready.
Overview
Mocks simulate API behavior without calling the real backend. They help teams validate flows early (or reliably) when real services are:
- unavailable
- unstable/flaky
- still under development
When to use mocks
- frontend development before APIs are ready
- QA validation for multi-step workflows
- negative and edge-case testing that’s hard to reproduce reliably
- CI runs where environment dependency would cause flakes
How mocks typically work
- Select a project.
- Define a mock for an endpoint.
- Choose response style:
- static (fixed payload)
- dynamic (templates/variables/conditional behavior)
- Test the mock response with a sample request.
- Use mocks during test execution or run them as a standalone mock service (if supported).
Best practices
- Keep mock payloads realistic and schema-aligned.
- Label mocks clearly so production validation doesn’t accidentally rely on them.
- Disable mocks when validating real production behavior.
Related articles
Next steps
- Getting started · Install + connect your spec
- Configuration fundamentals · Stabilize runs
- Initial configuration · Users, licensing, projects
- Release notes · Updates and fixes
Still stuck?
Tell us what you’re trying to accomplish and we’ll point you to the right setup—installation, auth, or CI/CD wiring.