Quick Start Guide

Get your first API mock up and running in under 2 minutes.

1Sign Up & Access Dashboard

Create your free account and access the dotMock dashboard:

After signing up, you'll be taken to your dashboard where you can manage all your mock APIs.

2Create Your First Mock API

Click the "New API" button and choose how you want to create your mock:

Start from Scratch

Build your API from the ground up with our intuitive interface

Import OpenAPI

Import existing Swagger/OpenAPI specs instantly

Capture Traffic

Record real API calls and convert them to mocks

3Define Your First Endpoint

Let's create a simple endpoint. Fill in the basic details:

Example endpoint configuration:

Method: GET
Path: /api/users
Response Status: 200
Response Body:
{
  "users": [
    {
      "id": "{{uuid}}",
      "name": "{{randomName}}",
      "email": "{{randomEmail}}",
      "avatar": "https://avatars.githubusercontent.com/u/{{randomInt(1000, 9999)}}",
      "createdAt": "{{date('-1y', 'iso')}}"
    }
  ]
}

4Test Your Mock API

Your API is instantly deployed! Copy your unique URL and test it:

Your API URL:
https://your-api-name.mock.rest/api/users

Test with curl:

curl https://your-api-name.mock.rest/api/users

5View Live Response

See your mock API in action with real-time generated data:

Example response:

{
  "users": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "name": "John Smith",
      "email": "[email protected]",
      "avatar": "https://avatars.githubusercontent.com/u/4521",
      "createdAt": "2023-08-15T10:30:00Z"
    },
    {
      "id": "7c4a8d09-e168-40a3-b3fc-9e7d1f3e4b28",
      "name": "Sarah Johnson",
      "email": "[email protected]",
      "avatar": "https://avatars.githubusercontent.com/u/7890",
      "createdAt": "2023-09-22T14:15:00Z"
    }
  ]
}

Dynamic Template Functions

Generate realistic test data using Go templates

Identifiers

{{uuid}}Generates a UUID

Random Data

{{randomInt(min, max)}}Random integer
{{randomFloat(min, max)}}Random float
{{randomBool}}Random boolean
{{randomChoice("A", "B")}}Random selection
{{randomString(10)}}Random string

Person Data

{{randomName}}Random full name
{{randomEmail}}Random email
{{randomPhone}}Random US phone
{{randomPhone("UK")}}Random UK phone

Text

{{lorem(5)}}Lorem ipsum text

Business Data

{{randomCompany}}Random company
{{randomAddress}}Random address

Date & Time

{{now}}Current timestamp
{{now("unix")}}Unix timestamp
{{date("+1d")}}Tomorrow's date
{{date("-1w")}}One week ago
{{date("-1m", "unix")}}Month ago (Unix)

Animals (for fun!)

{{animal.dog}}Random dog breed
{{animal.cat}}Random cat breed

🎉 Congratulations!

You've successfully created and tested your first mock API. Here's what you can do next: