canonical: https://jentic.com/apis/papra.app/main

# Papra App Papra API

Jentic publishes the only available OpenAPI specification for Papra API, keeping it validated and agent-ready. The Papra API enables document management for organizations including document upload with OCR, search, tagging, activity tracking, and organization management. It powers paperless workflows, document archiving, and intelligent document organization with automated tagging rules.

## For AI agents

Manage documents, organizations, tags, and search across 18 endpoints with OCR and activity tracking.

## Scope

Does not handle document editing, collaboration comments, or version control - use for document upload, search, tagging, and activity tracking only.

## Capabilities

- Create and manage organizations with hierarchical structure
- Upload documents with automatic OCR language detection
- Search documents with full-text search and pagination
- Create, update, and assign tags to documents with color coding
- Apply automated tagging rules to documents
- Download document files and retrieve metadata
- Track document activity and audit logs
- Retrieve storage statistics and document counts
- Manage deleted documents in trash

## Use cases

### Document Upload with OCR

Upload documents with automatic OCR processing. POST /api/organizations/{organizationId}/documents accepts multipart/form-data with file and optional ocrLanguages parameter. The API extracts text content and stores it searchably, enabling paperless workflows and document digitization.

Example prompt: POST /api/organizations/{organizationId}/documents with file and ocrLanguages to upload and extract text

### Intelligent Document Search

Search documents with full-text search capabilities and pagination. GET /api/organizations/{organizationId}/documents/search accepts searchQuery with pageIndex and pageSize parameters, returning matched documents with total count. Essential for finding documents across large archives.

Example prompt: GET /api/organizations/{organizationId}/documents/search?searchQuery=invoice&pageIndex=0&pageSize=50

### Tag-Based Document Organization

Create, manage, and assign tags to documents with color coding and descriptions. POST /api/organizations/{organizationId}/tags creates tags, POST /documents/{documentId}/tags assigns them, and DELETE unassigns. Automated tagging rules can be applied via POST /tagging-rules/{taggingRuleId}/apply.

Example prompt: POST /api/organizations/{organizationId}/tags to create, then POST /documents/{documentId}/tags to assign

### Document Activity Auditing

Track document activity and audit logs with pagination. GET /api/organizations/{organizationId}/documents/{documentId}/activity returns chronological activity events including uploads, edits, tag assignments, and views. Critical for compliance and document lifecycle tracking.

Example prompt: GET /api/organizations/{organizationId}/documents/{documentId}/activity?pageIndex=0&pageSize=50

### Agent-Driven Document Management via Jentic

An AI agent managing paperless workflows can upload documents, search content, apply tags, and track activity through Jentic without exposing bearer authentication tokens in agent context. Jentic resolves intents like 'upload this document' to the right Papra endpoint.

Example prompt: Search Jentic for 'upload document with ocr', load the POST /documents schema, and execute

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /api/api-keys/current | Retrieve current API key details |
| GET | /api/organizations | List all accessible organizations |
| POST | /api/organizations | Create a new organization |
| POST | /api/organizations/{organizationId}/documents | Upload a document with OCR |
| GET | /api/organizations/{organizationId}/documents | List organization documents with pagination |
| GET | /api/organizations/{organizationId}/documents/search | Search documents with full-text query |
| GET | /api/organizations/{organizationId}/documents/statistics | Get storage statistics |
| GET | /api/organizations/{organizationId}/documents/{documentId} | Retrieve document metadata |
| PATCH | /api/organizations/{organizationId}/documents/{documentId} | Update document metadata |
| DELETE | /api/organizations/{organizationId}/documents/{documentId} | Delete a document |
| GET | /api/organizations/{organizationId}/documents/{documentId}/file | Download document file |
| GET | /api/organizations/{organizationId}/documents/{documentId}/activity | Retrieve document activity log |
| GET | /api/organizations/{organizationId}/tags | List all tags |
| POST | /api/organizations/{organizationId}/tags | Create a tag |
| PUT | /api/organizations/{organizationId}/tags/{tagId} | Update a tag |
| DELETE | /api/organizations/{organizationId}/tags/{tagId} | Delete a tag |
| POST | /api/organizations/{organizationId}/documents/{documentId}/tags | Assign a tag to a document |
| POST | /api/organizations/{organizationId}/tagging-rules/{taggingRuleId}/apply | Apply a tagging rule to documents |

## Key resources

- **Organization** — Organization management with hierarchical structure and members
- **Document** — Document upload, retrieval, search, and metadata management with OCR
- **Tag** — Tag creation, management, and assignment to documents
- **Activity** — Document activity tracking and audit logs

## Why Jentic

- **Setup:** Wiring the Papra API by hand means setting up its bearer auth, shaping the per-organization document routes, and handling upload, search, and retries yourself. Through Jentic you install once, import Papra from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** Papra puts the organization id and document id in the URL path (/api/organizations/{organizationId}/documents/{documentId}), so a rule can pin your agent to one organization: it can upload, search, and read documents there and nothing else. You choose the operations it may call, so destructive ones like document deletion are not included unless you add them.
- **Credential handling:** Your Papra bearer token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'upload a document' or 'search documents in an organization', and Jentic returns the matching Papra operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Dropbox API** — Cloud storage and file sharing platform with file management and collaboration features
- **Box API** — Enterprise content management platform with advanced security and workflow features

## FAQ

### Why is there no official OpenAPI spec for Papra API?

Papra does not publish a complete OpenAPI specification for their API. Jentic generates and maintains this spec so that AI agents and developers can call Papra API via structured tooling. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Papra API use?

The Papra API uses bearer token authentication. Through Jentic, the token is stored in the encrypted vault and injected at execution time so it never enters the agent's prompt context.

### How does OCR work when uploading documents?

POST /api/organizations/{organizationId}/documents accepts a file via multipart/form-data with an optional ocrLanguages parameter to specify the language(s) for text extraction. The API automatically processes the document and extracts searchable text content.

### Can I search document content?

Yes. GET /api/organizations/{organizationId}/documents/search accepts a searchQuery parameter and returns all documents matching the full-text search with pagination support. The search covers OCR-extracted text and document metadata.

### How do automated tagging rules work?

POST /api/organizations/{organizationId}/tagging-rules/{taggingRuleId}/apply triggers an automated tagging task that applies predefined rules to documents. The endpoint returns a taskId for tracking the async operation.

### Can I track document changes?

Yes. GET /api/organizations/{organizationId}/documents/{documentId}/activity returns a paginated activity log with timestamps and event types including uploads, edits, tag assignments, and views. Essential for compliance and audit trails.

### Can I limit what my agent is allowed to do with the Papra API?

Yes. Because Papra puts the organization id and document id in the URL path, such as /api/organizations/{organizationId}/documents/{documentId}, your self-hosted Jentic One instance lets you write a rule that pins the agent to a single organization, where it can upload, search, and read documents and nothing else. You decide which operations it may call, so destructive ones like the DELETE on a document are left out unless you explicitly add them. Your own rules govern which endpoints and credentials the agent uses at execution time.
