Documents
Confirm upload, validate, hash, dedup, reserve credits, trigger ingest-document function
Authorization
bearerAuth AuthorizationBearer <token>
Clerk session JWT. Also send x-clerk-org-id if org context needed.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/documents/confirm-upload" \ -H "Content-Type: application/json" \ -d '{ "filename": "string", "fileType": "pdf", "storagePath": "string" }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "filename": "string", "file_type": "pdf", "storage_path": "string", "source_metadata": { "knowledge": { "isPrimary": true, "description": "string", "tags": [ "string" ], "language": "string" } }, "status": "pending", "chunk_count": 0, "document_version": 1, "created_at": "2019-08-24T14:15:22Z", "knowledge": {}, "usage": { "jobs": [ { "id": "string", "name": "string" } ], "generationCount": 0, "lastUsedAt": "2019-08-24T14:15:22Z" }, "unchanged": true}