{"version":"2026-04-02","generated_at":"2026-04-04T15:09:36.766Z","title":"ReqRes LLM Guide","intent":"Give LLM agents deterministic instructions to generate code, UIs, and tests against ReqRes.","base_urls":{"production":"https://reqres.in","app":"https://app.reqres.in","sandbox":"http://localhost:8000"},"docs":{"openapi":"/openapi.json","swagger":"/docs","llm_guide":"/llm","marketing":"https://reqres.in"},"demo":{"description":"Public teaching endpoints with fixture data. No authentication required. Perfect for learning HTTP, async patterns, and API consumption.","rate_limits":{"/api/users":"20 requests/minute per IP","/api/*":"100 requests/minute per IP"},"fixture_users":[{"id":1,"email":"george.bluth@reqres.in"},{"id":2,"email":"janet.weaver@reqres.in"},{"id":3,"email":"emma.wong@reqres.in"},{"id":4,"email":"eve.holt@reqres.in"},{"id":5,"email":"charles.morris@reqres.in"},{"id":6,"email":"tracey.ramos@reqres.in"},{"id":7,"email":"michael.lawson@reqres.in"},{"id":8,"email":"lindsay.ferguson@reqres.in"},{"id":9,"email":"tobias.funke@reqres.in"},{"id":10,"email":"byron.fields@reqres.in"},{"id":11,"email":"george.edwards@reqres.in"},{"id":12,"email":"rachel.howell@reqres.in"}],"endpoints":[{"id":"list_users","summary":"List demo users (paginated).","method":"GET","path":"/api/users","query":{"page":"integer >= 1 (default: 1)","per_page":"integer (default: 6)","delay":"integer seconds to delay response (useful for testing async/loading states)"},"success":{"status":200,"example":{"page":1,"per_page":6,"total":12,"total_pages":2,"data":[{"id":1,"email":"george.bluth@reqres.in","first_name":"George","last_name":"Bluth","avatar":"https://reqres.in/img/faces/1-image.jpg"}],"support":{"url":"https://benhowdle.im/first-cto-playbook?utm_source=reqres&utm_medium=json&utm_campaign=referral","text":"Become a better CTO. A playbook of war stories and practical advice from a two-time startup CTO."}}},"notes":["Use data[] for tables/cards; use total_pages for pagination.","Avatars are absolute URLs.","Add ?delay=3 to simulate slow network."]},{"id":"get_user","summary":"Get single user by ID.","method":"GET","path":"/api/users/:id","success":{"status":200,"example":{"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"...","text":"..."}}},"errors":[{"status":404,"example":{}}],"notes":["Returns empty {} with 404 if ID not found."]},{"id":"create_user","summary":"Create a user (echoed, not persisted).","method":"POST","path":"/api/users","body":{"name":"string","job":"string"},"success":{"status":201,"example":{"name":"morpheus","job":"leader","id":"123","createdAt":"2026-01-01T00:00:00.000Z"}},"notes":["Returns the input plus generated id and createdAt.","Data is NOT persisted - next GET will not show it."]},{"id":"update_user","summary":"Update a user (echoed, not persisted).","method":"PUT or PATCH","path":"/api/users/:id","body":{"name":"string","job":"string"},"success":{"status":200,"example":{"name":"morpheus","job":"zion resident","updatedAt":"2026-01-01T00:00:00.000Z"}}},{"id":"delete_user","summary":"Delete a user.","method":"DELETE","path":"/api/users/:id","success":{"status":204,"example":{}}},{"id":"list_resources","summary":"List color resources (Pantone colors).","method":"GET","path":"/api/unknown","query":{"page":"integer","per_page":"integer"},"success":{"status":200,"example":{"data":[{"id":1,"name":"cerulean","year":2000,"color":"#98B2D1","pantone_value":"15-4020"}]}},"notes":["Alternative resource endpoint demonstrating the same pagination pattern.","12 Pantone Color of the Year entries."]},{"id":"login","summary":"Login with fixture users.","method":"POST","path":"/api/login","body":{"email":"fixture user email","password":"any string"},"success":{"status":200,"example":{"token":"QpwL5tke4Pnpja7X4"}},"errors":[{"status":400,"example":{"error":"Missing password"}},{"status":400,"example":{"error":"user not found"}}],"notes":["ONLY fixture emails work (e.g., eve.holt@reqres.in).","Password is required but any value works.","Token is static per user, not a real JWT."]},{"id":"register","summary":"Register with fixture users.","method":"POST","path":"/api/register","body":{"email":"fixture user email","password":"any string"},"success":{"status":200,"example":{"id":4,"token":"QpwL5tke4Pnpja7X4"}},"errors":[{"status":400,"example":{"error":"Note: Only defined users succeed registration"}},{"status":400,"example":{"error":"Missing password"}}],"notes":["ONLY fixture emails work.","Non-fixture emails return 400 to demonstrate error handling."]}]},"starter_project":{"description":"Every new user gets a seeded project with a \"products\" collection and 3 sample records. Use this to test CRUD immediately after signup.","collection":{"name":"Products","slug":"products","schema":{"name":"string","price":"number","category":"string","in_stock":"boolean"},"sample_records":[{"name":"Wireless Headphones","price":59.99,"category":"Electronics","in_stock":true},{"name":"Leather Notebook","price":24,"category":"Stationery","in_stock":true},{"name":"Cold Brew Coffee Kit","price":38.5,"category":"Food & Drink","in_stock":false}]},"quick_start":["Sign up at https://app.reqres.in (free, no credit card)","Copy your manage key (pro_*) from the dashboard","GET /api/collections/products/records?project_id=YOUR_ID -H \"x-api-key: YOUR_KEY\"","POST /api/collections/products/records?project_id=YOUR_ID with {\"data\":{\"name\":\"Test\",\"price\":5.99,\"category\":\"New\",\"in_stock\":true}}","Changes persist. Fetch again and your new record is there."]},"project":{"description":"Project-scoped endpoints with real persistence. Requires an API key from https://app.reqres.in.","auth":{"api_keys":{"header":"x-api-key","obtain":"https://app.reqres.in/api-keys","types":{"manage_key":{"prefix":"pro_","permissions":["read","write","manage"],"browser_safe":false,"usage":"Server-side CRUD, admin operations, CI/CD"},"public_key":{"prefix":"pub_","permissions":["read"],"browser_safe":true,"usage":"Browser reads, start magic link login"}},"scope":"x-project-id header or project_id query param (optional, defaults to key owner project)"},"session_tokens":{"header":"Authorization: Bearer <session_token>","obtain":"POST /api/app-users/verify after magic link flow","usage":"App user endpoints under /app/*","expiry":"24 hours"}},"endpoints":[{"id":"custom_endpoints","summary":"Project-defined custom JSON responses.","method":"ANY","path":"/api/custom/{path}","auth":"x-api-key (public for GET, manage for writes)","notes":["Define responses in the dashboard at /custom-endpoints.","Supports all HTTP methods.","Returns X-RateLimit-* headers."]},{"id":"collections_list","summary":"List records in a collection.","method":"GET","path":"/api/collections/{slug}/records","auth":"x-api-key","query":{"page":"integer (default: 1)","limit":"integer (default: 50, max: 100)","search":"string (searches data fields)","order":"asc | desc","created_before":"ISO8601 datetime","created_after":"ISO8601 datetime"},"success":{"status":200,"example":{"data":[{"id":"rec_abc123","data":{"title":"Example","completed":false},"created_at":"2026-01-01T00:00:00Z","updated_at":"2026-01-01T00:00:00Z"}],"meta":{"page":1,"limit":50,"total":100,"pages":2}}}},{"id":"collections_get","summary":"Get single record.","method":"GET","path":"/api/collections/:slug/records/:id","auth":"x-api-key","success":{"status":200,"example":{"data":{"id":"rec_abc123","data":{"title":"Example"},"created_at":"...","updated_at":"..."}}},"errors":[{"status":404,"example":{"error":"not_found","message":"..."}}]},{"id":"collections_create","summary":"Create a record.","method":"POST","path":"/api/collections/{slug}/records","auth":"x-api-key (manage)","body":{"data":"{ ...fields matching collection schema }"},"success":{"status":201,"example":{"data":{"id":"rec_new123","data":{"title":"New item"},"created_at":"...","updated_at":"..."}}},"errors":[{"status":400,"example":{"error":"validation_error","message":"..."}},{"status":403,"example":{"error":"records_limit_reached","message":"...","limit":1000,"current":1000,"upgrade_url":"https://app.reqres.in/upgrade"}}]},{"id":"collections_update","summary":"Update a record (full replace with PUT, partial with PATCH).","method":"PUT or PATCH","path":"/api/collections/:slug/records/:id","auth":"x-api-key (manage)","body":{"data":"{ ...fields }"},"success":{"status":200,"example":{"data":{"id":"...","data":{},"updated_at":"..."}}}},{"id":"collections_delete","summary":"Delete a record.","method":"DELETE","path":"/api/collections/:slug/records/:id","auth":"x-api-key (manage)","success":{"status":204}}]},"app_users":{"description":"End-user authentication via magic links. App users have scoped access to their own records.","flow":["1. POST /api/app-users/login with email → sends magic code to email","2. POST /api/app-users/verify with token → returns session_token","3. Use Authorization: Bearer <session_token> for /app/* endpoints"],"endpoints":[{"id":"app_user_login","summary":"Start magic link login flow.","method":"POST","path":"/api/app-users/login","auth":"x-api-key (public recommended)","body":{"email":"string","project_id":"optional if key is project-scoped"},"success":{"status":200,"example":{"data":{"sent":true,"expires_in_minutes":15,"message":"Magic code sent to email"}}},"notes":["Rate limited: 1 request per 2 minutes per email.","In test mode (MAGIC_LINK_TEST_MODE=true), token is returned in response."]},{"id":"app_user_verify","summary":"Exchange magic token for session.","method":"POST","path":"/api/app-users/verify","auth":"x-api-key (public)","body":{"token":"8-digit code from email"},"success":{"status":200,"example":{"data":{"session_token":"hex_string...","expires_at":"2026-02-09T12:00:00Z","email":"user@example.com"}}}},{"id":"app_user_me","summary":"Get current app user info.","method":"GET","path":"/app/me","auth":"Authorization: Bearer <session_token>","success":{"status":200,"example":{"data":{"id":"uuid","email":"user@example.com","status":"active"}}}},{"id":"app_collections","summary":"CRUD on user-scoped records.","method":"GET, POST, PUT, PATCH, DELETE","path":"/app/collections/:slug/records[/{id}]","auth":"Authorization: Bearer <session_token>","notes":["Records are automatically scoped to the logged-in app user.","App users cannot see or modify other users' records."]}]},"plans":{"free":{"price":"$0/mo","requests_per_day":250,"collections":3,"records":100,"app_users":10},"lite":{"price":"$5/mo","requests_per_day":1000,"collections":3,"records":100,"app_users":10},"dev":{"price":"$12/mo","requests_per_day":5000,"collections":5,"records":5000,"app_users":200},"pro":{"price":"$29/mo","requests_per_day":25000,"collections":20,"records":50000,"app_users":1000},"note":"Free tier requires no credit card. Limits reset at midnight UTC."},"errors":{"common":[{"status":400,"code":"validation_error","causes":["Invalid JSON","Schema mismatch","Missing required fields"]},{"status":401,"code":"unauthorized","causes":["Missing API key","Invalid API key","Expired session token"]},{"status":403,"code":"*_limit_reached","causes":["Plan limits exceeded"],"note":"Response includes limit, current, and upgrade_url fields."},{"status":404,"code":"not_found","causes":["Record does not exist","Collection does not exist"]},{"status":429,"code":"rate_limited","causes":["Too many requests"],"note":"Check Retry-After header for wait time in seconds."}],"shape":{"error":"error_code (string)","message":"Human-readable message (string)","hint":"Actionable suggestion (optional string)","limit":"Plan limit (optional number)","current":"Current usage (optional number)","upgrade_url":"URL to upgrade (optional string)"}},"guardrails":["Always send JSON bodies with Content-Type: application/json on POST/PUT/PATCH.","Check response.ok before parsing JSON; handle error responses gracefully.","Respect rate limits; implement exponential backoff on 429 with Retry-After header.","Use fixture emails (e.g., eve.holt@reqres.in) for demo /api/login and /api/register.","Do not invent emails for demo auth - only fixture emails return tokens.","Avatars in responses are absolute URLs; use them directly in <img> tags.","Demo endpoints echo data but do not persist - use /api/collections/* for real storage.","POST and PUT to /api/collections/* require body wrapped in {\"data\": {...fields}}. Omitting the \"data\" wrapper returns 400.","Do not scrape HTML pages; use JSON endpoints only.","When unsure, fetch /openapi.json or /llm for the current API contract."],"samples":{"demo_list_users":"curl \"https://reqres.in/api/users?page=1\"","demo_list_with_delay":"curl \"https://reqres.in/api/users?page=1&delay=3\"","demo_get_user":"curl \"https://reqres.in/api/users/2\"","demo_create_user":"curl -X POST https://reqres.in/api/users -H 'Content-Type: application/json' -d '{\"name\":\"morpheus\",\"job\":\"leader\"}'","demo_login":"curl -X POST https://reqres.in/api/login -H 'Content-Type: application/json' -d '{\"email\":\"eve.holt@reqres.in\",\"password\":\"pistol\"}'","project_list_records":"curl 'https://reqres.in/api/collections/products/records?page=1' -H 'x-api-key: YOUR_API_KEY'","project_create_record":"curl -X POST https://reqres.in/api/collections/products/records -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' -d '{\"data\":{\"name\":\"New Product\",\"price\":9.99,\"category\":\"Test\",\"in_stock\":true}}'","app_user_login":"curl -X POST https://reqres.in/api/app-users/login -H 'x-api-key: YOUR_PUBLIC_KEY' -H 'Content-Type: application/json' -d '{\"email\":\"user@example.com\"}'"},"flows":[{"id":"ui_user_directory","title":"Build a paginated user list","steps":["GET /api/users?page=1 → render data[] in table/cards","Show total_pages for pagination controls","On row click, GET /api/users/:id for detail view","Handle 404 by showing \"User not found\""]},{"id":"ui_crud_forms","title":"Build create/update forms","steps":["POST /api/users with {name, job} → show createdAt on success","PUT/PATCH /api/users/:id on edit → show updatedAt","Handle 400 by showing validation errors"]},{"id":"ui_auth_flow","title":"Implement demo login","steps":["GET /api/users to populate email dropdown with fixture emails","POST /api/login with {email, password} → store token on success","Show friendly error for 400 responses (missing password, user not found)"]},{"id":"project_crud","title":"Build real CRUD with persistence","steps":["Get API key from https://app.reqres.in/api-keys","Include x-api-key header on all requests","GET /api/collections/{slug}/records for list","POST with {data: {...}} for create","PUT/PATCH /api/collections/:slug/records/:id for update","DELETE for remove","Handle 403 plan limits by showing upgrade prompt"]},{"id":"app_user_auth","title":"Implement app user magic link auth","steps":["POST /api/app-users/login with {email} using public key","User receives 8-digit code via email","POST /api/app-users/verify with {token} → get session_token","Store session_token securely (not localStorage in production)","Use Authorization: Bearer <token> for /app/* endpoints","Handle 401 by redirecting to login"]}],"example_apps":[{"name":"Task Manager","tags":"Auth + Scoped CRUD","live_url":"https://demo.reqres.in","source_url":"https://github.com/benhowdle89/reqres-demo-app","demonstrates":["App-user magic code login","Session-based auth (Bearer token)","Scoped record access per user","Full CRUD with pagination"]},{"name":"Waitlist App","tags":"Public Signup + Admin Dashboard","live_url":"https://reqres-waitlist-demo.reqres.workers.dev","source_url":"https://github.com/benhowdle89/reqres-waitlist-demo","demonstrates":["API key auth for public writes (project key)","Magic code admin login (App Users)","Search and filter queries (data_contains, search)","Duplicate detection before record creation","Record status updates (PUT with full data merge)"]}]}