Dynamic mocking in Insomnia supports a limited but powerful set of Liquid template tags and logic controls. These enable variable responses, conditional behavior, and safe data generation.
Faker usage follows Insomnia’s template tag model. You can use Faker functions anywhere template tags are supported to generate realistic mock data like names, emails, or timestamps.
For a complete list of available Faker properties, go to faker-functions.ts.
Logic control in dynamic mocking is based on Liquid’s templating language; it only supports a subset of built-in tags for safety and simplicity.
    
        
        
            | 
             Tag 
             | 
        
            
             Description 
             | 
        
            
             Reference 
             | 
        
        
    
    
        
        
            
                
                
                
                    assign
                
                 | 
            
                
                
                
                    Creates or updates a variable within the template scope.
                
                 | 
            
                
                
                
                    LiquidJS Assign
                
                 | 
            
        
        
        
            
                
                
                
                    if
                
                 | 
            
                
                
                
                    Conditionally renders a block of content when a statement evaluates as true.
                
                 | 
            
                
                
                
                    LiquidJS If
                
                 | 
            
        
        
        
            
                
                
                
                    unless
                
                 | 
            
                
                
                
                    Renders a block when a statement evaluates as false; acts as the inverse of if.
                
                 | 
            
                
                
                
                    LiquidJS Unless
                
                 | 
            
        
        
        
            
                
                
                
                    raw
                
                 | 
            
                
                
                
                    Prevents Liquid from interpreting enclosed content. Use this to escape template syntax within mock responses.
                
                 | 
            
                
                
                
                    LiquidJS Raw
                
                 | 
            
        
        
    
 
For additional implementation details and syntax behavior, go to the LiquidJS documentation.
You can access values from incoming requests and include them in your mock responses.
Format to output a variable:
    
    
        {{ req.headers['Content-Type'] }}
{{ req.body.name }}
 
        
        
        
     
 
Format to define a default value:
    
    
        {{ req.body.name | default: "George" }}
 
        
        
        
     
 
Available variables
  - 
req.headers.* — Reference a specific request header 
  - 
req.queryParams.* — Reference query parameters in the URL 
  - 
req.pathSegments[*] — Reference specific segments of the URL path 
  - 
req.body — Returns the full request body (only when the body is not a binary stream) 
  - 
req.body.* — When the content type is application/json, application/x-www-form-urlencoded, or multipart/form-data, Insomnia parses the body and exposes each field 
Use Faker template tags to generate random but realistic data in mock responses.
Format to output random data:
    
    
        {{ faker.randomFullName }}
 
        
        
        
     
 
  Self-hosted mocks run the published container image from the repository.
    
        
        
            | 
             Option 
             | 
        
            
             Description 
             | 
        
            
             When to use 
             | 
        
        
    
    
        
        
            
                
                | 
                
                    Send now
                
                 | 
            
                
                
                
                    Immediately send a request to the mock server and display the response in the Response pane.
                
                 | 
            
                
                
                
                    Use this option for quick validation that your mock routes, dynamic templates, or environment variables resolve correctly. Ideal during early setup or after modifying a mock definition.
                
                 | 
            
        
        
        
            
                
                | 
                
                    Generate client code
                
                 | 
            
                
                
                
                    Produce a client-side code snippet that reproduces the current mock request in multiple languages. For example, curl, JavaScript fetch, or Python requests.
                
                 | 
            
                
                
                
                    Use this when you want to share or automate the mock request outside Insomnia. For example, add it to test scripts, CI jobs, or SDK examples.
                
                 | 
            
        
        
    
 
    
        
        
            | 
             Option 
             | 
        
            
             Description 
             | 
        
            
             When to use 
             | 
        
        
    
    
        
        
            
                
                | 
                
                    Send after delay
                
                 | 
            
                
                
                
                    Schedules the request to execute after a specified delay in milliseconds. The request is queued and sent automatically once the delay expires.
                
                 | 
            
                
                
                
                    Use this option to simulate network latency, rate-limited APIs, or background task timing. It helps validate client-side behavior when responses are delayed.
                
                 | 
            
        
        
        
            
                
                | 
                
                    Repeat on interval
                
                 | 
            
                
                
                
                    Sends the same request repeatedly on a fixed interval until stopped. Each cycle executes independently, allowing you to observe variable or time-sensitive responses from the dynamic mock.
                
                 | 
            
                
                
                
                    Use this to test dynamic responses, such as mocks that use Faker data, timestamp generation, or conditional logic. It’s also useful for load, polling, or long-running integration tests.
                
                 |