API v2 Overview
API v2 is the backend for the Publica.la mobile reading apps (Fenice). It powers authentication, library browsing, content download, reader settings, search, and tenant discovery.
API v2 is the backend for the Publica.la mobile reading apps (Fenice). It powers authentication, library browsing, content download, reader settings, search, and tenant discovery.
API v2 uses JWT tokens for authentication. Users authenticate via magic link (email code) or social login, and receive a JWT token that must be included in all subsequent requests.
Commerce-related fields surfaced by storefront endpoints, plus the in-app purchase redirect that turns a purchase_link into a completed transaction.
Creates a reader session for the mobile app. Returns content URLs needed to render the publication, varying by format (PDF, EPUB, Audiobook). This replaces the API v1 encrypted-token flow by using JWT authentication directly.
Returns metadata and file URLs needed to download content for offline reading. The response structure varies by content type.
Endpoints for in-app help and feedback. Both endpoints use multi-tenant mode (do NOT send X-Farfalla-Tenant-Id).
AI-powered reader features: translate, text-to-speech, dictionary, and text analysis (explain/expand/summarize). All endpoints use single-tenant mode (require X-Farfalla-Tenant-Id) and require the reader-token header.
Searches for text within the current issue using SingleStore full-text search. Returns highlighted snippets with location information for navigating to matches. Requires the reader-token header.
Endpoints for browsing the content library within a specific tenant. All library endpoints use single-tenant mode and require the X-Farfalla-Tenant-Id header.
Endpoints for managing user highlights and annotations within the reader. All endpoints use single-tenant mode (require X-Farfalla-Tenant-Id) and require the reader-token header.
Endpoints for reader sessions, configuration, reading position persistence, text search, and content download. All endpoints use single-tenant mode and require the X-Farfalla-Tenant-Id header.
Get Reader Settings
Saves the user's reading position. The payload structure varies by content type.
Endpoints for searching content within a single tenant or across all tenants the user belongs to.
Endpoints for listing tenants (stores) the authenticated user could sign up for.
Endpoints for user profile, continue reading, and push notification management.