The Documents endpoints let you list all documents in your workspace and fetch metadata for individual documents.
List Documents
List all documents in your workspace.
Endpoint
GET /api/v1/documents
Query Parameters
Filter by status: uploading, parsing, completed, failed
Response
Array of document objects
Processing status: uploading, parsing, completed, failed
MIME type of the uploaded file
AI-generated summary of the document
Unix timestamp (milliseconds) of when the document was uploaded
Group identifier if the document belongs to a group
Example
# List only completed documents
curl "https://app.polyvia.ai/api/v1/documents?status=completed" \
-H "Authorization: Bearer poly_<your-key>"
{
"documents": [
{
"id": "k57abc123...",
"title": "Q4 2024 Report",
"status": "completed",
"file_type": "application/pdf",
"summary": "This document covers Q4 financial results...",
"created_at": 1712345678000,
"group_id": null
}
]
}
Get Document
Fetch metadata for a single document.
Endpoint
GET /api/v1/documents/{document_id}
Path Parameters
Response
Processing status: uploading, parsing, completed, failed
MIME type of the uploaded file
Signed URL to download the original file
AI-generated summary of the document
Unix timestamp (milliseconds) of when the document was uploaded
Group identifier if the document belongs to a group
Example
curl "https://app.polyvia.ai/api/v1/documents/k57abc123..." \
-H "Authorization: Bearer poly_<your-key>"
{
"id": "k57abc123...",
"title": "Q4 2024 Report",
"status": "completed",
"file_type": "application/pdf",
"file_url": "https://...",
"summary": "This document covers Q4 financial results...",
"created_at": 1712345678000,
"group_id": null
}