Documentation

Complete guide to building with Mocklyst - from quick start to advanced features

Last updated: 1/20/2024
Version v2.0
Star on GitHub
🚀 Comprehensive API Documentation

Everything you need to build with Mocklyst

From quick prototypes to production-ready integrations, discover how to leverage Mocklyst's powerful features for your development workflow.

Quick Start Guide
5 minutes
Get your first mock API endpoint running in minutes
1

Choose Authentication Mode

Start without signup for quick testing, or create an account for persistent endpoints and analytics

30 seconds
2

Design Your Schema

Use our intuitive Schema Designer to define your data structure with rich field types

{
  "name": "string",
  "age": "number",
  "email": "email"
}
2 minutes
3

Generate & Deploy

Click generate to create your endpoint - it's instantly available worldwide

1 minute
4

Start Building

Use your endpoint in any application, framework, or testing tool

curl https://api.mocklyst.com/mock/your-endpoint-id
30 seconds
Ready to build something amazing?
Create Your First Endpoint
Authentication Options
Choose the authentication mode that fits your workflow

Quick Mode

No Signup

Perfect for rapid prototyping and testing. Create endpoints instantly without any registration.

  • Instant endpoint creation
  • 24-hour endpoint lifespan
  • Basic response types

Authenticated Mode

Account Required

Full-featured experience with persistent endpoints, analytics, and team collaboration.

  • Persistent endpoints
  • Advanced analytics dashboard
  • Team collaboration features
  • Webhooks and integrations

Start Without Registration

You can begin using Mocklyst immediately without creating an account. Your endpoints will be available for 24 hours, perfect for testing and prototyping.

Interactive API Example
Try our API with real requests and see live responses
User Data Endpoint
GET
Example endpoint returning user profile information
https://api.mocklyst.com/mock/users/demo
curl -X GET "https://api.mocklyst.com/mock/users/demo" \
  -H "Accept: application/json"
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "John Doe",
  "email": "john@example.com",
  "age": 30,
  "isActive": true,
  "createdAt": "2024-01-15T10:30:00Z",
  "profile": {
    "bio": "Software developer with 5+ years experience",
    "avatar": "https://images.mocklyst.com/avatars/john.jpg"
  },
  "tags": [
    "developer",
    "javascript",
    "react"
  ]
}
Want to test in your browser?Open in browser
Schema Designer
Design your mock data structure with our intuitive visual editor

Supported Field Types

String
Number
Boolean
Email
Date
UUID
Array
Object
URL
Phone
Color
JSON

Example Schema Definition

{
  "users": {
    "id": "uuid",
    "name": "string",
    "email": "email",
    "age": "number",
    "isActive": "boolean",
    "createdAt": "date",
    "profile": {
      "bio": "string",
      "avatar": "url",
      "social": {
        "twitter": "string",
        "github": "string"
      }
    },
    "tags": ["string"],
    "metadata": "json"
  }
}
Dashboard & AnalyticsNew
Monitor your endpoint usage and performance with detailed analytics

Request Tracking

Real-time monitoring of API calls, response codes, and geographic distribution

Performance Metrics

Response times, uptime statistics, and performance trends

Usage Analytics

User behavior patterns, popular endpoints, and integration insights

Enhanced Analytics Available

Sign up for an account to access detailed analytics, export data, set up alerts, and get insights into your API usage patterns.

API Reference
Complete documentation for integrating with Mocklyst

Core Endpoints

Integration Examples

API Rate Limits & Restrictions
Understanding usage limits, authentication tiers, and monitoring

Rate Limiting Tiers

Anonymous Users
Free
  • 60 req/hourPer IP address
  • 100 req/hourPer endpoint
  • Basic endpoints only
Authenticated Users
Account
  • 300 req/hourPer user
  • 500 req/hourPer endpoint
  • All features included
Premium Users
Pro
  • 1000 req/hourPer user
  • 2000 req/hourPer endpoint
  • Priority support

Rate Limit Headers

All API responses include rate limit information in headers:

HTTP/1.1 200 OK
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 287
X-RateLimit-Reset: 1640995200
X-RateLimit-Type: authenticated
Retry-After: 3600
X-RateLimit-LimitMaximum requests allowed per hour
X-RateLimit-RemainingRequests remaining in current window
X-RateLimit-ResetUnix timestamp when limit resets
X-RateLimit-TypeYour current rate limit tier

Rate Limit Exceeded

When rate limits are exceeded, you'll receive a 429 status code:

HTTP/1.1 429 Too Many Requests
Content-Type: application/json
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1640995200
Retry-After: 3600

{
  "error": "Rate limit exceeded",
  "message": "You have exceeded your rate limit. Please try again later.",
  "limit": 300,
  "remaining": 0,
  "resetTime": 1640995200,
  "retryAfter": 3600
}

Best Practices

Handling Rate Limits
  • Check rate limit headers in responses
  • Implement exponential backoff for retries
  • Cache responses when possible
  • Use authenticated requests for higher limits
Monitoring Usage
  • View usage analytics in your dashboard
  • Set up alerts for approaching limits
  • Track endpoint-specific usage patterns
  • Upgrade to higher tiers when needed

Admin MonitoringAdmin Only

Platform administrators have access to comprehensive rate limiting insights:

Real-time violation tracking and statistics
Historical usage patterns and trends
Per-user and per-endpoint analytics
Automated cleanup and data retention
Support & Community
Get help, share feedback, and connect with other developers

Documentation

Comprehensive guides, tutorials, and API references

Browse Docs

Community

Join our Discord community for discussions and support

Join Discord

Report Issues

Found a bug or have a feature request? Let us know

GitHub Issues
Frequently Asked Questions
Common questions about Mocklyst features and usage

How long do my endpoints stay active?

Quick mode endpoints last 24 hours. Authenticated endpoints are persistent and remain active as long as your account is in good standing.

Can I use Mocklyst for production testing?

Yes! Mocklyst is designed for both development and production testing scenarios. We offer 99.9% uptime SLA for Pro accounts.

What's the difference between free and pro accounts?

Free accounts get persistent endpoints, basic analytics, and community support. Pro accounts add team collaboration, webhooks, priority support, and enhanced analytics.

How do I integrate Mocklyst with my CI/CD pipeline?

Check our CI/CD integration guide for examples with GitHub Actions, GitLab CI, Jenkins, and other popular platforms.

What are the rate limits for API requests?

Rate limits depend on your account type: Anonymous users get 60 requests/hour per IP, authenticated users get 300 requests/hour, and premium users get 1000 requests/hour. Check the rate limits section for complete details including per-endpoint limits.

How can I monitor my API usage?

All API responses include rate limit headers showing your current usage and remaining quota. Authenticated users can also view detailed usage analytics in their dashboard including historical trends and per-endpoint statistics.

What happens when I exceed my rate limit?

When you exceed your rate limit, you'll receive a 429 "Too Many Requests" response with details about when you can try again. The best practice is to check rate limit headers in responses and implement exponential backoff for retries.

Ready to start building?

Create your first mock endpoint in under a minute. No credit card required.

Enjoying Mocklyst? Help keep this project free and open!