Base URL
| Environment | URL |
|---|---|
| Development | http://localhost:3000/api |
| Production | https://recipe-room.vercel.app/api |
Authentication
Protected endpoints require a Bearer token in theAuthorization header:
Error Format
All errors follow a consistent structure:| Code | Status | Description |
|---|---|---|
VALIDATION_ERROR | 400 | Invalid input data |
UNAUTHORIZED | 401 | Missing or invalid token |
FORBIDDEN | 403 | Insufficient permissions |
NOT_FOUND | 404 | Resource not found |
CONFLICT | 409 | Duplicate resource |
INTERNAL_ERROR | 500 | Server error |
Pagination
List endpoints support pagination via query parameters:| Parameter | Default | Description |
|---|---|---|
page | 1 | Page number |
limit | 20 | Items per page |
pagination object:
Endpoint Groups
Authentication
Register, login, logout
Users
Profiles, follow, followers
Recipes
CRUD, favorites, featured
Posts
CRUD, favorites, comments
Collections
CRUD, items, favorites
Other
Upload, search, notifications