POST
/v1/documentsUpload a PDF to AnchorGrid. Returns a document_id that you pass to every detection and parsing endpoint. Documents are stored for the duration of your tier's retention window and then automatically deleted.
multipart/form-dataSync · 201Required first step
Request
Auth via X-API-Key header. Body must be multipart/form-data — do not JSON-encode it. Only PDF files are accepted.
ℹ
This endpoint does not accept a JSON body. Set Content-Type to multipart/form-data (most HTTP clients handle this automatically when you attach a file).
Code examples
Response — 201 Created
Returns the document object immediately. Save the document_id — it is the only way to reference this document in subsequent API calls.
Size limits & retention
Free
50 MB · 30-day retention
Developer
100 MB · 30-day retention
Pro
150 MB · 90-day retention
Enterprise
200 MB · custom retention
Errors
Response Preview
201 Created
201 OK
{ "document_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "original_filename": "floor-plan-lvl2.pdf", "file_size_bytes": 2048000, "page_count": 24, "mime_type": "application/pdf", "tier": "developer", "uploaded_at": "2026-03-30T14:32:00Z", "expires_at": "2026-04-29T14:32:00Z", "download_url": "https://storage.anchorgrid.ai/…?X-Amz-Expires=900", "download_url_expires_in_seconds": 900 }