API ReferenceEndpoints
Document Endpoints
Direct file upload and metadata management.
The Documents family provides primitives for uploading raw financial artifacts and managing their basic storage metadata.
Upload Document
Upload a file to Sureshake storage. The content must be Base64 encoded.
POST
/api/v1/documents/uploadcurl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"filename": "report.pdf", "content": "BASE64_CONTENT...", "mimetype": "application/pdf"}' \
https://api.sureshake.com/api/v1/documents/upload201 Created
{
"data": {
"documentKey": "documents/user_123/1710518400.pdf",
"documentUrl": "https://storage.sureshake.com/...",
"hash": "sha256:...",
"name": "report.pdf",
"type": "application/pdf",
"size": 102400,
"uploadedAt": "2024-03-15T10:00:00Z"
}
}Get Metadata
Retrieve storage metadata for a specific document key.
GET
/api/v1/documents/metadatacurl -H "Authorization: Bearer $TOKEN" https://api.sureshake.com/api/v1/documents/metadata?documentKey=documents/user_123/...