https://dummyapi-backend.onrender.com/api
CodeSmash โ†—

โœ…Todos โ€“ Docs

The todos endpoint contains 200 todo entries with completion status linked to specific users.

Base URL: https://dummyapi-backend.onrender.com/api
GET

Get all todos.

๐Ÿ”—

GET https://dummyapi-backend.onrender.com/api/todos

?limit?skip
fetch('https://dummyapi-backend.onrender.com/api/todos')
.then(res => res.json())
.then(console.log);
GET

Get a single todo.

๐Ÿ”—

GET https://dummyapi-backend.onrender.com/api/todos/:id

fetch('https://dummyapi-backend.onrender.com/api/todos/:id')
.then(res => res.json())
.then(console.log);
GET

Get todos for a specific user.

๐Ÿ”—

GET https://dummyapi-backend.onrender.com/api/todos/user/:id

fetch('https://dummyapi-backend.onrender.com/api/todos/user/:id')
.then(res => res.json())
.then(console.log);
POST

Create a new todo (demo).

๐Ÿ”—

GET https://dummyapi-backend.onrender.com/api/todos

fetch('https://dummyapi-backend.onrender.com/api/todos', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({})
})
.then(res => res.json())
.then(console.log);
PUT

Update a todo.

๐Ÿ”—

GET https://dummyapi-backend.onrender.com/api/todos/:id

fetch('https://dummyapi-backend.onrender.com/api/todos/:id', {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({})
})
.then(res => res.json())
.then(console.log);
DELETE

Delete a todo.

๐Ÿ”—

GET https://dummyapi-backend.onrender.com/api/todos/:id

fetch('https://dummyapi-backend.onrender.com/api/todos/:id', {
method: 'DELETE',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({})
})
.then(res => res.json())
.then(console.log);