Todos API with Mock API Studio
The editor below is preset with two resources: users and todos, where each todo has a userId, title, completed flag, priority and due date. Press Create my API and you get /users and /todos endpoints where checking a box with PATCH actually sticks, so the todo app you are building behaves like it will in production.
- Check the sample: users and todos, linked by userId. Add fields your app needs (tags, notes) or rename title to text; the preview shows the inferred type of each field.
- Keep 25 records per resource (the free maximum) or lower the count, then press Create my API.
- Load one person's list with GET /todos?userId=1, and split it into tabs with &completed=false and &completed=true.
- Wire the checkbox: PATCH /todos/3 with {"completed": true} returns the updated todo, and the next GET shows it as done, even after a reload.
- Add and clear: POST /todos with {"userId":1,"title":"Ship it","completed":false,"priority":"high"} returns 201 with the new id; DELETE /todos/3 removes it.
What to know
The todo app is the standard exercise for a new framework, and the part that teaches the most is state that survives a round trip: optimistic toggles, rollbacks when a request fails, a refetch after delete. That only works against an API that stores what you send. Read-only fixtures return the same list every time, so a completed item comes back unchecked on refresh and the bug you are hunting is invisible.
Use query parameters for the views a real todo app has. ?completed=false is the Active tab, ?priority=high&priority=medium (repeat the key for either value) is a filter chip, ?dueDate_lte=2026-10-31 is a due-this-month view, and ?sort=dueDate&order=asc puts the nearest deadline first. ?q=retro searches every text field, so a search box needs no extra endpoint.
Errors come back in one JSON shape you can handle once. PATCH {"completed":"yes"} returns 422 with field "completed" because the field is typed as a boolean; a priority outside low, medium and high is rejected the same way; PATCH /todos/9999 returns 404. Setting a field to null in a PATCH removes it from the record, which is handy for clearing a due date.
Generated titles are placeholder sentences rather than real tasks, and due dates fall within the next year; your three sample todos stay at the top of the list with their exact text, so a test can rely on todo 1 being "Write the onboarding checklist". Reset to seed restores all 25 todos exactly, which keeps end-to-end tests repeatable.
Updated · Cosmovex
Questions
Does marking a todo completed actually save?
Yes. PATCH /todos/:id with {"completed": true} stores the change in your project, the data grid on this page updates live, and every later GET returns the new value until you change it again or press Reset to seed.
How do I get the todos of one user?
Filter on the link field: GET /todos?userId=2. Add &completed=false for the open ones. Nested routes such as /users/2/todos and ?_expand=user (to embed the user in each todo) are part of Pro.
Is this like the JSONPlaceholder todos endpoint?
The shape is similar (userId, id, title, completed) and the same requests work, but writes here are stored: a POST creates a todo you can GET afterwards and a DELETE really removes it. You also choose the fields, so priority and dueDate are part of the data.
Can I use it from a React, Vue or mobile app?
Yes. It is plain HTTPS with JSON bodies and Access-Control-Allow-Origin: *, so fetch or axios from localhost, a preview deploy or an emulator all work. Copy the fetch, axios or curl snippet from the Endpoints panel after you create the API.
What happens to my todos if I stop using the API?
Free projects keep their data as long as they get requests. After 48 hours without any (opening the project here also counts), the data is cleared and comes back from the seed when you open the project again; after 60 idle days the project is deleted. Pro projects are never cleared.
The free plan covers everything on this page. Mock API Studio Pro ($5/mo, billed monthly) is described on the Mock API Studio page.