---
title: "Upload Document"
method: POST
path: "/v1/document"
tags: ["v1", "Document"]
---

# Upload Document

`POST /v1/document`

Upload and process documents using the pluggable architecture.

    **Authentication Required**: Bearer token or API key

    **Supported Providers**: TensorLake.ai, Reducto AI, Gemini Vision (fallback)

    **Features**:
    - Multi-tenant organization/namespace scoping
    - Temporal workflow for durable execution
    - Real-time WebSocket status updates
    - Integration with Parse Server (Post/PostSocial/PageVersion)
    - Automatic fallback between providers

## Response `200`

Document upload started

- DocumentUploadResponse
  - `code` integer — HTTP status code
  - `status` string — 'success', 'processing', 'error', etc.
  - `message` string, nullable — Human-readable status message
  - `error` string, nullable — Error message if failed
  - `details` unknown
  - `document_status` DocumentUploadStatus, required
    - `progress` number, required — 0.0 to 1.0 for percentage
    - `current_page` integer, nullable
    - `total_pages` integer, nullable
    - `current_filename` string, nullable
    - `upload_id` string, nullable
    - `page_id` string, nullable — Post ID in Parse Server (user-facing page ID)
    - `status_type` 'processing' | 'completed' | 'failed' | 'not_found' | 'queued' | 'cancelled'
    - `error` string, nullable — Error message if failed
  - `memory_items` AddMemoryItem[] — List of memory items created from the document
    - `memoryId` string, required
    - `createdAt` string, date-time, required
    - `objectId` string, required
    - `memoryChunkIds` string[]
  - `memories` AddMemoryItem[], nullable — For backward compatibility
    - `memoryId` string, required
    - `createdAt` string, date-time, required
    - `objectId` string, required
    - `memoryChunkIds` string[]

## Other responses

- `202` — Document processing queued
- `400` — Bad request
- `401` — Unauthorized
- `413` — Payload too large
- `422` — Validation Error
- `500` — Internal server error

---

[API](https://skmtc.net/papr-ai/apis/papr-memory-api.md) · [All operations](https://skmtc.net/papr-ai/apis/papr-memory-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/papr-ai/papr-memory-api/versions/b553be9aad37/schema)
