Skip to main content

Polpo API v1 (Reader)

Polpo is the internal API used by the Volpe reader. It handles reader session initialization, user notes/highlights, in-reader search, and AI-powered integrations (translate, listen, dictionary, explain/expand/summarize).

Key characteristics:

  • Reader session authentication via encrypted reader-token header
  • Content encryption for text payloads (two-layer validation: encrypted then decrypted)
  • Format-aware responses (PDF, EPUB, Audiobook)
  • AI integrations for translate, text-to-speech, dictionary, and text analysis
Export all API v2 documentation (5 sections) as a single Markdown file.

Base URL

https://{store_final_domain}/api/v1/

All routes are prefixed with /api/v1/ and handled by the api middleware group.


Authentication

Most endpoints require a valid reader session token passed via the reader-token header.

reader-token: {encrypted_session_token}

The token is obtained by calling POST /api/v1/sessions (the only unauthenticated endpoint alongside GET /api/v1/issue-text-content/{id}).

The readerSessionMiddleware decrypts the token, loads the ReaderSession, sets the tenant context, and authenticates the user. Returns 403 if the token is missing, invalid, or expired.


Content Encryption

Integration endpoints (translate, listen, dictionary, AI) use two-layer validation:

  1. Layer 1: Validates the encrypted payload size (larger limit due to encryption overhead)
  2. Layer 2: Decrypts the content, then validates the plaintext size (smaller limit)

Encryption is enabled for manifest versions >= 2.0.0 using ContentEncryptionService with tenant_id, issue_id, and an IV seed. Older clients send plaintext and are handled transparently.


Endpoint Summary

Sessions

MethodEndpointAuthDescription
POST/sessionsNoneInitialize reader session, get content URLs
GET/sessions/{id}NoneRetrieve session details
DELETE/sessions/{id}NoneDelete session

Notes

MethodEndpointAuthDescription
GET/notesreader-tokenList user's notes for current issue
POST/notesreader-tokenCreate a highlight/annotation
GET/notes/{id}reader-tokenGet a single note
PATCH/notes/{id}reader-tokenUpdate note color or annotation
DELETE/notes/{id}reader-tokenDelete a note
MethodEndpointAuthDescription
GET/issue-text-content?search=...reader-tokenFull-text search within issue
GET/issue-text-content/{id}?issue_id=...NoneGet all indexed text content

Integrations

MethodEndpointAuthDescription
POST/integrations/translatereader-tokenTranslate selected text
POST/integrations/listenreader-tokenText-to-speech
POST/integrations/dictionaryreader-tokenDefine a word or phrase
GET/integrations/ai-integrationsreader-tokenList available AI actions
POST/integrations/ai-integrationsreader-tokenPerform AI action (explain/expand/summarize)
PUT/integrations/ai-integrationsreader-tokenRate AI response

Next Steps

  • Sessions - Reader session initialization and content URL generation
  • Notes - Highlights and annotations
  • Search - Full-text search within issues
  • Integrations - Translate, listen, dictionary, and AI features
X

Graph View