Documents
Get a document
Retrieve a document by ID or key.
Returns the document metadata including a fresh downloadUrl if the file is uploaded.
Note: The downloadUrl is a pre-signed S3 URL that expires after 1 hour. Each GET request generates a fresh URL.
get/documents/{id}
Path parameters
idstring required
Resource ID (UUID) or client key
Query parameters
by'id' | 'key'
Specify lookup type for faster retrieval. If omitted, defaults to looking up by ID first, then falls back to client key if not found. Use by=key when you know you're providing a client key for best performance.
Response
Document retrieved successfully
Example response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"key": "doc-inv-2025-001",
"fileName": "invoice-2025-001.pdf",
"extension": "pdf",
"contentType": "application/pdf",
"fileSize": 102400,
"uploadUrl": "https://s3.amazonaws.com/bucket/key?signature=...",
"downloadUrl": "https://s3.amazonaws.com/bucket/key?signature=...",
"tags": {
"invoiceNumber": "INV-2025-001",
"customerPO": "PO-12345"
},
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-01-15T10:35:00Z"
}