Learning Center/FAQ & Support/Common Questions
FAQ

Frequently Asked Questions

Quick answers to common questions about Mock API Builder. Find solutions to the most frequently asked questions from our community.

Can't find what you're looking for?

Use the search function or browse through the categories below. Still need help? Check our Getting Help page for support options.

Browse by Category

Getting Started

Account setup, project creation, and basic usage

Data & Schemas

Schema definition, data generation, and customization

API Features

Endpoints, methods, authentication, and responses

Security & Limits

Authentication, rate limiting, and usage quotas

Getting Started

Do I need to create an account to use Mock API Builder?

Yes, you need to create a free account to use Mock API Builder. This allows you to:

  • Save and manage your projects
  • Access your API endpoints from anywhere
  • Use advanced features like authentication and rate limiting
  • Track usage and monitor API logs

Sign up is quick and free - just provide your email and create a password.

How do I create my first mock API?

Creating your first API is easy:

  1. Log in to your account and go to the Dashboard
  2. Click the "Create Project" button
  3. Give your project a name and description
  4. Define your data schema using the schema editor
  5. Configure your endpoints (GET, POST, PUT, DELETE)
  6. Start using your API with the generated URL

Check out our Quick Start Guide for detailed step-by-step instructions.

Can I import an existing API specification?

Yes! Mock API Builder supports importing OpenAPI (Swagger) specifications in JSON or YAML format. You can:

  • Upload an OpenAPI 3.0+ specification file
  • Paste the specification content directly
  • Import from a URL pointing to your spec

The system will automatically parse your spec and create corresponding endpoints and schemas. Learn more in our OpenAPI Import Guide.

What's the difference between a project and an endpoint?
Project: A container for your entire API. Think of it as your application (e.g., "Todo App", "E-commerce API"). Each project has its own base URL and settings.
Endpoint: A specific API route within your project (e.g., /users, /posts). Each endpoint can support different HTTP methods (GET, POST, etc.).

Example: Project "Blog API" might have endpoints like /posts, /comments, and /authors.

Data & Schemas

How does data generation work?

Mock API Builder uses Faker.js to generate realistic mock data based on your schema. When you define a field type, the system automatically generates appropriate data:

Field TypeExample Data
internet.emailjohn.doe@example.com
person.fullNameJane Smith
lorem.sentenceLorem ipsum dolor sit amet.
datatype.number42, 1337, 999

See our Mock Data Generation guide for all available data types and options.

Can I use custom static data instead of generated data?

Yes! You have several options for data:

  • Static Values: Use literal values in your schema (e.g., "status": "active")
  • Enum Values: Define a list of possible values with helpers.arrayElement
  • Seeded Data: Use a seed value to generate consistent data across requests
  • Custom JSON: Upload your own JSON data file for complete control

Learn more about data customization in our Schema Design Guide.

How many records can my API return?

By default, list endpoints generate and return 10 records. You can control this with query parameters:

bash

Limits: Maximum 100 records per request to ensure good performance. Use pagination for larger datasets.

Is the generated data persistent?

No, data is generated on-the-fly for each request. This means:

  • Data will be different each time you make a request
  • POST requests don't actually store data
  • DELETE requests don't remove data
  • The API always returns successful responses with generated data

Tip: Use a seed value in your schema to generate the same data consistently, or enable data persistence (Premium feature) to store data between requests.

API Features

What HTTP methods are supported?

Mock API Builder supports all standard RESTful HTTP methods:

GETRetrieve resources or lists
POSTCreate new resources
PUTUpdate entire resources
PATCHPartial updates
DELETERemove resources
OPTIONSCORS preflight

Each endpoint can be configured to support one or more of these methods.

How do I handle CORS in my application?

CORS is automatically enabled for all Mock API Builder endpoints. The API includes:

  • Access-Control-Allow-Origin: *
  • Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS
  • Access-Control-Allow-Headers: Content-Type, Authorization

This means you can call your mock API from any frontend application without CORS issues. For production APIs, you should configure CORS more restrictively.

Can I simulate different response status codes?

Yes! You can configure different status codes for various scenarios:

  • Default Behavior: Returns appropriate codes (200 OK, 201 Created, 204 No Content, 404 Not Found)
  • Custom Errors: Configure endpoints to return specific error codes (400, 401, 403, 500, etc.)
  • Query Parameter: Use ?status=500 to test error handling
  • Delays: Add ?delay=2000 to simulate slow responses (milliseconds)
bash
Does the API support filtering and sorting?

Yes! Use query parameters to filter and sort results:

bash

The filtering behavior depends on your schema configuration. Check our Query Parameters Guide for more advanced filtering options.

Security & Limits

How do I enable authentication for my API?

To add authentication to your mock API:

  1. Go to your project settings
  2. Enable "Require Authentication"
  3. Generate an API token in your profile
  4. Include the token in request headers
bash

Learn more in our Authentication Guide.

What are the rate limits?

Rate limits vary by plan:

PlanRequests/MinuteDaily Limit
Free605,000
Pro600100,000
EnterpriseCustomUnlimited

When you exceed the rate limit, you'll receive a 429 Too Many Requests response with a Retry-After header.

Can I use my mock API in production?

Not Recommended: Mock API Builder is designed for development and testing, not production use.

Here's why you shouldn't use it in production:

  • Data is not persistent (generated on-the-fly)
  • No real database or data integrity
  • Limited by rate limits and quotas
  • No uptime SLA or guaranteed availability
  • Mock responses may not match real business logic

Best Practice: Use Mock API Builder during development and testing, then switch to a real backend API for production. You can export your schema and use it as a foundation for building your actual API.

How do I secure my API tokens?

Follow these security best practices:

  • Never commit tokens to version control - Use environment variables instead
  • Rotate tokens regularly - Generate new tokens every few months
  • Use different tokens - Separate tokens for dev/staging/production
  • Revoke unused tokens - Delete old or compromised tokens immediately
  • Store securely - Keep tokens in .env files, never in code
bash

Still Have Questions?

Check out these additional resources: