REST API
API Documentation
MySocialSaves exposes a REST API that powers both the web client and is ready for a future mobile app.
Interactive Swagger UI
The API project ships with Swagger UI (OpenAPI). When running locally, navigate to the API server to browse and test all endpoints interactively.
http://localhost:5120/swagger
Replace the host and port with wherever the API is deployed.
Authentication
Most endpoints require an authenticated session. The API uses cookie-based authentication.
- POST
/api/auth/loginwith your email and password to receive a session cookie. - Include that cookie on all subsequent requests.
- Admin endpoints additionally require either the
Adminrole or anX-Admin-Api-Keyheader.
Key endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/savedposts | List saved posts (paginated, filterable) |
| GET | /api/savedposts/{id} | Get a single post by ID |
| DELETE | /api/savedposts/{id} | Delete a post |
| GET | /api/savedposts/export | Export all posts as CSV |
| POST | /api/auth/register | Register a new account |
| POST | /api/auth/login | Sign in |
| POST | /api/auth/magic-link | Request a magic link email |
| POST | /api/admin/import | Trigger a Reddit import (admin) |
Rate limits
- Auth endpoints (login, register, magic link): 5 requests / minute
- All other authenticated endpoints: 30 requests / minute
Full schema and request/response examples are available in Swagger UI. The OpenAPI spec is auto-generated from the API source code.