POST/documents
Start uploading a PDF from the member's machine
An assignment brief, or a paper they were given and downloaded. Returns a presigned URL: PUT the file to it directly (see `curl` in the result), then call extract_brief (kind "brief") or ingest_pdf (kind "paper") with the returned document_id. The URL is single-purpose and expires in minutes. Uploaded files are private to the member's account and never shown to anyone else.
| Field | Type | Description |
|---|---|---|
| filename * | string | The PDF's filename, ending in .pdf |
| kind * | "brief" | "paper" | "brief" (assignment brief) or "paper" (a PDF they were given) |
| project_id | integer | null | Optional project to attach the document to (can be set later) |
| Field | Type | Description |
|---|---|---|
| content_type * | string | |
| curl * | string | A ready-made upload command |
| document_id * | integer | |
| expires_in_seconds * | integer | |
| kind * | string | |
| max_bytes * | integer | |
| method * | string | |
| next_step * | string | extract_brief for a brief, ingest_pdf for a paper |
| upload_url * | string | Presigned URL: PUT the PDF here |
curl -X POST 'https://api.papervantage.com/documents' \
-H "Authorization: Bearer $PV_API_KEY" \
-H "Content-Type: application/json" \
-d '{"kind":"brief","filename":"<filename>"}'pv documents create-upload --filename <filename> --kind <kind>