Mock a paginated JSON API response

A GET mock that returns a page of three fake records alongside page, per_page, total, and next.

Stands in for a third-party API endpoint.

Response payload

{
  "data": [
    {
      "id": "{{faker.uuid}}",
      "name": "{{faker.name}}",
      "email": "{{faker.email}}"
    },
    {
      "id": "{{faker.uuid}}",
      "name": "{{faker.name}}",
      "email": "{{faker.email}}"
    },
    {
      "id": "{{faker.uuid}}",
      "name": "{{faker.name}}",
      "email": "{{faker.email}}"
    }
  ],
  "page": 1,
  "per_page": 3,
  "total": 42,
  "next": "https://quickmock.dev/m/YOUR-SLUG?page=2"
}

Fields worth knowing

Field What it means
data An array of fake records, three per call via {{faker.*}} tokens.
page The current page number, hardcoded to 1.
per_page The page size, hardcoded to 3.
total The total record count across all pages, hardcoded to 42.
next The URL for the next page — edit YOUR-SLUG to the mock's real slug.

Create the mock

curl -X POST https://quickmock.dev/api/mocks \
  -H 'Content-Type: application/json' \
  -d '{
  "method": "GET",
  "response_status": 200,
  "content_type": "application/json",
  "response_body": "{\"data\":[{\"id\":\"{{faker.uuid}}\",\"name\":\"{{faker.name}}\",\"email\":\"{{faker.email}}\"},{\"id\":\"{{faker.uuid}}\",\"name\":\"{{faker.name}}\",\"email\":\"{{faker.email}}\"},{\"id\":\"{{faker.uuid}}\",\"name\":\"{{faker.name}}\",\"email\":\"{{faker.email}}\"}],\"page\":1,\"per_page\":3,\"total\":42,\"next\":\"https://quickmock.dev/m/YOUR-SLUG?page=2\"}"
}'

Call it

curl https://quickmock.dev/m/<slug>

What you get

GET /m/<slug> -> 200 a paginated list of 3 fake records
page/per_page/total/next describe the rest of the collection

How this differs from the real thing

The three records are random and regenerate on every call instead of coming from a stable dataset, and next is a fixed string rather than a working link — replace YOUR-SLUG with the mock's real slug to make it usable.

Ready to use it?

Open it in the mock builder to tweak first

Pairs well with this guide: Return realistic fake data

← All templates