← Back to Documentation
API Reference
Complete REST and GraphQL API documentation with request/response examples.
REST Endpoints
HTTP REST API endpoints for platform operations
Users
GET
/api/usersGet all users
// Response
{
"users": [
{
"id": "1",
"name": "John Doe",
"email": "john@example.com",
"role": "admin",
"createdAt": "2024-01-01T00:00:00Z"
}
],
"total": 1
}GET
/api/users/:idGet user by ID
// Response
{
"id": "1",
"name": "John Doe",
"email": "john@example.com",
"role": "admin",
"posts": []
}POST
/api/usersCreate new user
// Request Body
{
"name": "Jane Smith",
"email": "jane@example.com",
"password": "securepassword"
}// Response (201 Created)
{
"id": "2",
"name": "Jane Smith",
"email": "jane@example.com",
"role": "user"
}PATCH
/api/users/:idUpdate user
// Request Body
{
"name": "Jane Doe"
}DELETE
/api/users/:idDelete user
Posts
GET
/api/postsGet all posts (paginated)
// Query Parameters
?page=1&limit=10&sort=createdAt&order=desc
POST
/api/postsCreate new post
{
"title": "My First Post",
"content": "This is the content...",
"published": true
}