A todo list is the usual first app in a new framework, a workshop or a coding exercise, and it needs the five classic REST calls. The todo template gives you these endpoints behind a real URL, so nobody has to run a local server first.
What you get
The template creates a project with the base path /todos-api and 5 endpoints. Each endpoint has one ready response, so the API answers as soon as the project exists.
| Method | Path | What it answers |
|---|---|---|
GET |
/todos |
200 with eight generated todos. |
GET |
/todos/:id |
200 with one todo. The id is the one from the path. |
POST |
/todos |
201 with the title from the request body, a generated id and done set to false. |
PATCH |
/todos/:id |
200 with done set to true, or to false if the request body says so. |
DELETE |
/todos/:id |
204 without a body. |
A todo in the list has id, title, done, priority (low, medium or high) and dueDate, a date within the next 30 days. The single todo adds notes and createdAt. Titles and notes are generated filler sentences.
Sample response
$ curl -s -X POST $URL/todos-api/todos \
-H "Content-Type: application/json" \
-d '{"title":"Renew the certificate","priority":"high"}'
{
"id": "2764",
"title": "Renew the certificate",
"done": false,
"priority": "high",
"createdAt": "2026-11-15T09:12:44Z"
}
title and priority come from your request. The id and createdAt are generated on every call, and so are all values in the list and in the single todo.
How to start
- Sign up at
https://app.mockhop.com/register. The quickstart explains the account and the address of your organization. - Open Projects and select Start from a template.
- Choose Example todo list and select Use template.
Then call the mock. Replace acme with your organization's address. Your mocks answer from outside once you've confirmed your email address.
$ URL=https://acme.mockhop.cloud
$ curl -s $URL/todos-api/todos
$ curl -s -X PATCH $URL/todos-api/todos/3 \
-H "Content-Type: application/json" \
-d '{"done":true}'
The first call returns eight todos. The second returns todo 3 with done set to true and an updatedAt time.
What to do next
- Change the responses. Open an endpoint and edit the status code, headers and body of its response, or add more responses with matching rules.
- Add error cases and delays. For example a
422for a todo without a title, a404for an unknown id, or a slow list to check your loading state. See Simulate API errors, timeouts and rate limits. - Use scenarios for flows. For example
GET /todos/:idthat returnsdone: falsefirst anddone: trueon the next call, to test a view that reloads after a change. See Scenarios; scenarios are included from the Pro plan. - Export the project. Under Import/Export you can download the project as an OpenAPI 3.0 file.
Good to know
- Responses are generated per request and the mock keeps no state. A todo you create is not in the list, and a deleted todo can still be fetched.
PATCH /todos/:iddoes not truly toggle anything. It answersdone: trueunless your body contains"done": false, and a laterGET /todos/:idreturns a randomdonevalue again.- Without a
titlein the body,PATCHreturns a generated title, andPOSTfalls back to a fixed example title and the prioritymedium. GET /todosalways returns eight todos with the ids1to8. There is no paging or filtering.- The template creates a new project, and no other project in your organization may use the base path
/todos-api. The Free plan includes one project. - You can change or delete the project and each of its endpoints at any time.
New to Mockhop? Start with the quickstart. Plans: pricing.