Skip to main content

API Overview

Sensemaker exposes a GraphQL API for all data operations and a REST API for authentication and health checks.

Endpoints

EndpointTypePurpose
/api/graphqlGraphQLAll data queries and mutations
/api/auth/loginREST POSTEmail/password authentication
/api/auth/registerREST POSTUser registration
/api/auth/googleREST POSTGoogle OAuth sign-in
/api/healthREST GETBasic health check
/api/health/deepREST GETFull dependency health check
/api/swaggerSwagger UIInteractive API documentation

Authentication

All API requests (except auth and health endpoints) require a JWT bearer token:

Authorization: Bearer <your-jwt-token>

Obtain a token by calling the login endpoint or through the login GraphQL mutation.

GraphQL Schema

The GraphQL API is code-first (auto-generated from NestJS decorators). Key types:

Queries

  • viewer — Current authenticated user
  • libraryItems — Paginated library with filters and search
  • highlights — User's highlights with filtering
  • tags — User's tags
  • topics — User's topics

Mutations

  • login / register — Authentication
  • saveUrl — Save an article by URL
  • createHighlight — Create a highlight on an article
  • createTag / updateTag / deleteTag — Tag management
  • subscribeToRssFeed — Subscribe to an RSS feed
  • createNewsletterSubscription — Create a newsletter inbox

Rate Limiting

API requests are rate-limited to prevent abuse:

Endpoint CategoryLimit
General API requests100 requests/minute
Login / Register5 requests/minute
Resend verification3 requests per 5 minutes