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

๐Ÿ‘คUsers โ€“ Docs

The users endpoint offers a dataset of 200 realistic user profiles โ€” including address, company info, bank details, and more โ€” great for testing user-driven UIs.

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

Get all users. Supports ?limit=30&skip=0&sortBy=age&order=desc.

๐Ÿ”—

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

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

Get a single user by ID.

๐Ÿ”—

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

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

Get all posts by a user.

๐Ÿ”—

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

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

Get all carts of a user.

๐Ÿ”—

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

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

Get all todos by a user.

๐Ÿ”—

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

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

Create a new user (demo).

๐Ÿ”—

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

fetch('https://dummyapi-backend.onrender.com/api/users', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"firstName":"John","lastName":"Doe","email":"john@example.com"})
})
.then(res => res.json())
.then(console.log);
PUT

Update a user.

๐Ÿ”—

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

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

Delete a user (soft delete).

๐Ÿ”—

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

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