API Fast Mock

Create API Mocks in Seconds

API Fast Mock is a revolutionary tool to create fully stateless API mocks using compact tokens only. No database, no complex setup - just define your response and generate a unique token containing the entire specification of your mock. Share the link and done! Perfect for testing, prototyping and agile development.

1
2
3

HTTP Method
Choose the HTTP method your mock API will respond to. Each method has a specific purpose in RESTful APIs.

Select the HTTP method your mock will respond to. Common methods:

  • GET: Retrieve data (e.g., get user info)
  • POST: Create new resources (e.g., create user)
  • PUT: Replace entire resource (e.g., update all user data)
  • PATCH: Partial update (e.g., update email only)
  • DELETE: Remove resource (e.g., delete user)

HTTP Status Code
HTTP status codes indicate whether a request has been successfully completed. They are grouped into categories.

Define what status code your mock will return:

  • 2xx Success: 200 OK, 201 Created, 204 No Content
  • 3xx Redirect: 301 Moved, 302 Found
  • 4xx Client Error: 400 Bad Request, 401 Unauthorized, 404 Not Found
  • 5xx Server Error: 500 Internal Error, 503 Service Unavailable

Response Body
The JSON data that will be returned by your mock API. This is what the client will receive.

Define the JSON response your mock will return. Leave empty to use the default example.

Example response for a user API:
{
  "id": 123,
  "name": "John Doe",
  "email": "john@example.com",
  "created_at": "2025-01-20"
}

Custom Headers
HTTP headers let you pass additional information with responses. Common headers include Content-Type, Cache-Control, etc.

Add custom HTTP headers to your response:

Common headers:
  • Content-Type: application/json
  • Cache-Control: no-cache
  • X-Custom-Header: Your custom value

API Authentication
Protect your mock with an API key. Requests will need to include the X-API-Key header with this value.

Require an API key to access your mock:

Usage example:
curl -H "X-API-Key: your-secret-key" https://api/mock/...

Response Timing
Simulate slow APIs by adding delays or timeouts. Useful for testing loading states and timeout handling.

Simulate network latency (0-30 seconds)

Returns 504 Gateway Timeout after specified time

Error Simulation
Simulate random failures to test error handling in your application.

Probability of returning 500 error (0 = never, 1 = always)

Example: 0.2 = 20% chance of failure

Dynamic Fields
Generate dynamic values on each request like timestamps, UUIDs, counters, or random values.

Add fields that change on every request:

Available types:
  • UUID: Unique identifier
  • Timestamp: Current date/time
  • Counter: Incremental number
  • Random Number: Random integer in range
  • Random Choice: Pick from list

Request Validation
Validate incoming requests. Returns 400 Bad Request if validation fails.

Conditional Responses
Return different responses based on request headers, query params, or body content.

Define conditions to return different responses:

Example: If header "X-Test" = "true", return {"test": true}

Rate Limiting
Limit the number of requests allowed in a time window. Returns 429 Too Many Requests when exceeded.

Example: 10 requests per 60 seconds

Response Sequences
Return different responses in sequence. Useful for simulating pagination or state changes.

Return different responses on each call:

Each request cycles through the array

Webhook Callback
Trigger a POST request to another URL after responding. Useful for testing webhooks.

URL to POST to after responding (fire-and-forget)

CORS Settings
Enable Cross-Origin Resource Sharing to allow browser requests from different domains.

Allow requests from browsers

No mock generated yet. Configure your mock and click Generate!