API ReferenceDocumentsUpload Document

Upload Document

POST /api/v1/documents/upload/

Upload a PDF document for processing. Optionally creates an extraction job automatically.

Authentication

Requires an API key with documents:write scope. Pass via the X-API-Key header.

Request

Content type: multipart/form-data

Fields

FieldTypeRequiredDescription
filefileYesPDF file to upload. Maximum size: 25MB.
create_jobbooleanNoIf true, automatically creates an extraction job for the uploaded document.
⚠️

Only PDF files are accepted. Files exceeding 25MB will be rejected.

Response

Status: 201 Created

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "filename": "payroll_journal_march.pdf",
  "file_size": 1048576,
  "checksum": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "content_type": "application/pdf",
  "organization": "org_abc123",
  "created_at": "2026-03-16T12:00:00Z"
}

Response Fields

FieldTypeDescription
idstring (UUID)Unique identifier for the document.
filenamestringOriginal filename of the uploaded document.
file_sizeintegerFile size in bytes.
checksumstringSHA-256 checksum of the uploaded file.
content_typestringMIME type of the file.
organizationstringOrganization the document belongs to.
created_atstring (ISO 8601)Timestamp when the document was created.

Errors

StatusDescription
400Invalid file type (non-PDF) or file size exceeds 25MB.
401Missing or invalid API key.
403API key does not have documents:write scope.

Code Examples

curl -X POST https://api.parsifyhq.com/api/v1/documents/upload/ \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "file=@payroll_journal_march.pdf" \
  -F "create_job=true"