Skip to content

Documents and uploads

POST /submissions/{id}/documents as multipart with a file field (and an optional doc_type). PDF, images, Word, Excel, CSV and text. Valjean reads each document with AI and updates what’s needed.

Terminal window
curl -X POST https://api.valjeanspecialty.com/api/agent/v1/submissions/$ID/documents \
-H "Authorization: Bearer $VALJEAN_KEY" -F "file=@loss-runs.pdf;type=application/pdf"
  1. Ask for an upload link: POST …/documents/upload-url with file_name and content_type.
  2. PUT the bytes to upload_url with that Content-Type. The link lasts 2 hours.
  3. Record it: POST …/documents/complete with the upload_id.
Terminal window
POST /submissions/{id}/documents/upload-url {"file_name":"SOV.xlsx","content_type":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}
→ { "upload_id": "...", "upload_url": "https://...", "method": "PUT" }
curl -X PUT "$upload_url" -H "Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" --data-binary @SOV.xlsx
POST /submissions/{id}/documents/complete {"upload_id":"...","file_name":"SOV.xlsx","content_type":"..."}

POST /intake takes up to 5 files (4 MB in total) and a description. Valjean reads them and a broker confirms the insured, lines and dates. Add more files afterwards with the calls above.

GET …/documents lists the file’s documents plus the carrier paper you may have: presented quotes, binders, policies and endorsements. GET …/documents/{doc_id} returns a download link good for 5 minutes, or redirects to the file with ?redirect=1.