Documents
Update a document
Update document metadata.
Note: File content cannot be changed after upload. To replace a file, create a new document.
patch/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.
Request body
Response
Document updated 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"
}