Test your front-end against a real API

Try it now

A hosted REST-API ready to respond to your AJAX requests

ReqRes simulates real application scenarios. If you want to test a user authentication system, ReqRes will respond to a successful login/register request with a token for you to identify a sample user, or with a 403 forbidden response to an unsuccessful login/registration attempt.

🚀

No Setup Required

Start testing immediately without any configuration or API keys

📊

Real Data

Get realistic responses with proper HTTP status codes and JSON data

🔐

Authentication Support

Test login/register flows with token-based authentication

Three Ways to Build with ReqRes

Modern JavaScript (Fetch)

If you, for example, want to create a fake user:

fetch("https://reqres.in/api/users", { method: "POST", headers: { "Content-Type": "application/json", "Authorization": "Bearer YOUR_API_KEY" }, body: JSON.stringify({ name: "paul rudd", movies: ["I Love You Man", "Role Models"] }) }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error("Error:", error));

For which the response to this request will be...

{ "name": "paul rudd", "movies": [ "I Love You Man", "Role Models" ], "id": "243", "createdAt": "2025-01-15T12:09:05.255Z" }

You can see that the API has sent us back whatever user details we sent it, plus an id & createdAt key for our use.

Async/Await JavaScript

If you've already got your own application entities, ie. "products", you can send them in the endpoint URL, like so:

async function getProduct() { try { const response = await fetch("https://reqres.in/api/products/3", { headers: { "Authorization": "Bearer YOUR_API_KEY" } }); const data = await response.json(); console.log(data); } catch (error) { console.error("Error:", error); } } getProduct();

It would be impossible for Reqres to know your application data, so the API will respond from a sample set of Pantone colour data:

{ "data": { "id": 3, "name": "true red", "year": 2002, "pantone_value": "19-1664" } }

It's entirely possible to get sample data into your interface in seconds!

Try ReqRes API Live

Click the buttons below to test different API endpoints

Click a button above to see the API response...