Upload and download files
Attach certificates and reports to documents. Files are stored exactly as uploaded, so digital signatures stay valid.
Upload
POST /v1/documents/{id}/files as multipart/form-data with the file in the field "file". Allowed: PDF, JPEG, PNG, WEBP, HEIC, DOCX, XLSX, CSV, and TXT, up to 25 MB. The type is checked from the content, not only the name. The file is scanned for malware during the request:
- 201: clean and stored; the response has its size and SHA-256.
- 422 file_type_not_allowed or file_rejected: not stored.
- 503 scanner_unavailable: try again later.
curl -X POST \
https://api.dms.everdeenone.com/v1/documents/DOC_ID/files \
-H "Authorization: Bearer $EVERDEEN_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-F "file=@certificate.pdf"
Download and remove
GET /v1/documents/{id}/files/{file_id}/content streams the original with a Digest header holding its SHA-256. DELETE removes the file from the document; it can be restored for 30 days.