API Reference
Complete API documentation and usage examples
GET
/api/posts
Get all published posts
GET
/api/posts/:id
Get a single post by ID
POST
/api/auth/login
User login authentication
POST
/api/auth/register
User registration
Quick Start
Example API call
example.ts
// Example API request
const response = await fetch('/api/posts', {
headers: {
'Content-Type': 'application/json',
},
});
const posts = await response.json();