Get started with the Uplint API in under 5 minutes.
curl -X POST https://api.uplint.dev/api/v1/api-keys \ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "My First Key", "scopes": ["upload", "download", "metadata"] }'
{ "status": "SUCCESS", "data": { "api_key_id": "6612f1a2c3b4d5e6f7890123", "api_key": "ul_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6", "name": "My First Key", "scopes": ["upload", "download", "metadata"] } }
curl -X POST https://api.uplint.dev/api/v1/contexts \ -H "Authorization: Bearer ul_live_a1b2c3d4..." \ -H "Content-Type: application/json" \ -d '{ "context_key": "patient_reports", "display_name": "Patient Reports", "description": "Medical reports uploaded by patients", "allowed_extensions": ["pdf", "png", "jpg", "jpeg"], "max_file_size_mb": 25, "reject_blank_files": true, "reject_corrupt_files": true, "scan_for_viruses": true }'
curl -X POST https://api.uplint.dev/api/v1/files/upload \ -H "Authorization: Bearer ul_live_a1b2c3d4..." \ -F "file=@report.pdf" \ -F "context=patient_reports" \ -F 'metadata={"department": "radiology", "patient_id": "P-12345"}'
{ "status": "SUCCESS", "message": "File uploaded", "data": { "file_id": "6612f1a2c3b4d5e6f7890abc", "original_filename": "report.pdf", "content_type": "application/pdf", "size_bytes": 843776, "context_key": "patient_reports" } }
{ "status": "ERROR", "message": "File rejected: blank document detected", "errors": ["blank_document"] }
curl https://api.uplint.dev/api/v1/files/FILE_ID \ -H "Authorization: Bearer ul_live_a1b2c3d4..."
{ "status": "SUCCESS", "data": { "file_id": "6612f1a2c3b4d5e6f7890abc", "download_url": "https://s3.amazonaws.com/...", "expires_in_seconds": 300, "original_filename": "report.pdf" } }
Was this page helpful?