Browse through common mock API examples and learn how to use them in your projects.

List of Users

Get a mock list of users with dynamic data:

This example generates a random list of 3-5 users, each with a unique ID, randomly generated name and email (using Faker), and a role selected from predefined options. Perfect for testing user management interfaces or user listing features.

Schema Definition

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "array",
    "minItems": 3,
    "maxItems": 5,
    "items": 
        {
        "type": "object",
        "properties": {
            "id": {
            "type": "integer",         
            "minimum": 1,
            "maximum": 100
            },
            "name": {
            "type": "string",
                "$provider": "faker.name"
            },
            "email": {
            "type": "string",
                "$provider": "faker.email"
            },
            "role": {
            "type": "string",
                "enum": ["admin", "user", "editor"]
            }
        },
        "required": [
            "id",
            "name",
            "email",
            "role"
        ]
    }
}

Mock Response

Loading...
Generated URL: