cURL
curl --request POST \ --url https://app.demand-iq.com/api/company/kb/documents/upload-init \ --header 'Content-Type: application/json' \ --cookie session= \ --data ' { "filename": "product-guide.pdf", "contentType": "application/pdf", "sizeBytes": 1048576, "displayName": "<string>" } '
{ "documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "uploadUrl": "<string>", "storageKey": "<string>", "expiresIn": 123 }
Validates the file and returns a presigned S3 URL for direct upload. Call /api/company/kb/documents/complete after the upload finishes.
/api/company/kb/documents/complete
Session cookie obtained from POST /api/auth/login.
POST /api/auth/login
"product-guide.pdf"
"application/pdf"
1048576
Upload initiated
Presigned S3 URL for PUT upload
URL expiry in seconds