API Overview¶
Bookcard provides a RESTful API for programmatic access to your library. The API follows REST conventions and uses JSON for request and response bodies.
Base URL¶
For production deployments, replace localhost:8000 with your domain.
Authentication¶
Most API endpoints require authentication. See the Authentication Guide for details.
API Reference¶
The complete API reference with interactive documentation is available at:
- Interactive API Reference - Swagger UI with all endpoints
/docs- FastAPI's built-in Swagger UI (when running the application)
Common Endpoints¶
Books¶
GET /api/books- List booksGET /api/books/{id}- Get book detailsPOST /api/books- Upload a bookDELETE /api/books/{id}- Delete a book
Shelves¶
GET /api/shelves- List shelvesPOST /api/shelves- Create a shelfGET /api/shelves/{id}- Get shelf detailsPATCH /api/shelves/{id}- Update a shelfDELETE /api/shelves/{id}- Delete a shelf
Authentication¶
POST /api/auth/register- Register a new userPOST /api/auth/login- Login and get JWT tokenGET /api/auth/me- Get current user info
Response Format¶
Success Response¶
Error Response¶
Rate Limiting¶
Currently, there are no rate limits on the API. This may change in future versions.
Versioning¶
API versioning is handled through the OpenAPI schema. Check the /openapi.json endpoint for the current API version and available endpoints.